28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using AyCode.Interfaces.Entities;
|
|
using AyCode.Interfaces.TimeStampInfo;
|
|
using TIAM.Core.Enums;
|
|
using TIAM.Entities.ServiceProviders;
|
|
using TIAM.Entities.Users;
|
|
|
|
namespace TIAM.Entities.Products;
|
|
|
|
[Table("Products")]
|
|
public class Product : ProductBase
|
|
{
|
|
public Guid ServiceProviderId { get; set; }
|
|
|
|
public virtual TiamServiceProvider ServiceProvider { get; set; }
|
|
|
|
public virtual List<User> Users { get; } = new();
|
|
public virtual List<UserProductMapping> UserProductMappings { get; } = new();
|
|
|
|
public Product(){}
|
|
|
|
public Product(Guid ownerId, ProductType productType, string name, string description, float price, string jsonDetails) : this(Guid.NewGuid(), ownerId, productType, name, description, price, jsonDetails) { }
|
|
public Product(Guid id, Guid serviceProviderId, ProductType productType, string name, string description, float price, string jsonDetails) : base(id, productType, name, description, price, jsonDetails)
|
|
{
|
|
ServiceProviderId = serviceProviderId;
|
|
}
|
|
} |