34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using AyCode.Entities.ServiceProviders;
|
|
using TIAM.Entities.Addresses;
|
|
using TIAM.Entities.Products;
|
|
using TIAM.Entities.Profiles;
|
|
using TIAM.Entities.Users;
|
|
|
|
namespace TIAM.Entities.ServiceProviders;
|
|
|
|
[Table("ServiceProviders")]
|
|
public class Company : AcCompany<User, UserToCompany, Profile, Address>, ICompany, IProductsRelation, IProfileRelation<Profile>
|
|
{
|
|
public virtual List<Product> Products { get; set; } = new();
|
|
|
|
public Company()
|
|
{
|
|
}
|
|
|
|
public Company(string name, Guid? ownerId) : this(Guid.NewGuid(), name, ownerId)
|
|
{
|
|
}
|
|
|
|
public Company(Guid id, string name, Guid? ownerId) : this(id, name, ownerId, Guid.NewGuid())
|
|
{
|
|
}
|
|
|
|
public Company(Guid id, string name, Guid? ownerId, double commissionPercent) : this(id, name, ownerId, Guid.NewGuid())
|
|
{
|
|
CommissionPercent = commissionPercent;
|
|
}
|
|
|
|
public Company(Guid id, string name, Guid? ownerId, Guid affiliateId) : base(id, name, ownerId, affiliateId)
|
|
{ }
|
|
} |