Files
baya-monorepo/server/src/Infrastructure/Baya.Infrastructure.Persistence/Migrations/20260706152603_BookingsSessionsEvvCancellation.Designer.cs
T
2026-07-06 19:23:44 +03:30

4193 lines
171 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// <auto-generated />
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
{
/// <inheritdoc />
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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset>("OccurredAt")
.HasColumnType("datetimeoffset");
b.Property<string>("PropsJson")
.HasColumnType("nvarchar(max)");
b.Property<int?>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Action")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<int?>("ActorUserId")
.HasColumnType("int");
b.Property<string>("ChangedFieldsJson")
.HasColumnType("nvarchar(max)");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("EntityType")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("AddressSnapshotJson")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<long>("BalinyaarCommissionIrr")
.HasColumnType("bigint");
b.Property<long>("BookingRequestId")
.HasColumnType("bigint");
b.Property<string>("CancellationPolicyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("CancellationReason")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<decimal?>("CancellationRefundPercentage")
.HasPrecision(5, 2)
.HasColumnType("decimal(5,2)");
b.Property<DateTime?>("CancelledAt")
.HasColumnType("datetime2");
b.Property<string>("CancelledBy")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("CompletedAt")
.HasColumnType("datetime2");
b.Property<DateTime?>("ConfirmedAt")
.HasColumnType("datetime2");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<long>("CustomerAddressId")
.HasColumnType("bigint");
b.Property<long>("CustomerId")
.HasColumnType("bigint");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTime?>("DisputeWindowEndsAt")
.HasColumnType("datetime2");
b.Property<long>("GrossPriceIrr")
.HasColumnType("bigint");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<long>("NursePayoutAmount")
.HasColumnType("bigint");
b.Property<long?>("PartnerCenterId")
.HasColumnType("bigint");
b.Property<long>("PatientId")
.HasColumnType("bigint");
b.Property<decimal>("PlatformFeeRate")
.HasPrecision(5, 4)
.HasColumnType("decimal(5,4)");
b.Property<long?>("PspFeeAmount")
.HasColumnType("bigint");
b.Property<long?>("RefundableAmountIrr")
.HasColumnType("bigint");
b.Property<DateOnly>("ScheduledDate")
.HasColumnType("date");
b.Property<TimeOnly>("ScheduledTimeEnd")
.HasColumnType("time");
b.Property<TimeOnly>("ScheduledTimeStart")
.HasColumnType("time");
b.Property<short>("SessionCount")
.HasColumnType("smallint");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<long>("VariantId")
.HasColumnType("bigint");
b.Property<string>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Allergies")
.HasColumnType("nvarchar(max)");
b.Property<long>("BookingId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("CurrentConditions")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("EmergencyContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("EmergencyContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<string>("Medications")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<long>("CustomerAddressId")
.HasColumnType("bigint");
b.Property<long>("CustomerId")
.HasColumnType("bigint");
b.Property<string>("CustomerNotes")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<string>("NurseRejectionReason")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<DateTime>("NurseResponseDeadlineAt")
.HasColumnType("datetime2");
b.Property<long>("PatientId")
.HasColumnType("bigint");
b.Property<DateTime?>("PaymentDeadlineAt")
.HasColumnType("datetime2");
b.Property<DateOnly>("RequestedDate")
.HasColumnType("date");
b.Property<TimeOnly>("RequestedTimeEnd")
.HasColumnType("time");
b.Property<TimeOnly>("RequestedTimeStart")
.HasColumnType("time");
b.Property<string>("RequiredCaregiverGender")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<long>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<long>("BookingId")
.HasColumnType("bigint");
b.Property<long?>("CancellationEventId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<DateTime?>("PayoutEligibleAt")
.HasColumnType("datetime2");
b.Property<DateOnly>("ScheduledDate")
.HasColumnType("date");
b.Property<TimeOnly>("ScheduledTimeEnd")
.HasColumnType("time");
b.Property<TimeOnly>("ScheduledTimeStart")
.HasColumnType("time");
b.Property<int>("SessionIndex")
.HasColumnType("int");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<long>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("AppliesTo")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<long>("FeeAmountIrr")
.HasColumnType("bigint");
b.Property<decimal?>("FeeRate")
.HasPrecision(5, 4)
.HasColumnType("decimal(5,4)");
b.Property<int?>("HoursBeforeStartMax")
.HasColumnType("int");
b.Property<int?>("HoursBeforeStartMin")
.HasColumnType("int");
b.Property<bool>("IsActive")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<decimal>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<long>("BookingSessionId")
.HasColumnType("bigint");
b.Property<bool?>("CheckInAddressMatch")
.HasColumnType("bit");
b.Property<DateTime?>("CheckInAt")
.HasColumnType("datetime2");
b.Property<decimal?>("CheckInDistanceMeters")
.HasPrecision(10, 2)
.HasColumnType("decimal(10,2)");
b.Property<decimal?>("CheckInLat")
.HasPrecision(9, 6)
.HasColumnType("decimal(9,6)");
b.Property<decimal?>("CheckInLng")
.HasPrecision(9, 6)
.HasColumnType("decimal(9,6)");
b.Property<DateTime?>("CheckOutAt")
.HasColumnType("datetime2");
b.Property<decimal?>("CheckOutLat")
.HasPrecision(9, 6)
.HasColumnType("decimal(9,6)");
b.Property<decimal?>("CheckOutLng")
.HasPrecision(9, 6)
.HasColumnType("decimal(9,6)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("nvarchar(300)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<string>("OptionSetHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<long>("Price")
.HasColumnType("bigint");
b.Property<string>("PriceUnit")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<long>("ServiceCategoryId")
.HasColumnType("bigint");
b.Property<int?>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("OptionGroupId")
.HasColumnType("bigint");
b.Property<long>("OptionValueId")
.HasColumnType("bigint");
b.Property<long>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("DescriptionEn")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<string>("DescriptionFa")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<string>("IconKey")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameEn")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsRequired")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameEn")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<long?>("ServiceCategoryId")
.HasColumnType("bigint");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameEn")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<long>("OptionGroupId")
.HasColumnType("bigint");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("DataType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameEn")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<long>("ProvinceId")
.HasColumnType("bigint");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<long>("CityId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameEn")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<long>("CityId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<long?>("DistrictId")
.HasColumnType("bigint");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameEn")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateOnly>("HolidayDate")
.HasColumnType("date");
b.Property<bool>("IsBankClosed")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NameFa")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("AddressLine")
.HasColumnType("nvarchar(max)");
b.Property<long>("CityId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<long>("CustomerId")
.HasColumnType("bigint");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<long?>("DistrictId")
.HasColumnType("bigint");
b.Property<bool>("IsPrimary")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<decimal?>("Latitude")
.HasPrecision(9, 6)
.HasColumnType("decimal(9,6)");
b.Property<decimal?>("Longitude")
.HasPrecision(9, 6)
.HasColumnType("decimal(9,6)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("PostalCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("RecipientName")
.HasColumnType("nvarchar(max)");
b.Property<string>("RecipientPhone")
.HasColumnType("nvarchar(max)");
b.Property<string>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("DefaultEmergencyContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("DefaultEmergencyContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<int>("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId")
.IsUnique();
b.ToTable("CustomerProfiles", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.Identity.NurseBankAccount", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("AccountHolderFromBank")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("AccountHolderName")
.HasColumnType("nvarchar(max)");
b.Property<string>("BankName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("Iban")
.HasColumnType("nvarchar(max)");
b.Property<string>("IbanHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsPrimary")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsVerified")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool?>("MatchedNationalId")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<string>("OwnershipVendorRef")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTimeOffset?>("VerifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<decimal>("AverageRating")
.ValueGeneratedOnAdd()
.HasPrecision(3, 2)
.HasColumnType("decimal(3,2)")
.HasDefaultValue(0m);
b.Property<string>("Bio")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("EducationField")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("EducationLevel")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("IsAcceptingBookings")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsVerified")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long?>("PartnerCenterId")
.HasColumnType("bigint");
b.Property<string>("SpecializationsJson")
.HasColumnType("nvarchar(max)");
b.Property<int>("TotalCompletedBookings")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<int>("TotalReviews")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<int>("UserId")
.HasColumnType("int");
b.Property<int>("YearsOfExperience")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId")
.IsUnique();
b.ToTable("NurseProfiles", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.Identity.Patient", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateOnly>("BirthDate")
.HasColumnType("date");
b.Property<string>("BloodType")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<long>("CustomerId")
.HasColumnType("bigint");
b.Property<string>("DisplayName")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("FirstName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("Gender")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<string>("InitialMedicalNotes")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<string>("LastName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CustomerId");
b.ToTable("Patients", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.Notifications.Notification", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Body")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("DataJson")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsRead")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("ReadAt")
.HasColumnType("datetimeoffset");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<decimal>("AverageRating")
.HasPrecision(3, 2)
.HasColumnType("decimal(3,2)");
b.Property<long>("CityId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<long?>("DistrictId")
.HasColumnType("bigint");
b.Property<bool>("IsSearchable")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("NurseGender")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<long>("Price")
.HasColumnType("bigint");
b.Property<string>("PriceUnit")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<long>("ServiceCategoryId")
.HasColumnType("bigint");
b.Property<int>("TotalCompletedBookings")
.HasColumnType("int");
b.Property<int>("TotalReviews")
.HasColumnType("int");
b.Property<DateTimeOffset>("UpdatedAt")
.HasColumnType("datetimeoffset");
b.Property<long>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<long?>("BookingId")
.HasColumnType("bigint");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("EntityType")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<int?>("OwnerUserId")
.HasColumnType("int");
b.Property<string>("ResolutionNote")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("ResolvedAt")
.HasColumnType("datetimeoffset");
b.Property<long?>("ReviewId")
.HasColumnType("bigint");
b.Property<string>("Severity")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime2");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedClaim")
.HasColumnType("datetime2");
b.Property<int>("RoleId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("RoleClaims", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.User.User", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("UserId");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<string>("FamilyName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Gender")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<string>("GeneratedCode")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("NationalId")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("NationalIdVerifiedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneHash")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("PhoneVerifiedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTimeOffset?>("ShahkarVerifiedAt")
.HasColumnType("datetimeoffset");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("bit");
b.Property<string>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<int>("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UserClaims", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.User.UserLogin", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("LoggedOn")
.HasColumnType("datetime2");
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("UserId")
.HasColumnType("int");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("UserLogins", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.User.UserRefreshToken", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<bool>("IsValid")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<int>("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UserRefreshTokens", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.User.UserRole", b =>
{
b.Property<int>("UserId")
.HasColumnType("int");
b.Property<int>("RoleId")
.HasColumnType("int");
b.Property<DateTime>("CreatedUserRoleDate")
.HasColumnType("datetime2");
b.Property<DateTimeOffset>("GrantedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("GrantedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("DeviceInfo")
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<DateTimeOffset>("ExpiresAt")
.HasColumnType("datetimeoffset");
b.Property<string>("IpAddress")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsRevoked")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("RefreshTokenHash")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<DateTimeOffset?>("RevokedAt")
.HasColumnType("datetimeoffset");
b.Property<int>("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<int>("UserId")
.HasColumnType("int");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("Name")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("GeneratedTime")
.HasColumnType("datetime2");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("UserTokens", "usr");
});
modelBuilder.Entity("Baya.Domain.Entities.Verification.NurseCredential", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("CredentialNumber")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("CredentialType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<DateOnly?>("ExpiresAt")
.HasColumnType("date");
b.Property<string>("HolderNameSnapshot")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateOnly?>("IssuedAt")
.HasColumnType("date");
b.Property<string>("IssuingAuthority")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<string>("VerificationMethod")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("VerificationSource")
.HasMaxLength(300)
.HasColumnType("nvarchar(300)");
b.Property<int?>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset?>("ApprovedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("InternalNotes")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseId")
.HasColumnType("bigint");
b.Property<DateTimeOffset?>("RejectedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("RejectionReason")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<int?>("ReviewedByAdminId")
.HasColumnType("int");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<DateTimeOffset?>("SubmittedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTimeOffset?>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("ContentType")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("datetimeoffset");
b.Property<long>("FileSizeBytes")
.HasColumnType("bigint");
b.Property<string>("IntegrityHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<string>("ObjectStorageKey")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("OriginalFileName")
.HasMaxLength(260)
.HasColumnType("nvarchar(260)");
b.Property<long>("StepId")
.HasColumnType("bigint");
b.Property<int>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTimeOffset?>("CompletedAt")
.HasColumnType("datetimeoffset");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<DateTimeOffset?>("ExpiresAt")
.HasColumnType("datetimeoffset");
b.Property<string>("ExternalResponseJson")
.HasColumnType("nvarchar(max)");
b.Property<string>("FailureReason")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<bool>("IsAutomated")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<long>("NurseVerificationId")
.HasColumnType("bigint");
b.Property<DateTimeOffset?>("StartedAt")
.HasColumnType("datetimeoffset");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<long>("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<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("AutomationProvider")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("CreatedById")
.HasColumnType("int");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsAutomated")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsRequired")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("ModifiedAt")
.HasColumnType("datetimeoffset");
b.Property<int?>("ModifiedById")
.HasColumnType("int");
b.Property<int>("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
}
}
}