namespace Meezi.Core.Entities; /// Physical branch (شعبه) under a café tenant. public class Branch : TenantEntity { public string Name { get; set; } = string.Empty; public string? Address { get; set; } public string? City { get; set; } public string? Phone { get; set; } public bool IsActive { get; set; } = true; public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; /// When set with , branch can be restored until this UTC time. public DateTime? ScheduledPermanentDeleteAt { get; set; } // Thermal printer (TCP ESC/POS) public string? ReceiptPrinterIp { get; set; } public int? ReceiptPrinterPort { get; set; } public string? KitchenPrinterIp { get; set; } public int? KitchenPrinterPort { get; set; } /// Optional to route through a local print agent /// (preferred over the raw IP when its agent is online). Cloud-hosted cafés use this. public string? ReceiptPrintDeviceId { get; set; } public string? KitchenPrintDeviceId { get; set; } public int PaperWidthMm { get; set; } = 80; public bool AutoCutEnabled { get; set; } = true; public string? ReceiptHeader { get; set; } public string? ReceiptFooter { get; set; } public string? WifiPassword { get; set; } /// Branch-specific logo on QR guest menu (falls back to café logo). public string? LogoUrl { get; set; } public string? WelcomeText { get; set; } public string? AccentColor { get; set; } /// Branch tax % when café is true. public decimal? TaxRate { get; set; } // Card POS terminal (HTTP bridge on local network) public string? PosDeviceIp { get; set; } public int? PosDevicePort { get; set; } public Cafe Cafe { get; set; } = null!; public ICollection Sections { get; set; } = []; public ICollection Tables { get; set; } = []; public ICollection Orders { get; set; } = []; public ICollection Staff { get; set; } = []; /// Per-branch role assignments scoped to this branch. public ICollection StaffRoles { get; set; } = []; }