Files
meezi/src/Meezi.Core/Entities/Employee.cs
T

32 lines
1.3 KiB
C#
Raw Normal View History

2026-05-27 21:33:48 +03:30
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; }
/// <summary>Optional username for password-based dashboard/POS login (set by cafe admin).</summary>
public string? Username { get; set; }
/// <summary>PBKDF2/SHA-256 hash. Null means password login is not enabled for this employee.</summary>
public string? PasswordHash { get; set; }
2026-05-27 21:33:48 +03:30
public Cafe Cafe { get; set; } = null!;
public Branch? Branch { get; set; }
public ICollection<Order> Orders { get; set; } = [];
public ICollection<EmployeeSalary> Salaries { get; set; } = [];
public ICollection<Attendance> Attendances { get; set; } = [];
public ICollection<EmployeeSchedule> Schedules { get; set; } = [];
public ICollection<LeaveRequest> LeaveRequests { get; set; } = [];
2026-05-31 11:06:24 +03:30
/// <summary>Per-branch role assignments (multi-branch staff). Owners are café-wide and may have none.</summary>
public ICollection<EmployeeBranchRole> BranchRoles { get; set; } = [];
2026-05-27 21:33:48 +03:30
}