41 lines
1.3 KiB
C#

using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;
namespace Marco.Pms.Model.Inventory
{
public class Item : TenantRelation
{
public Guid Id { get; set; }
public string Name { get; set; } = default!;
public string Description { get; set; } = default!;
public Guid ItemGroupId { get; set; }
[ValidateNever]
[ForeignKey("ItemGroupId")]
public ItemGroupMaster? ItemGroup { get; set; }
public Guid TechnicalUnitId { get; set; }
[ValidateNever]
[ForeignKey("TechnicalUnitId")]
public TechnicalUnit? ItemCategTechnicalUnitory { get; set; }
public string ItemUId { get; set; } = "Item-00001";
public int Threshold { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; }
public Guid CreatedById { get; set; }
[ValidateNever]
[ForeignKey("CreatedById")]
public Employee? CreatedBy { get; set; }
public DateTime? UpdatedAt { get; set; }
public Guid? UpdatedById { get; set; }
[ValidateNever]
[ForeignKey("UpdatedById")]
public Employee? UpdatedBy { get; set; }
}
}