2026-05-27 21:33:48 +03:30
|
|
|
namespace Meezi.Core.Entities;
|
|
|
|
|
|
|
|
|
|
/// <summary>Physical branch (شعبه) under a café tenant.</summary>
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
/// <summary>When set with <see cref="BaseEntity.DeletedAt"/>, branch can be restored until this UTC time.</summary>
|
|
|
|
|
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; }
|
2026-06-25 12:07:16 +03:30
|
|
|
|
|
|
|
|
/// <summary>Optional <see cref="PrintDevice"/> to route through a local print agent
|
|
|
|
|
/// (preferred over the raw IP when its agent is online). Cloud-hosted cafés use this.</summary>
|
|
|
|
|
public string? ReceiptPrintDeviceId { get; set; }
|
|
|
|
|
public string? KitchenPrintDeviceId { get; set; }
|
2026-05-27 21:33:48 +03:30
|
|
|
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; }
|
|
|
|
|
/// <summary>Branch-specific logo on QR guest menu (falls back to café logo).</summary>
|
|
|
|
|
public string? LogoUrl { get; set; }
|
|
|
|
|
public string? WelcomeText { get; set; }
|
|
|
|
|
public string? AccentColor { get; set; }
|
|
|
|
|
/// <summary>Branch tax % when café <see cref="Cafe.AllowBranchTaxOverride"/> is true.</summary>
|
|
|
|
|
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<TableSection> Sections { get; set; } = [];
|
|
|
|
|
public ICollection<Table> Tables { get; set; } = [];
|
|
|
|
|
public ICollection<Order> Orders { get; set; } = [];
|
|
|
|
|
public ICollection<Employee> Staff { get; set; } = [];
|
2026-05-31 11:06:24 +03:30
|
|
|
|
|
|
|
|
/// <summary>Per-branch role assignments scoped to this branch.</summary>
|
|
|
|
|
public ICollection<EmployeeBranchRole> StaffRoles { get; set; } = [];
|
2026-05-27 21:33:48 +03:30
|
|
|
}
|