using SolutionErp.Domain.Common;

namespace SolutionErp.Domain.Office;

// Phase 10.3 G-O5 (Mig 39 — S38) — Đặt xe công.
// Workflow V2 ApplicableType=VehicleBooking=7 (Mig 37 enum extend).
// Skeleton Phase 1: free text vehicle license/name (NO Vehicle catalog table — defer Phase 11).
public class VehicleBooking : AuditableEntity
{
    public string? MaDonTu { get; set; }                  // "DT/VB/2026/001"
    public Guid RequesterUserId { get; set; }
    public string RequesterFullName { get; set; } = string.Empty;
    public string VehicleLicense { get; set; } = string.Empty;  // free text "30A-12345"
    public string? VehicleName { get; set; }              // "Xe 7 chỗ Innova"
    public DateTime StartAt { get; set; }
    public DateTime EndAt { get; set; }
    public string Destination { get; set; } = string.Empty;
    public string Purpose { get; set; } = string.Empty;
    public string? DriverName { get; set; }               // free text "Anh Tài 0901xxx" — defer Driver catalog Phase 11
    public WorkflowAppStatus Status { get; set; } = WorkflowAppStatus.Nhap;
    public Guid? ApprovalWorkflowId { get; set; }
    public int? CurrentApprovalLevelOrder { get; set; }

    public WorkflowAppStatus? RejectedFromStatus { get; set; }   // smart return tracking (mirror Proposal)
    public List<VehicleBookingLevelOpinion> LevelOpinions { get; set; } = new();
}
