using Meezi.Core.Enums;
namespace Meezi.Core.Entities;
public class Employee : TenantEntity
{
public string? BranchId { get; set; }
public string Name { get; set; } = string.Empty;
public string Phone { get; set; } = string.Empty;
public string? NationalId { get; set; }
public EmployeeRole Role { get; set; }
public decimal BaseSalary { get; set; }
public string? PinCode { get; set; }
/// Optional username for password-based dashboard/POS login (set by cafe admin).
public string? Username { get; set; }
/// PBKDF2/SHA-256 hash. Null means password login is not enabled for this employee.
public string? PasswordHash { get; set; }
public Cafe Cafe { get; set; } = null!;
public Branch? Branch { get; set; }
public ICollection Orders { get; set; } = [];
public ICollection Salaries { get; set; } = [];
public ICollection Attendances { get; set; } = [];
public ICollection Schedules { get; set; } = [];
public ICollection LeaveRequests { get; set; } = [];
/// Per-branch role assignments (multi-branch staff). Owners are café-wide and may have none.
public ICollection BranchRoles { get; set; } = [];
}