38 lines
1.1 KiB
C#
38 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;
|
|
|
|
namespace TIAM.Entities.Products;
|
|
|
|
|
|
public class Product : IEntityGuid, ITimeStampInfo
|
|
{
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
|
public Guid Id { get; set; }
|
|
|
|
public ProductType ProductType { get; set; }
|
|
public Guid UserMediaId { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
public string Description { get; set; }
|
|
public float Price { get; set; }
|
|
public string JsonDetails { get; set; }
|
|
|
|
public DateTime Created { get; set; }
|
|
public DateTime Modified { get; set; }
|
|
|
|
public Product(Guid id, ProductType type, Guid userMediaId, string name, string description, float price, string jsonDetails)
|
|
{
|
|
Id = id;
|
|
ProductType = type;
|
|
UserMediaId = userMediaId;
|
|
Name = name;
|
|
Description = description;
|
|
Price = price;
|
|
JsonDetails = jsonDetails;
|
|
Created = DateTime.Now;
|
|
Modified = DateTime.Now;
|
|
}
|
|
} |