shop info
This commit is contained in:
58
Webshop.Domain/Entities/ShopInfo.cs
Normal file
58
Webshop.Domain/Entities/ShopInfo.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
// src/Webshop.Domain/Entities/ShopInfo.cs
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webshop.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Enthält die zentralen Stammdaten des Shops.
|
||||
/// Es sollte nur eine einzige Zeile in dieser Tabelle existieren.
|
||||
/// </summary>
|
||||
public class ShopInfo
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required, MaxLength(255)]
|
||||
public string ShopName { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? Slogan { get; set; } // << NEU: Für Marketing >>
|
||||
|
||||
[Required, MaxLength(255)]
|
||||
public string ContactEmail { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(50)]
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
// --- Firmenadresse ---
|
||||
[MaxLength(255)]
|
||||
public string? Street { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string? City { get; set; }
|
||||
|
||||
[MaxLength(20)]
|
||||
public string? PostalCode { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string? Country { get; set; }
|
||||
|
||||
// --- Rechtliches ---
|
||||
[MaxLength(50)]
|
||||
public string? VatNumber { get; set; } // Umsatzsteuer-ID
|
||||
|
||||
[MaxLength(100)]
|
||||
public string? CompanyRegistrationNumber { get; set; } // Handelsregisternummer
|
||||
|
||||
// --- Social Media & Links ---
|
||||
[MaxLength(255)]
|
||||
public string? FacebookUrl { get; set; } // << NEU >>
|
||||
|
||||
[MaxLength(255)]
|
||||
public string? InstagramUrl { get; set; } // << NEU >>
|
||||
|
||||
[MaxLength(255)]
|
||||
public string? TwitterUrl { get; set; } // << NEU >>
|
||||
}
|
||||
}
|
||||
13
Webshop.Domain/Interfaces/IShopInfoRepository.cs
Normal file
13
Webshop.Domain/Interfaces/IShopInfoRepository.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
// src/Webshop.Domain/Interfaces/IShopInfoRepository.cs
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Domain.Entities;
|
||||
|
||||
namespace Webshop.Domain.Interfaces
|
||||
{
|
||||
public interface IShopInfoRepository
|
||||
{
|
||||
Task<ShopInfo?> GetAsync(); // Ruft die (einzige) ShopInfo-Zeile ab
|
||||
Task UpdateAsync(ShopInfo shopInfo);
|
||||
Task AddAsync(ShopInfo shopInfo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user