106 lines
4.1 KiB
C#
106 lines
4.1 KiB
C#
using General_Ledger_Service.Enums;
|
|
|
|
namespace General_Ledger_Service.Models
|
|
{
|
|
public class ChequeBook
|
|
{
|
|
public long ChequeBookId { get; set; }
|
|
public long BranchId { get; set; }
|
|
public long BankAccountId { get; set; }
|
|
public string ChequeBookNo { get; set; } = string.Empty;
|
|
public string StartChequeNo { get; set; } = string.Empty;
|
|
public string EndChequeNo { get; set; } = string.Empty;
|
|
public int TotalLeaves { get; set; }
|
|
public DateOnly ReceivedDate { get; set; }
|
|
public ChequeBookStatus Status { get; set; }
|
|
public string? Description { get; set; }
|
|
public bool IsActive { get; set; }
|
|
public string? CreatedBy { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
public string? ModifiedBy { get; set; }
|
|
public DateTime? ModifiedAt { get; set; }
|
|
|
|
public BankAccount BankAccount { get; set; } = null!;
|
|
public List<ChequePage> Pages { get; set; } = [];
|
|
}
|
|
|
|
public class ChequePage
|
|
{
|
|
public long ChequePageId { get; set; }
|
|
public long ChequeBookId { get; set; }
|
|
public string ChequeNo { get; set; } = string.Empty;
|
|
public ChequeIssueStatus IssueStatus { get; set; }
|
|
|
|
// Set only once issued - no Supplier/Customer/Employee master table exists in this
|
|
// service, so PayeeId is a loose external reference (no FK), same treatment as
|
|
// AuditLog.EntityId.
|
|
public ChequePayeeType? PayeeType { get; set; }
|
|
public long? PayeeId { get; set; }
|
|
public string? PayeeName { get; set; }
|
|
|
|
public DateOnly? IssueDate { get; set; }
|
|
public decimal? Amount { get; set; }
|
|
public string? CurrencyCode { get; set; }
|
|
|
|
// Loose reference - no Voucher table exists in this service.
|
|
public long? VoucherId { get; set; }
|
|
public string? ReferenceNo { get; set; }
|
|
public string? Purpose { get; set; }
|
|
|
|
public bool IsCrossCheque { get; set; }
|
|
public bool IsAccountPayee { get; set; }
|
|
public bool IsPostDated { get; set; }
|
|
|
|
public DateOnly? ClearedDate { get; set; }
|
|
public bool ClearedByBank { get; set; }
|
|
public string? CancelReason { get; set; }
|
|
public string? Notes { get; set; }
|
|
|
|
public string? PrintedBy { get; set; }
|
|
public DateTime? PrintedAt { get; set; }
|
|
public string? CreatedBy { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
public ChequeBook ChequeBook { get; set; } = null!;
|
|
public Currency? Currency { get; set; }
|
|
}
|
|
|
|
// No ChequeBook link by design - these cheques are received from the other side (customers/
|
|
// suppliers/etc.), not issued from one of this company's own cheque books.
|
|
public class ReceivedCheque
|
|
{
|
|
public long ReceivedChequeId { get; set; }
|
|
public long CompanyId { get; set; }
|
|
public long? BranchId { get; set; }
|
|
|
|
public ReceivedChequeFromType ReceivedFromType { get; set; }
|
|
public long? ReceivedFromId { get; set; }
|
|
public string ReceivedFromName { get; set; } = string.Empty;
|
|
|
|
// Plain free text, not a FK - no bank-master table exists in this service, same
|
|
// precedent as BankAccount.BankName already being free text.
|
|
public string? DrawerBankName { get; set; }
|
|
public string? DrawerBankBranch { get; set; }
|
|
public string? AccountHolderName { get; set; }
|
|
|
|
public string ChequeNo { get; set; } = string.Empty;
|
|
public DateOnly ChequeDate { get; set; }
|
|
public decimal Amount { get; set; }
|
|
public DateOnly ReceivedDate { get; set; }
|
|
|
|
public long? DepositBankAccountId { get; set; }
|
|
public DateOnly? DepositDate { get; set; }
|
|
|
|
public ReceivedChequeStatus Status { get; set; }
|
|
|
|
public string? ReferenceType { get; set; }
|
|
public long? ReferenceId { get; set; }
|
|
public string? Notes { get; set; }
|
|
|
|
public string? CreatedBy { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
public BankAccount? DepositBankAccount { get; set; }
|
|
}
|
|
}
|