// using System; using Baya.Infrastructure.Persistence; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Baya.Infrastructure.Persistence.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20260706152603_BookingsSessionsEvvCancellation")] partial class BookingsSessionsEvvCancellation { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.9") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Baya.Domain.Entities.Analytics.SystemEvent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("OccurredAt") .HasColumnType("datetimeoffset"); b.Property("PropsJson") .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("Name"); b.HasIndex("OccurredAt"); b.HasIndex("UserId"); b.ToTable("SystemEvents", "ops"); }); modelBuilder.Entity("Baya.Domain.Entities.Audit.AuditLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Action") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("ActorUserId") .HasColumnType("int"); b.Property("ChangedFieldsJson") .HasColumnType("nvarchar(max)"); b.Property("EntityId") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("EntityType") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("OccurredAt") .HasColumnType("datetimeoffset"); b.HasKey("Id"); b.HasIndex("ActorUserId"); b.HasIndex("OccurredAt"); b.HasIndex("EntityType", "EntityId"); b.ToTable("AuditLogs", "ops"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.Booking", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AddressSnapshotJson") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("BalinyaarCommissionIrr") .HasColumnType("bigint"); b.Property("BookingRequestId") .HasColumnType("bigint"); b.Property("CancellationPolicyCode") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("CancellationReason") .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("CancellationRefundPercentage") .HasPrecision(5, 2) .HasColumnType("decimal(5,2)"); b.Property("CancelledAt") .HasColumnType("datetime2"); b.Property("CancelledBy") .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("CompletedAt") .HasColumnType("datetime2"); b.Property("ConfirmedAt") .HasColumnType("datetime2"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("CustomerAddressId") .HasColumnType("bigint"); b.Property("CustomerId") .HasColumnType("bigint"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("DisputeWindowEndsAt") .HasColumnType("datetime2"); b.Property("GrossPriceIrr") .HasColumnType("bigint"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("NursePayoutAmount") .HasColumnType("bigint"); b.Property("PartnerCenterId") .HasColumnType("bigint"); b.Property("PatientId") .HasColumnType("bigint"); b.Property("PlatformFeeRate") .HasPrecision(5, 4) .HasColumnType("decimal(5,4)"); b.Property("PspFeeAmount") .HasColumnType("bigint"); b.Property("RefundableAmountIrr") .HasColumnType("bigint"); b.Property("ScheduledDate") .HasColumnType("date"); b.Property("ScheduledTimeEnd") .HasColumnType("time"); b.Property("ScheduledTimeStart") .HasColumnType("time"); b.Property("SessionCount") .HasColumnType("smallint"); b.Property("Status") .IsRequired() .HasMaxLength(30) .HasColumnType("nvarchar(30)"); b.Property("VariantId") .HasColumnType("bigint"); b.Property("VariantSnapshotJson") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("BookingRequestId") .IsUnique(); b.HasIndex("CustomerAddressId"); b.HasIndex("DisputeWindowEndsAt"); b.HasIndex("PatientId"); b.HasIndex("VariantId"); b.HasIndex("CustomerId", "Status"); b.HasIndex("NurseId", "Status"); b.ToTable("Bookings", "booking", t => { t.HasCheckConstraint("CK_Bookings_AmountSplit", "[GrossPriceIrr] = [BalinyaarCommissionIrr] + [NursePayoutAmount] AND [GrossPriceIrr] >= 0 AND [BalinyaarCommissionIrr] >= 0 AND [NursePayoutAmount] >= 0"); }); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingCareInstruction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Allergies") .HasColumnType("nvarchar(max)"); b.Property("BookingId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("CurrentConditions") .HasColumnType("nvarchar(max)"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("EmergencyContactName") .HasColumnType("nvarchar(max)"); b.Property("EmergencyContactPhone") .HasColumnType("nvarchar(max)"); b.Property("Medications") .HasColumnType("nvarchar(max)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("SpecialInstructions") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("BookingId") .IsUnique(); b.ToTable("BookingCareInstructions", "booking"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingRequest", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("CustomerAddressId") .HasColumnType("bigint"); b.Property("CustomerId") .HasColumnType("bigint"); b.Property("CustomerNotes") .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("NurseRejectionReason") .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("NurseResponseDeadlineAt") .HasColumnType("datetime2"); b.Property("PatientId") .HasColumnType("bigint"); b.Property("PaymentDeadlineAt") .HasColumnType("datetime2"); b.Property("RequestedDate") .HasColumnType("date"); b.Property("RequestedTimeEnd") .HasColumnType("time"); b.Property("RequestedTimeStart") .HasColumnType("time"); b.Property("RequiredCaregiverGender") .HasMaxLength(10) .HasColumnType("nvarchar(10)"); b.Property("Status") .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("VariantId") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("CustomerAddressId"); b.HasIndex("PatientId"); b.HasIndex("VariantId"); b.HasIndex("CustomerId", "Status"); b.HasIndex("NurseId", "Status"); b.HasIndex("Status", "NurseResponseDeadlineAt"); b.HasIndex("Status", "PaymentDeadlineAt"); b.ToTable("BookingRequests", "booking"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingSession", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BookingId") .HasColumnType("bigint"); b.Property("CancellationEventId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("PayoutEligibleAt") .HasColumnType("datetime2"); b.Property("ScheduledDate") .HasColumnType("date"); b.Property("ScheduledTimeEnd") .HasColumnType("time"); b.Property("ScheduledTimeStart") .HasColumnType("time"); b.Property("SessionIndex") .HasColumnType("int"); b.Property("Status") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("VisitPayoutAmount") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("BookingId", "SessionIndex"); b.HasIndex("Status", "ScheduledDate"); b.ToTable("BookingSessions", "booking"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.CancellationPolicy", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AppliesTo") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("Code") .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("FeeAmountIrr") .HasColumnType("bigint"); b.Property("FeeRate") .HasPrecision(5, 4) .HasColumnType("decimal(5,4)"); b.Property("HoursBeforeStartMax") .HasColumnType("int"); b.Property("HoursBeforeStartMin") .HasColumnType("int"); b.Property("IsActive") .HasColumnType("bit"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("RefundPercentage") .HasPrecision(5, 2) .HasColumnType("decimal(5,2)"); b.HasKey("Id"); b.HasIndex("Code") .IsUnique(); b.HasIndex("AppliesTo", "IsActive"); b.ToTable("CancellationPolicies", "booking"); b.HasData( new { Id = 1L, AppliesTo = "customer", Code = "standard_24h", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), FeeAmountIrr = 0L, HoursBeforeStartMin = 24, IsActive = true, RefundPercentage = 100m }, new { Id = 2L, AppliesTo = "customer", Code = "standard_inside_24h", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), FeeAmountIrr = 0L, HoursBeforeStartMax = 24, IsActive = true, RefundPercentage = 50m }, new { Id = 3L, AppliesTo = "nurse", Code = "nurse_no_show", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), FeeAmountIrr = 0L, FeeRate = 0m, IsActive = true, RefundPercentage = 100m }, new { Id = 4L, AppliesTo = "admin", Code = "admin_cancellation", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), FeeAmountIrr = 0L, IsActive = true, RefundPercentage = 100m }); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.VisitVerification", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BookingSessionId") .HasColumnType("bigint"); b.Property("CheckInAddressMatch") .HasColumnType("bit"); b.Property("CheckInAt") .HasColumnType("datetime2"); b.Property("CheckInDistanceMeters") .HasPrecision(10, 2) .HasColumnType("decimal(10,2)"); b.Property("CheckInLat") .HasPrecision(9, 6) .HasColumnType("decimal(9,6)"); b.Property("CheckInLng") .HasPrecision(9, 6) .HasColumnType("decimal(9,6)"); b.Property("CheckOutAt") .HasColumnType("datetime2"); b.Property("CheckOutLat") .HasPrecision(9, 6) .HasColumnType("decimal(9,6)"); b.Property("CheckOutLng") .HasPrecision(9, 6) .HasColumnType("decimal(9,6)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("Status") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.HasKey("Id"); b.HasIndex("BookingSessionId") .IsUnique(); b.HasIndex("CheckInAddressMatch"); b.ToTable("VisitVerifications", "booking"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.NurseServiceVariant", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("DisplayName") .IsRequired() .HasMaxLength(300) .HasColumnType("nvarchar(300)"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("OptionSetHash") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Price") .HasColumnType("bigint"); b.Property("PriceUnit") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("ServiceCategoryId") .HasColumnType("bigint"); b.Property("SessionCount") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ServiceCategoryId"); b.HasIndex("NurseId", "IsActive"); b.HasIndex("NurseId", "ServiceCategoryId", "OptionSetHash") .IsUnique() .HasDatabaseName("UX_NurseServiceVariants_Nurse_Category_OptionSet") .HasFilter("[DeletedAt] IS NULL"); b.ToTable("NurseServiceVariants", "catalog"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.NurseServiceVariantOption", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("OptionGroupId") .HasColumnType("bigint"); b.Property("OptionValueId") .HasColumnType("bigint"); b.Property("VariantId") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("OptionGroupId"); b.HasIndex("OptionValueId"); b.HasIndex("VariantId", "OptionGroupId") .IsUnique() .HasDatabaseName("UX_NurseServiceVariantOptions_Variant_Group"); b.ToTable("NurseServiceVariantOptions", "catalog"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("DescriptionEn") .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); b.Property("DescriptionFa") .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); b.Property("IconKey") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameEn") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("NameFa") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("IsActive", "SortOrder"); b.ToTable("ServiceCategories", "catalog"); b.HasData( new { Id = 1L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Elderly Care", NameFa = "مراقبت از سالمند", SortOrder = 1 }, new { Id = 2L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Post-Surgery Recovery", NameFa = "مراقبت پس از جراحی", SortOrder = 2 }, new { Id = 3L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Infant Care", NameFa = "مراقبت از نوزاد", SortOrder = 3 }, new { Id = 4L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Chronic Illness Management", NameFa = "مدیریت بیماری مزمن", SortOrder = 4 }, new { Id = 5L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Companionship", NameFa = "همراهی و مراقبت روزمره", SortOrder = 5 }); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceOptionGroup", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("IsRequired") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameEn") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("NameFa") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("ServiceCategoryId") .HasColumnType("bigint"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("ServiceCategoryId", "SortOrder"); b.ToTable("ServiceOptionGroups", "catalog"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceOptionValue", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameEn") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("NameFa") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("OptionGroupId") .HasColumnType("bigint"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("OptionGroupId", "SortOrder"); b.ToTable("ServiceOptionValues", "catalog"); }); modelBuilder.Entity("Baya.Domain.Entities.Configuration.PlatformConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DataType") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("Description") .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("Key") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("Value") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("Key") .IsUnique(); b.ToTable("PlatformConfigs", "ops"); b.HasData( new { Id = 1L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "decimal", Description = "Balinyaar commission rate on the booking gross (fraction).", Key = "platform_fee_rate", Value = "0.15" }, new { Id = 2L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "decimal", Description = "VAT rate applied to the commission line only (fraction).", Key = "vat_rate", Value = "0.10" }, new { Id = 3L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Hours after check-out a booking can be disputed.", Key = "dispute_window_hours", Value = "72" }, new { Id = 4L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Minutes a family has to pay before a pending booking expires.", Key = "booking_payment_deadline_minutes", Value = "30" }, new { Id = 5L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Hours a nurse has to accept/decline a booking request.", Key = "nurse_response_deadline_hours", Value = "24" }, new { Id = 6L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Weekly payout cadence in days.", Key = "nurse_payout_interval_days", Value = "7" }, new { Id = 7L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Allowed EVV check-in distance from the care address.", Key = "evv_location_tolerance_meters", Value = "200" }, new { Id = 8L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "decimal", Description = "A review at or below this rating raises a support alert.", Key = "min_rating_for_support_alert", Value = "2" }, new { Id = 9L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "string", Description = "Who is merchant of record for BNPL orders (platform|nurse).", Key = "bnpl_merchant_of_record", Value = "platform" }, new { Id = 10L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "decimal", Description = "BNPL provider commission rate (fraction).", Key = "bnpl_provider_commission_rate", Value = "0.07" }, new { Id = 11L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "string", Description = "When BNPL settles funds to the platform (immediate|deferred).", Key = "bnpl_settlement_timing", Value = "immediate" }, new { Id = 12L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "json", Description = "Tiered cancellation refund policy: refund_percent by hours before the visit.", Key = "cancellation_tiers", Value = "[{\"min_hours_before\":48,\"refund_percent\":100},{\"min_hours_before\":24,\"refund_percent\":50},{\"min_hours_before\":0,\"refund_percent\":0}]" }, new { Id = 13L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Seconds a phone must wait before another OTP can be requested.", Key = "auth_otp_resend_seconds", Value = "120" }, new { Id = 14L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Wrong-code attempts allowed before OTP verification is refused until a fresh code.", Key = "auth_otp_max_attempts", Value = "5" }, new { Id = 15L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Refresh-token session lifetime in days.", Key = "auth_session_ttl_days", Value = "30" }, new { Id = 16L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Hours between credential-expiry scans (the scheduled cron is deferred; the scan is admin-triggered today).", Key = "verification_expiry_scan_cadence_hours", Value = "24" }, new { Id = 17L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Minutes after a session's scheduled start with no EVV check-in before it is flagged a no-show.", Key = "no_show_threshold_minutes", Value = "60" }, new { Id = 18L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DataType = "int", Description = "Hours between no-show sweeps (the scheduled cron is deferred; the sweep is admin-triggered today).", Key = "no_show_scan_cadence_hours", Value = "1" }); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.City", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameEn") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("NameFa") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("ProvinceId") .HasColumnType("bigint"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("ProvinceId", "SortOrder"); b.ToTable("Cities", "geo"); b.HasData( new { Id = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Tehran", NameFa = "تهران", ProvinceId = 1L, SortOrder = 1 }, new { Id = 102L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Karaj", NameFa = "کرج", ProvinceId = 2L, SortOrder = 1 }, new { Id = 103L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Isfahan", NameFa = "اصفهان", ProvinceId = 3L, SortOrder = 1 }, new { Id = 104L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Shiraz", NameFa = "شیراز", ProvinceId = 4L, SortOrder = 1 }, new { Id = 105L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Mashhad", NameFa = "مشهد", ProvinceId = 5L, SortOrder = 1 }, new { Id = 106L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Tabriz", NameFa = "تبریز", ProvinceId = 6L, SortOrder = 1 }, new { Id = 107L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Urmia", NameFa = "ارومیه", ProvinceId = 7L, SortOrder = 1 }, new { Id = 108L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Ahvaz", NameFa = "اهواز", ProvinceId = 8L, SortOrder = 1 }, new { Id = 109L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Qom", NameFa = "قم", ProvinceId = 9L, SortOrder = 1 }, new { Id = 110L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Kerman", NameFa = "کرمان", ProvinceId = 10L, SortOrder = 1 }, new { Id = 111L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Rasht", NameFa = "رشت", ProvinceId = 11L, SortOrder = 1 }, new { Id = 112L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Sari", NameFa = "ساری", ProvinceId = 12L, SortOrder = 1 }, new { Id = 113L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Arak", NameFa = "اراک", ProvinceId = 13L, SortOrder = 1 }, new { Id = 114L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Ardabil", NameFa = "اردبیل", ProvinceId = 14L, SortOrder = 1 }, new { Id = 115L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Qazvin", NameFa = "قزوین", ProvinceId = 15L, SortOrder = 1 }, new { Id = 116L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Kermanshah", NameFa = "کرمانشاه", ProvinceId = 16L, SortOrder = 1 }, new { Id = 117L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Bojnord", NameFa = "بجنورد", ProvinceId = 17L, SortOrder = 1 }, new { Id = 118L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Birjand", NameFa = "بیرجند", ProvinceId = 18L, SortOrder = 1 }, new { Id = 119L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Hamadan", NameFa = "همدان", ProvinceId = 19L, SortOrder = 1 }, new { Id = 120L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Sanandaj", NameFa = "سنندج", ProvinceId = 20L, SortOrder = 1 }, new { Id = 121L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Khorramabad", NameFa = "خرم‌آباد", ProvinceId = 21L, SortOrder = 1 }, new { Id = 122L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Gorgan", NameFa = "گرگان", ProvinceId = 22L, SortOrder = 1 }, new { Id = 123L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Bandar Abbas", NameFa = "بندرعباس", ProvinceId = 23L, SortOrder = 1 }, new { Id = 124L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Bushehr", NameFa = "بوشهر", ProvinceId = 24L, SortOrder = 1 }, new { Id = 125L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Zanjan", NameFa = "زنجان", ProvinceId = 25L, SortOrder = 1 }, new { Id = 126L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Semnan", NameFa = "سمنان", ProvinceId = 26L, SortOrder = 1 }, new { Id = 127L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Yazd", NameFa = "یزد", ProvinceId = 27L, SortOrder = 1 }, new { Id = 128L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Zahedan", NameFa = "زاهدان", ProvinceId = 28L, SortOrder = 1 }, new { Id = 129L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Shahrekord", NameFa = "شهرکرد", ProvinceId = 29L, SortOrder = 1 }, new { Id = 130L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Yasuj", NameFa = "یاسوج", ProvinceId = 30L, SortOrder = 1 }, new { Id = 131L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Ilam", NameFa = "ایلام", ProvinceId = 31L, SortOrder = 1 }); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.District", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CityId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameEn") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("NameFa") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("CityId", "SortOrder"); b.ToTable("Districts", "geo"); b.HasData( new { Id = 1001L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 1", NameFa = "منطقه ۱", SortOrder = 1 }, new { Id = 1002L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 2", NameFa = "منطقه ۲", SortOrder = 2 }, new { Id = 1003L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 3", NameFa = "منطقه ۳", SortOrder = 3 }, new { Id = 1004L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 4", NameFa = "منطقه ۴", SortOrder = 4 }, new { Id = 1005L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 5", NameFa = "منطقه ۵", SortOrder = 5 }, new { Id = 1006L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 6", NameFa = "منطقه ۶", SortOrder = 6 }, new { Id = 1007L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 7", NameFa = "منطقه ۷", SortOrder = 7 }, new { Id = 1008L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 8", NameFa = "منطقه ۸", SortOrder = 8 }, new { Id = 1009L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 9", NameFa = "منطقه ۹", SortOrder = 9 }, new { Id = 1010L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 10", NameFa = "منطقه ۱۰", SortOrder = 10 }, new { Id = 1011L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 11", NameFa = "منطقه ۱۱", SortOrder = 11 }, new { Id = 1012L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 12", NameFa = "منطقه ۱۲", SortOrder = 12 }, new { Id = 1013L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 13", NameFa = "منطقه ۱۳", SortOrder = 13 }, new { Id = 1014L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 14", NameFa = "منطقه ۱۴", SortOrder = 14 }, new { Id = 1015L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 15", NameFa = "منطقه ۱۵", SortOrder = 15 }, new { Id = 1016L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 16", NameFa = "منطقه ۱۶", SortOrder = 16 }, new { Id = 1017L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 17", NameFa = "منطقه ۱۷", SortOrder = 17 }, new { Id = 1018L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 18", NameFa = "منطقه ۱۸", SortOrder = 18 }, new { Id = 1019L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 19", NameFa = "منطقه ۱۹", SortOrder = 19 }, new { Id = 1020L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 20", NameFa = "منطقه ۲۰", SortOrder = 20 }, new { Id = 1021L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 21", NameFa = "منطقه ۲۱", SortOrder = 21 }, new { Id = 1022L, CityId = 101L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "District 22", NameFa = "منطقه ۲۲", SortOrder = 22 }); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.NurseServiceArea", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CityId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("DistrictId") .HasColumnType("bigint"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("CityId"); b.HasIndex("DistrictId"); b.HasIndex("NurseId", "CityId") .IsUnique() .HasDatabaseName("UX_NurseServiceAreas_Nurse_City_WholeCity") .HasFilter("[DistrictId] IS NULL AND [DeletedAt] IS NULL"); b.HasIndex("NurseId", "CityId", "DistrictId") .IsUnique() .HasDatabaseName("UX_NurseServiceAreas_Nurse_City_District") .HasFilter("[DistrictId] IS NOT NULL AND [DeletedAt] IS NULL"); b.ToTable("NurseServiceAreas", "geo"); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.Province", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameEn") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("NameFa") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("SortOrder"); b.ToTable("Provinces", "geo"); b.HasData( new { Id = 1L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Tehran", NameFa = "تهران", SortOrder = 1 }, new { Id = 2L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Alborz", NameFa = "البرز", SortOrder = 2 }, new { Id = 3L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Isfahan", NameFa = "اصفهان", SortOrder = 3 }, new { Id = 4L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Fars", NameFa = "فارس", SortOrder = 4 }, new { Id = 5L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Razavi Khorasan", NameFa = "خراسان رضوی", SortOrder = 5 }, new { Id = 6L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "East Azerbaijan", NameFa = "آذربایجان شرقی", SortOrder = 6 }, new { Id = 7L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "West Azerbaijan", NameFa = "آذربایجان غربی", SortOrder = 7 }, new { Id = 8L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Khuzestan", NameFa = "خوزستان", SortOrder = 8 }, new { Id = 9L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Qom", NameFa = "قم", SortOrder = 9 }, new { Id = 10L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Kerman", NameFa = "کرمان", SortOrder = 10 }, new { Id = 11L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Gilan", NameFa = "گیلان", SortOrder = 11 }, new { Id = 12L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Mazandaran", NameFa = "مازندران", SortOrder = 12 }, new { Id = 13L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Markazi", NameFa = "مرکزی", SortOrder = 13 }, new { Id = 14L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Ardabil", NameFa = "اردبیل", SortOrder = 14 }, new { Id = 15L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Qazvin", NameFa = "قزوین", SortOrder = 15 }, new { Id = 16L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Kermanshah", NameFa = "کرمانشاه", SortOrder = 16 }, new { Id = 17L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "North Khorasan", NameFa = "خراسان شمالی", SortOrder = 17 }, new { Id = 18L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "South Khorasan", NameFa = "خراسان جنوبی", SortOrder = 18 }, new { Id = 19L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Hamadan", NameFa = "همدان", SortOrder = 19 }, new { Id = 20L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Kurdistan", NameFa = "کردستان", SortOrder = 20 }, new { Id = 21L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Lorestan", NameFa = "لرستان", SortOrder = 21 }, new { Id = 22L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Golestan", NameFa = "گلستان", SortOrder = 22 }, new { Id = 23L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Hormozgan", NameFa = "هرمزگان", SortOrder = 23 }, new { Id = 24L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Bushehr", NameFa = "بوشهر", SortOrder = 24 }, new { Id = 25L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Zanjan", NameFa = "زنجان", SortOrder = 25 }, new { Id = 26L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Semnan", NameFa = "سمنان", SortOrder = 26 }, new { Id = 27L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Yazd", NameFa = "یزد", SortOrder = 27 }, new { Id = 28L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Sistan and Baluchestan", NameFa = "سیستان و بلوچستان", SortOrder = 28 }, new { Id = 29L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Chaharmahal and Bakhtiari", NameFa = "چهارمحال و بختیاری", SortOrder = 29 }, new { Id = 30L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Kohgiluyeh and Boyer-Ahmad", NameFa = "کهگیلویه و بویراحمد", SortOrder = 30 }, new { Id = 31L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), IsActive = true, NameEn = "Ilam", NameFa = "ایلام", SortOrder = 31 }); }); modelBuilder.Entity("Baya.Domain.Entities.Holidays.IranianHoliday", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("HolidayDate") .HasColumnType("date"); b.Property("IsBankClosed") .HasColumnType("bit"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NameFa") .IsRequired() .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.HasKey("Id"); b.HasIndex("HolidayDate") .IsUnique(); b.ToTable("IranianHolidays", "ops"); b.HasData( new { Id = 1L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 2, 11), IsBankClosed = true, NameFa = "پیروزی انقلاب اسلامی", Type = "national" }, new { Id = 2L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 3, 21), IsBankClosed = true, NameFa = "نوروز", Type = "national" }, new { Id = 3L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 3, 22), IsBankClosed = true, NameFa = "نوروز", Type = "national" }, new { Id = 4L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 3, 23), IsBankClosed = true, NameFa = "نوروز", Type = "national" }, new { Id = 5L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 3, 24), IsBankClosed = true, NameFa = "نوروز", Type = "national" }, new { Id = 6L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 4, 1), IsBankClosed = true, NameFa = "روز طبیعت (سیزده‌به‌در)", Type = "official" }, new { Id = 7L, CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), HolidayDate = new DateOnly(2026, 6, 26), IsBankClosed = true, NameFa = "عید سعید قربان", Type = "religious" }); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.CustomerAddress", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AddressLine") .HasColumnType("nvarchar(max)"); b.Property("CityId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("CustomerId") .HasColumnType("bigint"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("DistrictId") .HasColumnType("bigint"); b.Property("IsPrimary") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("Latitude") .HasPrecision(9, 6) .HasColumnType("decimal(9,6)"); b.Property("Longitude") .HasPrecision(9, 6) .HasColumnType("decimal(9,6)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("PostalCode") .HasColumnType("nvarchar(max)"); b.Property("RecipientName") .HasColumnType("nvarchar(max)"); b.Property("RecipientPhone") .HasColumnType("nvarchar(max)"); b.Property("Title") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.HasKey("Id"); b.HasIndex("CityId"); b.HasIndex("CustomerId") .IsUnique() .HasDatabaseName("UX_CustomerAddresses_Customer_Primary") .HasFilter("[IsPrimary] = 1 AND [DeletedAt] IS NULL"); b.HasIndex("DistrictId"); b.ToTable("CustomerAddresses", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.CustomerProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DefaultEmergencyContactName") .HasColumnType("nvarchar(max)"); b.Property("DefaultEmergencyContactPhone") .HasColumnType("nvarchar(max)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId") .IsUnique(); b.ToTable("CustomerProfiles", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.NurseBankAccount", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AccountHolderFromBank") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("AccountHolderName") .HasColumnType("nvarchar(max)"); b.Property("BankName") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("Iban") .HasColumnType("nvarchar(max)"); b.Property("IbanHash") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("IsPrimary") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("IsVerified") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("MatchedNationalId") .HasColumnType("bit"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("OwnershipVendorRef") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("VerifiedAt") .HasColumnType("datetimeoffset"); b.Property("VerifiedByAdminId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("IbanHash") .IsUnique(); b.HasIndex("NurseId") .IsUnique() .HasDatabaseName("UX_NurseBankAccounts_NurseId_Primary") .HasFilter("[IsPrimary] = 1"); b.HasIndex("VerifiedByAdminId"); b.ToTable("NurseBankAccounts", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.NurseProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AverageRating") .ValueGeneratedOnAdd() .HasPrecision(3, 2) .HasColumnType("decimal(3,2)") .HasDefaultValue(0m); b.Property("Bio") .HasMaxLength(2000) .HasColumnType("nvarchar(2000)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("EducationField") .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("EducationLevel") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("IsAcceptingBookings") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("IsVerified") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("PartnerCenterId") .HasColumnType("bigint"); b.Property("SpecializationsJson") .HasColumnType("nvarchar(max)"); b.Property("TotalCompletedBookings") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.Property("TotalReviews") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.Property("UserId") .HasColumnType("int"); b.Property("YearsOfExperience") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId") .IsUnique(); b.ToTable("NurseProfiles", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.Patient", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BirthDate") .HasColumnType("date"); b.Property("BloodType") .HasMaxLength(10) .HasColumnType("nvarchar(10)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("CustomerId") .HasColumnType("bigint"); b.Property("DisplayName") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("FirstName") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Gender") .IsRequired() .HasMaxLength(10) .HasColumnType("nvarchar(10)"); b.Property("InitialMedicalNotes") .HasColumnType("nvarchar(max)"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("LastName") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CustomerId"); b.ToTable("Patients", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.Notifications.Notification", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Body") .HasColumnType("nvarchar(max)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("DataJson") .HasColumnType("nvarchar(max)"); b.Property("IsRead") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("ReadAt") .HasColumnType("datetimeoffset"); b.Property("Title") .IsRequired() .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId", "IsRead", "CreatedAt"); b.ToTable("Notifications", "ops"); }); modelBuilder.Entity("Baya.Domain.Entities.Search.NurseSearchIndex", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AverageRating") .HasPrecision(3, 2) .HasColumnType("decimal(3,2)"); b.Property("CityId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("DistrictId") .HasColumnType("bigint"); b.Property("IsSearchable") .HasColumnType("bit"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseGender") .HasMaxLength(10) .HasColumnType("nvarchar(10)"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("Price") .HasColumnType("bigint"); b.Property("PriceUnit") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("ServiceCategoryId") .HasColumnType("bigint"); b.Property("TotalCompletedBookings") .HasColumnType("int"); b.Property("TotalReviews") .HasColumnType("int"); b.Property("UpdatedAt") .HasColumnType("datetimeoffset"); b.Property("VariantId") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("NurseId"); b.HasIndex("VariantId", "CityId") .IsUnique() .HasDatabaseName("UX_NurseSearchIndex_Variant_City_WholeCity") .HasFilter("[DistrictId] IS NULL AND [DeletedAt] IS NULL"); b.HasIndex("VariantId", "CityId", "DistrictId") .IsUnique() .HasDatabaseName("UX_NurseSearchIndex_Variant_City_District") .HasFilter("[DistrictId] IS NOT NULL AND [DeletedAt] IS NULL"); b.HasIndex("IsSearchable", "ServiceCategoryId", "CityId", "DistrictId") .HasDatabaseName("IX_NurseSearchIndex_Search"); SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("IsSearchable", "ServiceCategoryId", "CityId", "DistrictId"), new[] { "Price", "NurseGender", "AverageRating", "TotalReviews", "NurseId", "VariantId" }); b.ToTable("NurseSearchIndices", "search"); }); modelBuilder.Entity("Baya.Domain.Entities.SupportAlerts.SupportAlert", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BookingId") .HasColumnType("bigint"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("EntityId") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("EntityType") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("OwnerUserId") .HasColumnType("int"); b.Property("ResolutionNote") .HasColumnType("nvarchar(max)"); b.Property("ResolvedAt") .HasColumnType("datetimeoffset"); b.Property("ReviewId") .HasColumnType("bigint"); b.Property("Severity") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("Status") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("Type") .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)"); b.HasKey("Id"); b.HasIndex("OwnerUserId"); b.HasIndex("Status"); b.HasIndex("Type"); b.ToTable("SupportAlerts", "ops"); }); modelBuilder.Entity("Baya.Domain.Entities.User.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("nvarchar(max)"); b.Property("CreatedDate") .HasColumnType("datetime2"); b.Property("DisplayName") .HasColumnType("nvarchar(max)"); b.Property("Name") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex") .HasFilter("[NormalizedName] IS NOT NULL"); b.ToTable("Roles", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.RoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("nvarchar(max)"); b.Property("ClaimValue") .HasColumnType("nvarchar(max)"); b.Property("CreatedClaim") .HasColumnType("datetime2"); b.Property("RoleId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("RoleClaims", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int") .HasColumnName("UserId"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AccessFailedCount") .HasColumnType("int"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("nvarchar(max)"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("Email") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("EmailConfirmed") .HasColumnType("bit"); b.Property("FamilyName") .HasColumnType("nvarchar(max)"); b.Property("Gender") .HasMaxLength(10) .HasColumnType("nvarchar(10)"); b.Property("GeneratedCode") .HasColumnType("nvarchar(max)"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("LockoutEnabled") .HasColumnType("bit"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnType("nvarchar(max)"); b.Property("NationalId") .HasColumnType("nvarchar(max)"); b.Property("NationalIdVerifiedAt") .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("PasswordHash") .HasColumnType("nvarchar(max)"); b.Property("PhoneHash") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("PhoneNumber") .HasColumnType("nvarchar(max)"); b.Property("PhoneNumberConfirmed") .HasColumnType("bit"); b.Property("PhoneVerifiedAt") .HasColumnType("datetimeoffset"); b.Property("SecurityStamp") .HasColumnType("nvarchar(max)"); b.Property("ShahkarVerifiedAt") .HasColumnType("datetimeoffset"); b.Property("TwoFactorEnabled") .HasColumnType("bit"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex") .HasFilter("[NormalizedUserName] IS NOT NULL"); b.HasIndex("PhoneHash") .IsUnique() .HasFilter("[PhoneHash] IS NOT NULL"); b.ToTable("Users", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("nvarchar(max)"); b.Property("ClaimValue") .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("UserClaims", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserLogin", b => { b.Property("LoginProvider") .HasColumnType("nvarchar(450)"); b.Property("ProviderKey") .HasColumnType("nvarchar(450)"); b.Property("LoggedOn") .HasColumnType("datetime2"); b.Property("ProviderDisplayName") .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("UserLogins", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserRefreshToken", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("IsValid") .HasColumnType("bit"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("UserRefreshTokens", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserRole", b => { b.Property("UserId") .HasColumnType("int"); b.Property("RoleId") .HasColumnType("int"); b.Property("CreatedUserRoleDate") .HasColumnType("datetime2"); b.Property("GrantedAt") .HasColumnType("datetimeoffset"); b.Property("GrantedById") .HasColumnType("int"); b.Property("RevokedAt") .HasColumnType("datetimeoffset"); b.HasKey("UserId", "RoleId"); b.HasIndex("GrantedById"); b.HasIndex("RoleId"); b.ToTable("UserRoles", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserSession", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeviceInfo") .HasMaxLength(400) .HasColumnType("nvarchar(400)"); b.Property("ExpiresAt") .HasColumnType("datetimeoffset"); b.Property("IpAddress") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("IsRevoked") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("RefreshTokenHash") .IsRequired() .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.Property("RevokedAt") .HasColumnType("datetimeoffset"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("RefreshTokenHash") .IsUnique(); b.HasIndex("UserId", "IsRevoked"); b.ToTable("UserSessions", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserToken", b => { b.Property("UserId") .HasColumnType("int"); b.Property("LoginProvider") .HasColumnType("nvarchar(450)"); b.Property("Name") .HasColumnType("nvarchar(450)"); b.Property("GeneratedTime") .HasColumnType("datetime2"); b.Property("Value") .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("UserTokens", "usr"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.NurseCredential", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("CredentialNumber") .IsRequired() .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("CredentialType") .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("ExpiresAt") .HasColumnType("date"); b.Property("HolderNameSnapshot") .IsRequired() .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("IssuedAt") .HasColumnType("date"); b.Property("IssuingAuthority") .IsRequired() .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("VerificationMethod") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("VerificationSource") .HasMaxLength(300) .HasColumnType("nvarchar(300)"); b.Property("VerifiedByAdminId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("VerifiedByAdminId"); b.HasIndex("NurseId", "CredentialType"); b.ToTable("NurseCredentials", "verif"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.NurseVerification", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ApprovedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("InternalNotes") .HasMaxLength(2000) .HasColumnType("nvarchar(2000)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseId") .HasColumnType("bigint"); b.Property("RejectedAt") .HasColumnType("datetimeoffset"); b.Property("RejectionReason") .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); b.Property("ReviewedByAdminId") .HasColumnType("int"); b.Property("Status") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("SubmittedAt") .HasColumnType("datetimeoffset"); b.Property("SuspendedAt") .HasColumnType("datetimeoffset"); b.HasKey("Id"); b.HasIndex("NurseId") .IsUnique(); b.HasIndex("ReviewedByAdminId"); b.ToTable("NurseVerifications", "verif"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationDocument", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ContentType") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("DeletedAt") .HasColumnType("datetimeoffset"); b.Property("FileSizeBytes") .HasColumnType("bigint"); b.Property("IntegrityHash") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("ObjectStorageKey") .IsRequired() .HasMaxLength(400) .HasColumnType("nvarchar(400)"); b.Property("OriginalFileName") .HasMaxLength(260) .HasColumnType("nvarchar(260)"); b.Property("StepId") .HasColumnType("bigint"); b.Property("UploadedByUserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("StepId"); b.HasIndex("UploadedByUserId"); b.ToTable("VerificationDocuments", "verif"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationStep", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CompletedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("ExpiresAt") .HasColumnType("datetimeoffset"); b.Property("ExternalResponseJson") .HasColumnType("nvarchar(max)"); b.Property("FailureReason") .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("IsAutomated") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("NurseVerificationId") .HasColumnType("bigint"); b.Property("StartedAt") .HasColumnType("datetimeoffset"); b.Property("Status") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("StepTypeId") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("StepTypeId"); b.HasIndex("NurseVerificationId", "StepTypeId") .IsUnique() .HasDatabaseName("UX_VerificationSteps_Verification_StepType"); b.ToTable("VerificationSteps", "verif"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationStepType", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AutomationProvider") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("CreatedAt") .HasColumnType("datetimeoffset"); b.Property("CreatedById") .HasColumnType("int"); b.Property("Description") .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(true); b.Property("IsAutomated") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("IsRequired") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false); b.Property("ModifiedAt") .HasColumnType("datetimeoffset"); b.Property("ModifiedById") .HasColumnType("int"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("int") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("Code") .IsUnique(); b.HasIndex("IsActive", "SortOrder"); b.ToTable("VerificationStepTypes", "verif"); b.HasData( new { Id = 1L, AutomationProvider = "identity_kyc_vendor", Code = "identity_kyc", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), Description = "National-ID validity, name match and photo/video liveness via an Iranian e-KYC vendor.", DisplayName = "Identity Verification (KYC)", IsActive = true, IsAutomated = true, IsRequired = true, SortOrder = 1 }, new { Id = 2L, AutomationProvider = "shahkar", Code = "shahkar_match", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), Description = "Confirms the login SIM is registered to the nurse's own national ID (شاهکار).", DisplayName = "Shahkar Phone Binding", IsActive = true, IsAutomated = true, IsRequired = true, SortOrder = 2 }, new { Id = 3L, Code = "moh_competency_license", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), Description = "پروانه صلاحیت حرفه‌ای — the MoH-mandated in-home nursing licence (bundles the criminal-record screen). Manual today.", DisplayName = "MoH Professional Competency License", IsActive = true, IsAutomated = false, IsRequired = true, SortOrder = 3 }, new { Id = 4L, Code = "ino_membership", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), Description = "نظام پرستاری membership cross-check (ino.ir). Manual today.", DisplayName = "Nursing Organization (INO) Membership", IsActive = true, IsAutomated = false, IsRequired = true, SortOrder = 4 }, new { Id = 5L, Code = "criminal_record", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), Description = "عدم سوء پیشینه — consent-gated, nurse-uploaded, time-limited (reverts on expiry).", DisplayName = "Criminal Record Certificate", IsActive = true, IsAutomated = false, IsRequired = true, SortOrder = 5 }, new { Id = 6L, AutomationProvider = "sheba", Code = "bank_account_verification", CreatedAt = new DateTimeOffset(new DateTime(2026, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), Description = "استعلام شبا — the payout IBAN owner's national ID must equal the verified nurse national ID.", DisplayName = "Bank Account (IBAN) Ownership", IsActive = true, IsAutomated = true, IsRequired = true, SortOrder = 6 }); }); modelBuilder.Entity("Baya.Domain.Entities.Analytics.SystemEvent", b => { b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("UserId"); }); modelBuilder.Entity("Baya.Domain.Entities.Audit.AuditLog", b => { b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("ActorUserId"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.Booking", b => { b.HasOne("Baya.Domain.Entities.Booking.BookingRequest", null) .WithOne() .HasForeignKey("Baya.Domain.Entities.Booking.Booking", "BookingRequestId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.CustomerAddress", null) .WithMany() .HasForeignKey("CustomerAddressId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.CustomerProfile", null) .WithMany() .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", null) .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.Patient", null) .WithMany() .HasForeignKey("PatientId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Catalog.NurseServiceVariant", null) .WithMany() .HasForeignKey("VariantId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingCareInstruction", b => { b.HasOne("Baya.Domain.Entities.Booking.Booking", "Booking") .WithOne("CareInstructions") .HasForeignKey("Baya.Domain.Entities.Booking.BookingCareInstruction", "BookingId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Booking"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingRequest", b => { b.HasOne("Baya.Domain.Entities.Identity.CustomerAddress", "CustomerAddress") .WithMany() .HasForeignKey("CustomerAddressId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.CustomerProfile", "Customer") .WithMany() .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", "Nurse") .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.Patient", "Patient") .WithMany() .HasForeignKey("PatientId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Catalog.NurseServiceVariant", "Variant") .WithMany() .HasForeignKey("VariantId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Customer"); b.Navigation("CustomerAddress"); b.Navigation("Nurse"); b.Navigation("Patient"); b.Navigation("Variant"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingSession", b => { b.HasOne("Baya.Domain.Entities.Booking.Booking", "Booking") .WithMany("Sessions") .HasForeignKey("BookingId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Booking"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.VisitVerification", b => { b.HasOne("Baya.Domain.Entities.Booking.BookingSession", "Session") .WithOne("Verification") .HasForeignKey("Baya.Domain.Entities.Booking.VisitVerification", "BookingSessionId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Session"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.NurseServiceVariant", b => { b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", "Nurse") .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Catalog.ServiceCategory", "ServiceCategory") .WithMany("Variants") .HasForeignKey("ServiceCategoryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Nurse"); b.Navigation("ServiceCategory"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.NurseServiceVariantOption", b => { b.HasOne("Baya.Domain.Entities.Catalog.ServiceOptionGroup", "OptionGroup") .WithMany() .HasForeignKey("OptionGroupId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Catalog.ServiceOptionValue", "OptionValue") .WithMany() .HasForeignKey("OptionValueId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Catalog.NurseServiceVariant", "Variant") .WithMany("Options") .HasForeignKey("VariantId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("OptionGroup"); b.Navigation("OptionValue"); b.Navigation("Variant"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceOptionGroup", b => { b.HasOne("Baya.Domain.Entities.Catalog.ServiceCategory", "ServiceCategory") .WithMany("OptionGroups") .HasForeignKey("ServiceCategoryId"); b.Navigation("ServiceCategory"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceOptionValue", b => { b.HasOne("Baya.Domain.Entities.Catalog.ServiceOptionGroup", "OptionGroup") .WithMany("Values") .HasForeignKey("OptionGroupId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("OptionGroup"); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.City", b => { b.HasOne("Baya.Domain.Entities.Geography.Province", "Province") .WithMany("Cities") .HasForeignKey("ProvinceId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Province"); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.District", b => { b.HasOne("Baya.Domain.Entities.Geography.City", "City") .WithMany("Districts") .HasForeignKey("CityId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("City"); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.NurseServiceArea", b => { b.HasOne("Baya.Domain.Entities.Geography.City", "City") .WithMany() .HasForeignKey("CityId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Geography.District", "District") .WithMany() .HasForeignKey("DistrictId"); b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", null) .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("City"); b.Navigation("District"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.CustomerAddress", b => { b.HasOne("Baya.Domain.Entities.Geography.City", "City") .WithMany() .HasForeignKey("CityId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Identity.CustomerProfile", "Customer") .WithMany() .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Geography.District", "District") .WithMany() .HasForeignKey("DistrictId"); b.Navigation("City"); b.Navigation("Customer"); b.Navigation("District"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.CustomerProfile", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithOne() .HasForeignKey("Baya.Domain.Entities.Identity.CustomerProfile", "UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.NurseBankAccount", b => { b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", "Nurse") .WithMany("BankAccounts") .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("VerifiedByAdminId"); b.Navigation("Nurse"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.NurseProfile", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithOne() .HasForeignKey("Baya.Domain.Entities.Identity.NurseProfile", "UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.Patient", b => { b.HasOne("Baya.Domain.Entities.Identity.CustomerProfile", "Customer") .WithMany("Patients") .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Customer"); }); modelBuilder.Entity("Baya.Domain.Entities.Notifications.Notification", b => { b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); }); modelBuilder.Entity("Baya.Domain.Entities.Search.NurseSearchIndex", b => { b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", null) .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Catalog.NurseServiceVariant", "Variant") .WithMany() .HasForeignKey("VariantId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Variant"); }); modelBuilder.Entity("Baya.Domain.Entities.SupportAlerts.SupportAlert", b => { b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("OwnerUserId"); }); modelBuilder.Entity("Baya.Domain.Entities.User.RoleClaim", b => { b.HasOne("Baya.Domain.Entities.User.Role", "Role") .WithMany("Claims") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Role"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserClaim", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithMany("Claims") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserLogin", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithMany("Logins") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserRefreshToken", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithMany("UserRefreshTokens") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserRole", b => { b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("GrantedById"); b.HasOne("Baya.Domain.Entities.User.Role", "Role") .WithMany("Users") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.User.User", "User") .WithMany("UserRoles") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Role"); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserSession", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithMany("Sessions") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.User.UserToken", b => { b.HasOne("Baya.Domain.Entities.User.User", "User") .WithMany("Tokens") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.NurseCredential", b => { b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", null) .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("VerifiedByAdminId"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.NurseVerification", b => { b.HasOne("Baya.Domain.Entities.Identity.NurseProfile", "Nurse") .WithMany() .HasForeignKey("NurseId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("ReviewedByAdminId"); b.Navigation("Nurse"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationDocument", b => { b.HasOne("Baya.Domain.Entities.Verification.VerificationStep", "Step") .WithMany("Documents") .HasForeignKey("StepId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.User.User", null) .WithMany() .HasForeignKey("UploadedByUserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Step"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationStep", b => { b.HasOne("Baya.Domain.Entities.Verification.NurseVerification", "NurseVerification") .WithMany("Steps") .HasForeignKey("NurseVerificationId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Baya.Domain.Entities.Verification.VerificationStepType", "StepType") .WithMany("Steps") .HasForeignKey("StepTypeId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("NurseVerification"); b.Navigation("StepType"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.Booking", b => { b.Navigation("CareInstructions"); b.Navigation("Sessions"); }); modelBuilder.Entity("Baya.Domain.Entities.Booking.BookingSession", b => { b.Navigation("Verification"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.NurseServiceVariant", b => { b.Navigation("Options"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceCategory", b => { b.Navigation("OptionGroups"); b.Navigation("Variants"); }); modelBuilder.Entity("Baya.Domain.Entities.Catalog.ServiceOptionGroup", b => { b.Navigation("Values"); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.City", b => { b.Navigation("Districts"); }); modelBuilder.Entity("Baya.Domain.Entities.Geography.Province", b => { b.Navigation("Cities"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.CustomerProfile", b => { b.Navigation("Patients"); }); modelBuilder.Entity("Baya.Domain.Entities.Identity.NurseProfile", b => { b.Navigation("BankAccounts"); }); modelBuilder.Entity("Baya.Domain.Entities.User.Role", b => { b.Navigation("Claims"); b.Navigation("Users"); }); modelBuilder.Entity("Baya.Domain.Entities.User.User", b => { b.Navigation("Claims"); b.Navigation("Logins"); b.Navigation("Sessions"); b.Navigation("Tokens"); b.Navigation("UserRefreshTokens"); b.Navigation("UserRoles"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.NurseVerification", b => { b.Navigation("Steps"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationStep", b => { b.Navigation("Documents"); }); modelBuilder.Entity("Baya.Domain.Entities.Verification.VerificationStepType", b => { b.Navigation("Steps"); }); #pragma warning restore 612, 618 } } }