Projektdateien hinzufügen.
This commit is contained in:
40
Webshop.Domain/Entities/Supplier.cs
Normal file
40
Webshop.Domain/Entities/Supplier.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Webshop.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Details zu den Produktlieferanten.
|
||||
/// </summary>
|
||||
public class Supplier
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string? ContactPerson { get; set; }
|
||||
|
||||
[MaxLength(256)]
|
||||
[EmailAddress]
|
||||
public string? Email { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
[Phone]
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
[ForeignKey(nameof(Address))]
|
||||
public Guid? AddressId { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
public virtual Address? Address { get; set; }
|
||||
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
|
||||
}
|
||||
Reference in New Issue
Block a user