diff --git a/Vpassbackend/Migrations/20250721131245_InitialCreate.Designer.cs b/Vpassbackend/Migrations/20250721131245_InitialCreate.Designer.cs
deleted file mode 100644
index d69702b..0000000
--- a/Vpassbackend/Migrations/20250721131245_InitialCreate.Designer.cs
+++ /dev/null
@@ -1,1242 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Vpassbackend.Data;
-
-#nullable disable
-
-namespace Vpassbackend.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20250721131245_InitialCreate")]
- partial class InitialCreate
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.18")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Vpassbackend.Models.Appointment", b =>
- {
- b.Property("AppointmentId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("AppointmentId"));
-
- b.Property("AppointmentDate")
- .HasColumnType("datetime2");
-
- b.Property("AppointmentPrice")
- .HasColumnType("decimal(10, 2)");
-
- b.Property("CustomerId")
- .HasColumnType("int");
-
- b.Property("Description")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("ServiceId")
- .HasColumnType("int");
-
- b.Property("Station_id")
- .HasColumnType("int");
-
- b.Property("Status")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("Type")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("AppointmentId");
-
- b.HasIndex("CustomerId");
-
- b.HasIndex("ServiceId");
-
- b.HasIndex("Station_id");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("Appointments");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.AppointmentService", b =>
- {
- b.Property("AppointmentId")
- .HasColumnType("int");
-
- b.Property("ServiceId")
- .HasColumnType("int");
-
- b.Property("ServicePrice")
- .HasColumnType("decimal(18,2)");
-
- b.HasKey("AppointmentId", "ServiceId");
-
- b.HasIndex("ServiceId");
-
- b.ToTable("AppointmentServices");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.BorderPoint", b =>
- {
- b.Property("PointId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PointId"));
-
- b.Property("CheckDate")
- .HasColumnType("datetime2");
-
- b.Property("CheckPoint")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("EntryPoint")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("PointId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("BorderPoints");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ClosureSchedule", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Day")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ServiceCenterId")
- .HasColumnType("int");
-
- b.Property("WeekNumber")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("ClosureSchedules");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Customer", b =>
- {
- b.Property("CustomerId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CustomerId"));
-
- b.Property("Address")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
-
- b.Property("DeviceToken")
- .HasMaxLength(300)
- .HasColumnType("nvarchar(300)");
-
- b.Property("Email")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.Property("FirstName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("IsEmailVerified")
- .HasColumnType("bit");
-
- b.Property("LastName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("LastTokenUpdate")
- .HasColumnType("datetime2");
-
- b.Property("LoyaltyPoints")
- .HasColumnType("int");
-
- b.Property("NIC")
- .IsRequired()
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("OtpCode")
- .HasColumnType("nvarchar(max)");
-
- b.Property("OtpExpiry")
- .HasColumnType("datetime2");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .IsRequired()
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("Platform")
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("PushNotificationsEnabled")
- .HasColumnType("bit");
-
- b.HasKey("CustomerId");
-
- b.ToTable("Customers");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Document", b =>
- {
- b.Property("DocumentId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DocumentId"));
-
- b.Property("ContentType")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("CustomerId")
- .HasColumnType("int");
-
- b.Property("DisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DocumentType")
- .HasColumnType("int");
-
- b.Property("ExpirationDate")
- .HasColumnType("datetime2");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("FileUrl")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("UploadedAt")
- .HasColumnType("datetime2");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("DocumentId");
-
- b.HasIndex("CustomerId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("Documents");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.EmergencyCallCenter", b =>
- {
- b.Property("CenterId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CenterId"));
-
- b.Property("Address")
- .IsRequired()
- .HasMaxLength(300)
- .HasColumnType("nvarchar(300)");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
-
- b.Property("PhoneNumber")
- .IsRequired()
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("RegistrationNumber")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.HasKey("CenterId");
-
- b.ToTable("EmergencyCallCenters");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Feedback", b =>
- {
- b.Property("FeedbackId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("FeedbackId"));
-
- b.Property("Comments")
- .HasMaxLength(1000)
- .HasColumnType("nvarchar(1000)");
-
- b.Property("CustomerId")
- .HasColumnType("int");
-
- b.Property("FeedbackDate")
- .HasColumnType("datetime2");
-
- b.Property("Rating")
- .HasColumnType("int");
-
- b.Property("ServiceCenterId")
- .HasColumnType("int");
-
- b.Property("ServiceDate")
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("FeedbackId");
-
- b.HasIndex("CustomerId");
-
- b.HasIndex("ServiceCenterId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("Feedbacks");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.FuelEfficiency", b =>
- {
- b.Property("FuelEfficiencyId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("FuelEfficiencyId"));
-
- b.Property("CreatedAt")
- .HasColumnType("datetime2");
-
- b.Property("Date")
- .HasColumnType("datetime2");
-
- b.Property("FuelAmount")
- .HasColumnType("decimal(10,2)");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("FuelEfficiencyId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("FuelEfficiencies");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Invoice", b =>
- {
- b.Property("InvoiceId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("InvoiceId"));
-
- b.Property("InvoiceDate")
- .HasColumnType("datetime2");
-
- b.Property("TotalCost")
- .HasColumnType("decimal(10, 2)");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("InvoiceId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("Invoices");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Notification", b =>
- {
- b.Property("NotificationId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("NotificationId"));
-
- b.Property("AppointmentId")
- .HasColumnType("int");
-
- b.Property("CreatedAt")
- .HasColumnType("datetime2");
-
- b.Property("CustomerId")
- .HasColumnType("int");
-
- b.Property("CustomerName")
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.Property("IsRead")
- .HasColumnType("bit");
-
- b.Property("Message")
- .IsRequired()
- .HasMaxLength(1000)
- .HasColumnType("nvarchar(1000)");
-
- b.Property("Priority")
- .IsRequired()
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("PriorityColor")
- .IsRequired()
- .HasMaxLength(7)
- .HasColumnType("nvarchar(7)");
-
- b.Property("ReadAt")
- .HasColumnType("datetime2");
-
- b.Property("ScheduledFor")
- .HasColumnType("datetime2");
-
- b.Property("SentAt")
- .HasColumnType("datetime2");
-
- b.Property("ServiceName")
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
-
- b.Property("ServiceReminderId")
- .HasColumnType("int");
-
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("UpdatedAt")
- .HasColumnType("datetime2");
-
- b.Property("VehicleBrand")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.Property("VehicleModel")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("VehicleRegistrationNumber")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.HasKey("NotificationId");
-
- b.HasIndex("AppointmentId");
-
- b.HasIndex("CustomerId");
-
- b.HasIndex("ServiceReminderId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("Notifications");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Package", b =>
- {
- b.Property("PackageId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PackageId"));
-
- b.Property("Description")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("IsActive")
- .HasColumnType("bit");
-
- b.Property("PackageName")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("Percentage")
- .HasColumnType("decimal(5, 2)");
-
- b.HasKey("PackageId");
-
- b.ToTable("Packages");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.PaymentLog", b =>
- {
- b.Property("LogId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("LogId"));
-
- b.Property("InvoiceId")
- .HasColumnType("int");
-
- b.Property("PaymentDate")
- .HasColumnType("datetime2");
-
- b.Property("Status")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.HasKey("LogId");
-
- b.HasIndex("InvoiceId");
-
- b.ToTable("PaymentLogs");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Service", b =>
- {
- b.Property("ServiceId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ServiceId"));
-
- b.Property("BasePrice")
- .HasColumnType("decimal(10, 2)");
-
- b.Property("Category")
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("Description")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("ServiceName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.HasKey("ServiceId");
-
- b.ToTable("Services");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceAvailability", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Day")
- .HasColumnType("nvarchar(max)");
-
- b.Property("IsAvailable")
- .HasColumnType("bit");
-
- b.Property("ServiceCenterId")
- .HasColumnType("int");
-
- b.Property("ServiceId")
- .HasColumnType("int");
-
- b.Property("WeekNumber")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("ServiceAvailabilities");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceCenter", b =>
- {
- b.Property("Station_id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Station_id"));
-
- b.Property("Address")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("Email")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("OwnerName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("RegisterationNumber")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("Station_name")
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.Property("Station_status")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("Telephone")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("VATNumber")
- .HasMaxLength(15)
- .HasColumnType("nvarchar(15)");
-
- b.HasKey("Station_id");
-
- b.ToTable("ServiceCenters");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceCenterCheckInPoint", b =>
- {
- b.Property("StationId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("StationId"));
-
- b.Property("Name")
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("Station_id")
- .HasColumnType("int");
-
- b.HasKey("StationId");
-
- b.HasIndex("Station_id");
-
- b.ToTable("ServiceCenterCheckInPoints");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceCenterService", b =>
- {
- b.Property("ServiceCenterServiceId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ServiceCenterServiceId"));
-
- b.Property("BasePrice")
- .HasColumnType("decimal(10, 2)");
-
- b.Property("CustomPrice")
- .HasColumnType("decimal(10, 2)");
-
- b.Property("IsAvailable")
- .HasColumnType("bit");
-
- b.Property("LoyaltyPoints")
- .HasColumnType("int");
-
- b.Property("Notes")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("PackageId")
- .HasColumnType("int");
-
- b.Property("ServiceId")
- .HasColumnType("int");
-
- b.Property("Station_id")
- .HasColumnType("int");
-
- b.HasKey("ServiceCenterServiceId");
-
- b.HasIndex("PackageId");
-
- b.HasIndex("Station_id");
-
- b.HasIndex("ServiceId", "Station_id")
- .IsUnique();
-
- b.ToTable("ServiceCenterServices");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceReminder", b =>
- {
- b.Property("ServiceReminderId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ServiceReminderId"));
-
- b.Property("CreatedAt")
- .HasColumnType("datetime2");
-
- b.Property("IntervalMonths")
- .HasColumnType("int");
-
- b.Property("IsActive")
- .HasColumnType("bit");
-
- b.Property("Notes")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("NotifyBeforeDays")
- .HasColumnType("int");
-
- b.Property("ReminderDate")
- .HasColumnType("datetime2");
-
- b.Property("ServiceId")
- .HasColumnType("int");
-
- b.Property("UpdatedAt")
- .HasColumnType("datetime2");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("ServiceReminderId");
-
- b.HasIndex("ServiceId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("ServiceReminders");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.User", b =>
- {
- b.Property("UserId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserId"));
-
- b.Property("Email")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.Property("FirstName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("LastName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserRoleId")
- .HasColumnType("int");
-
- b.HasKey("UserId");
-
- b.HasIndex("UserRoleId");
-
- b.ToTable("Users");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.UserRole", b =>
- {
- b.Property("UserRoleId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserRoleId"));
-
- b.Property("UserRoleName")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.HasKey("UserRoleId");
-
- b.ToTable("UserRoles");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Vehicle", b =>
- {
- b.Property("VehicleId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("VehicleId"));
-
- b.Property("Brand")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("ChassisNumber")
- .HasMaxLength(20)
- .HasColumnType("nvarchar(20)");
-
- b.Property("CustomerId")
- .HasColumnType("int");
-
- b.Property("Fuel")
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("Mileage")
- .HasColumnType("int");
-
- b.Property("Model")
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("RegistrationNumber")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
- b.Property("Year")
- .HasColumnType("int");
-
- b.HasKey("VehicleId");
-
- b.HasIndex("CustomerId");
-
- b.ToTable("Vehicles");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.VehicleServiceHistory", b =>
- {
- b.Property("ServiceHistoryId")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ServiceHistoryId"));
-
- b.Property("Cost")
- .HasColumnType("decimal(10, 2)");
-
- b.Property("Description")
- .HasMaxLength(500)
- .HasColumnType("nvarchar(500)");
-
- b.Property("ExternalServiceCenterName")
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.Property("IsVerified")
- .HasColumnType("bit");
-
- b.Property("Mileage")
- .HasColumnType("int");
-
- b.Property("ReceiptDocumentPath")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("ServiceCenterId")
- .HasColumnType("int");
-
- b.Property("ServiceDate")
- .HasColumnType("datetime2");
-
- b.Property("ServiceType")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property("ServicedByUserId")
- .HasColumnType("int");
-
- b.Property("VehicleId")
- .HasColumnType("int");
-
- b.HasKey("ServiceHistoryId");
-
- b.HasIndex("ServiceCenterId");
-
- b.HasIndex("ServicedByUserId");
-
- b.HasIndex("VehicleId");
-
- b.ToTable("VehicleServiceHistories");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Appointment", b =>
- {
- b.HasOne("Vpassbackend.Models.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.Service", null)
- .WithMany("Appointments")
- .HasForeignKey("ServiceId");
-
- b.HasOne("Vpassbackend.Models.ServiceCenter", "ServiceCenter")
- .WithMany()
- .HasForeignKey("Station_id")
- .OnDelete(DeleteBehavior.NoAction)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("Appointments")
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.NoAction)
- .IsRequired();
-
- b.Navigation("Customer");
-
- b.Navigation("ServiceCenter");
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.AppointmentService", b =>
- {
- b.HasOne("Vpassbackend.Models.Appointment", "Appointment")
- .WithMany("AppointmentServices")
- .HasForeignKey("AppointmentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.Service", "Service")
- .WithMany()
- .HasForeignKey("ServiceId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Appointment");
-
- b.Navigation("Service");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.BorderPoint", b =>
- {
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("BorderPoints")
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Document", b =>
- {
- b.HasOne("Vpassbackend.Models.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("Documents")
- .HasForeignKey("VehicleId");
-
- b.Navigation("Customer");
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Feedback", b =>
- {
- b.HasOne("Vpassbackend.Models.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.ServiceCenter", "ServiceCenter")
- .WithMany()
- .HasForeignKey("ServiceCenterId")
- .OnDelete(DeleteBehavior.NoAction)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany()
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.NoAction)
- .IsRequired();
-
- b.Navigation("Customer");
-
- b.Navigation("ServiceCenter");
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.FuelEfficiency", b =>
- {
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("FuelEfficiencies")
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Invoice", b =>
- {
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("Invoices")
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Notification", b =>
- {
- b.HasOne("Vpassbackend.Models.Appointment", "Appointment")
- .WithMany()
- .HasForeignKey("AppointmentId")
- .OnDelete(DeleteBehavior.NoAction);
-
- b.HasOne("Vpassbackend.Models.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.NoAction)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.ServiceReminder", "ServiceReminder")
- .WithMany()
- .HasForeignKey("ServiceReminderId")
- .OnDelete(DeleteBehavior.NoAction);
-
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany()
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.NoAction);
-
- b.Navigation("Appointment");
-
- b.Navigation("Customer");
-
- b.Navigation("ServiceReminder");
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.PaymentLog", b =>
- {
- b.HasOne("Vpassbackend.Models.Invoice", "Invoice")
- .WithMany("PaymentLogs")
- .HasForeignKey("InvoiceId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Invoice");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceCenterCheckInPoint", b =>
- {
- b.HasOne("Vpassbackend.Models.ServiceCenter", "ServiceCenter")
- .WithMany("CheckInPoints")
- .HasForeignKey("Station_id")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ServiceCenter");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceCenterService", b =>
- {
- b.HasOne("Vpassbackend.Models.Package", "Package")
- .WithMany("ServiceCenterServices")
- .HasForeignKey("PackageId")
- .OnDelete(DeleteBehavior.SetNull);
-
- b.HasOne("Vpassbackend.Models.Service", "Service")
- .WithMany("ServiceCenterServices")
- .HasForeignKey("ServiceId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.ServiceCenter", "ServiceCenter")
- .WithMany("ServiceCenterServices")
- .HasForeignKey("Station_id")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Package");
-
- b.Navigation("Service");
-
- b.Navigation("ServiceCenter");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceReminder", b =>
- {
- b.HasOne("Vpassbackend.Models.Service", "Service")
- .WithMany("ServiceReminders")
- .HasForeignKey("ServiceId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("ServiceReminders")
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Service");
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.User", b =>
- {
- b.HasOne("Vpassbackend.Models.UserRole", "UserRole")
- .WithMany()
- .HasForeignKey("UserRoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("UserRole");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Vehicle", b =>
- {
- b.HasOne("Vpassbackend.Models.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Customer");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.VehicleServiceHistory", b =>
- {
- b.HasOne("Vpassbackend.Models.ServiceCenter", "ServiceCenter")
- .WithMany()
- .HasForeignKey("ServiceCenterId")
- .OnDelete(DeleteBehavior.NoAction);
-
- b.HasOne("Vpassbackend.Models.User", "ServicedByUser")
- .WithMany()
- .HasForeignKey("ServicedByUserId")
- .OnDelete(DeleteBehavior.NoAction);
-
- b.HasOne("Vpassbackend.Models.Vehicle", "Vehicle")
- .WithMany("ServiceHistory")
- .HasForeignKey("VehicleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ServiceCenter");
-
- b.Navigation("ServicedByUser");
-
- b.Navigation("Vehicle");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Appointment", b =>
- {
- b.Navigation("AppointmentServices");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Invoice", b =>
- {
- b.Navigation("PaymentLogs");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Package", b =>
- {
- b.Navigation("ServiceCenterServices");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Service", b =>
- {
- b.Navigation("Appointments");
-
- b.Navigation("ServiceCenterServices");
-
- b.Navigation("ServiceReminders");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.ServiceCenter", b =>
- {
- b.Navigation("CheckInPoints");
-
- b.Navigation("ServiceCenterServices");
- });
-
- modelBuilder.Entity("Vpassbackend.Models.Vehicle", b =>
- {
- b.Navigation("Appointments");
-
- b.Navigation("BorderPoints");
-
- b.Navigation("Documents");
-
- b.Navigation("FuelEfficiencies");
-
- b.Navigation("Invoices");
-
- b.Navigation("ServiceHistory");
-
- b.Navigation("ServiceReminders");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Vpassbackend/Migrations/20250721131245_InitialCreate.cs b/Vpassbackend/Migrations/20250721131245_InitialCreate.cs
deleted file mode 100644
index 8307fad..0000000
--- a/Vpassbackend/Migrations/20250721131245_InitialCreate.cs
+++ /dev/null
@@ -1,826 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace Vpassbackend.Migrations
-{
- ///
- public partial class InitialCreate : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "ClosureSchedules",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ServiceCenterId = table.Column(type: "int", nullable: false),
- WeekNumber = table.Column(type: "int", nullable: false),
- Day = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ClosureSchedules", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Customers",
- columns: table => new
- {
- CustomerId = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- FirstName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- LastName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false),
- Address = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
- PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
- Password = table.Column(type: "nvarchar(max)", nullable: false),
- NIC = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
- LoyaltyPoints = table.Column(type: "int", nullable: false),
- IsEmailVerified = table.Column(type: "bit", nullable: false),
- OtpCode = table.Column(type: "nvarchar(max)", nullable: true),
- OtpExpiry = table.Column(type: "datetime2", nullable: true),
- DeviceToken = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true),
- LastTokenUpdate = table.Column(type: "datetime2", nullable: true),
- Platform = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
- PushNotificationsEnabled = table.Column(type: "bit", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Customers", x => x.CustomerId);
- });
-
- migrationBuilder.CreateTable(
- name: "EmergencyCallCenters",
- columns: table => new
- {
- CenterId = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
- Address = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: false),
- RegistrationNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_EmergencyCallCenters", x => x.CenterId);
- });
-
- migrationBuilder.CreateTable(
- name: "Packages",
- columns: table => new
- {
- PackageId = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- PackageName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false),
- Percentage = table.Column(type: "decimal(5,2)", nullable: false),
- Description = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- IsActive = table.Column(type: "bit", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Packages", x => x.PackageId);
- });
-
- migrationBuilder.CreateTable(
- name: "ServiceAvailabilities",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ServiceCenterId = table.Column(type: "int", nullable: false),
- ServiceId = table.Column(type: "int", nullable: false),
- WeekNumber = table.Column(type: "int", nullable: false),
- Day = table.Column(type: "nvarchar(max)", nullable: true),
- IsAvailable = table.Column(type: "bit", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ServiceAvailabilities", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "ServiceCenters",
- columns: table => new
- {
- Station_id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- OwnerName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- VATNumber = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true),
- RegisterationNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
- Station_name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true),
- Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
- Telephone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true),
- Address = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- Station_status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ServiceCenters", x => x.Station_id);
- });
-
- migrationBuilder.CreateTable(
- name: "Services",
- columns: table => new
- {
- ServiceId = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ServiceName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- Description = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- BasePrice = table.Column(type: "decimal(10,2)", nullable: true),
- Category = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Services", x => x.ServiceId);
- });
-
- migrationBuilder.CreateTable(
- name: "UserRoles",
- columns: table => new
- {
- UserRoleId = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- UserRoleName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_UserRoles", x => x.UserRoleId);
- });
-
- migrationBuilder.CreateTable(
- name: "Vehicles",
- columns: table => new
- {
- VehicleId = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- RegistrationNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false),
- CustomerId = table.Column(type: "int", nullable: false),
- Brand = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
- Model = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
- ChassisNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true),
- Mileage = table.Column(type: "int", nullable: true),
- Fuel = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
- Year = table.Column