PSTW_CentralizeSystem/Areas/Inventory/Models/ItemMovementModel.cs
2024-12-30 16:32:16 +08:00

44 lines
1.8 KiB
C#

using PSTW_CentralSystem.Models;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace PSTW_CentralSystem.Areas.Inventory.Models
{
public class ItemMovementModel
{
[Key]
public int Id { get; set; }
public int ItemId { get; set; }
public int? ToStation { get; set; }
public int? ToStore { get; set; }
public int? ToUser { get; set; }
[Comment("Repair, Calibration, Faulty, Ready To Deploy, On Delivery")]
public string? ToOther { get; set; }
[Comment("StockIn, Stock Out")]
public string? Action { get; set; }
public int? Quantity { get; set; }
public string? Remark { get; set; }
public string? ConsignmentNote { get; set; }
public DateTime? Date { get; set; }
public int? LastUser { get; set; }
public int? LastStore{ get; set; }
public int? LastStation{ get; set; }
[Comment("Repair, Calibration, Faulty, Ready To Deploy, On Delivery")]
public string? LatestStatus { get; set; }
public bool MovementComplete { get; set; } = false;
public virtual ItemModel? Item { get; set; }
[ForeignKey("ToStore")]
public virtual StoreModel? NextStore { get; set; }
[ForeignKey("ToStation")]
public virtual StationModel? NextStation { get; set; }
[ForeignKey("ToUser")]
public virtual UserModel? NextUser { get; set; }
[ForeignKey("LastStore")]
public virtual StoreModel? FromStore { get; set; }
[ForeignKey("LastStation")]
public virtual StationModel? FromStation { get; set; }
[ForeignKey("LastUser")]
public virtual UserModel? FromUser { get; set; }
}
}