using System; namespace FMDAL.DTO.ScanSession { // Confirmed against DB/Migrations/20260719_RAM_Phase2_Schema_SqlServer.sql (TSCANSESSION). // Full-CRUD master with a status lifecycle: OPEN(0) -> CONFIRMED(1) / CANCELLED(2). New // sessions are insert-only (SaveScanSession never updates an existing row) — the only two // mutation paths after insert are ConfirmScanSession and CancelScanSession, both of which // progress SessionStatus rather than resaving the whole entity. Uses the simple auto-property // style established by AssetLedgerDTO for this RAM phase-2 batch of tables (as opposed to the // older private-field/property style seen in AssetActivityDTO). public class ScanSessionDTO { public int ScanSessionId { get; set; } public string SessionCode { get; set; } = string.Empty; public int ScanZoneId { get; set; } public int ScanDeviceId { get; set; } public int OperatorId { get; set; } public byte SessionType { get; set; } // (0.SINGLE,1.BULK) public byte ScanIntent { get; set; } // (0.IDENTIFY,1.VERIFY,2.TRANSACT,3.AUDIT) public int ModuleId { get; set; } public int? BizTransactionTypeId { get; set; } public string? ReferenceType { get; set; } // DISPATCH_ORDER / PROD_ORDER / STOCK_COUNT / VENDOR_VISIT etc. public int? ReferenceId { get; set; } public int TotalScanned { get; set; } public int TotalAccepted { get; set; } public int TotalRejected { get; set; } public byte SessionStatus { get; set; } // (0.OPEN,1.CONFIRMED,2.CANCELLED) public byte IsOffline { get; set; } = 1; // (0.YES,1.NO) public DateTime? SyncedOn { get; set; } public DateTime StartedOn { get; set; } public DateTime? ConfirmedOn { get; set; } public short SortOrder { get; set; } = 9999; public byte Status { get; set; } = 1; public short Version { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public byte SourceType { get; set; } = 5; public int OUId { get; set; } public int TenantId { get; set; } = -1; } }