using SolutionErp.Domain.Common;

namespace SolutionErp.Domain.Office;

// Phase 10.2 G-O2 (Mig 36 — S36) — Attendee join table N-to-N.
// Composite PK (BookingId, UserId) — không support add user 2 lần cùng booking.
// FK Cascade Booking (xoá Booking → wipe Attendees) + Restrict User
// (admin không xoá user còn invite — denorm name preserve).
// Reference Investigator verdict: prefer join table over JSON array
// để index query Notification push + reuse Users API multi-select FE.
public class MeetingBookingAttendee : BaseEntity   // NO IsDeleted — composite PK delete entire row
{
    public Guid BookingId { get; set; }
    public MeetingBooking Booking { get; set; } = null!;

    public Guid UserId { get; set; }
    public string FullName { get; set; } = string.Empty;     // denorm tránh JOIN cho Notification push
    public string? Email { get; set; }                       // denorm cho email outbox future

    public string? Notes { get; set; }                       // "Vắng buổi sáng", "Tham gia online"
}
