using Baya.Domain.Common;

namespace Baya.Domain.Entities.Geography;

/// <summary>
/// Where a nurse will travel — the membership row search later intersects with a customer's address.
/// A row with <see cref="DistrictId"/> == <c>null</c> is a <b>meaningful "entire city"</b> coverage
/// choice, not missing data; search treats it as matching every district in that city. Whole-city and
/// city+district duplicates are both rejected at the DB level (see the filtered-index pair in the EF
/// configuration) — a nurse cannot declare the same coverage twice.
/// </summary>
public class NurseServiceArea : BaseEntity<long>
{
    public long NurseId { get; set; }

    public long CityId { get; set; }
    public City City { get; set; }

    /// <summary>NULL = the entire city (a deliberate coverage choice, not a forgotten selection).</summary>
    public long? DistrictId { get; set; }
    public District District { get; set; }

    public bool IsActive { get; set; }

    public DateTimeOffset? DeletedAt { get; set; }
}
