//
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using vendorApproverBackend.Data;
#nullable disable
namespace vendorApproverBackend.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250930103514_AddFinancialRole")]
partial class AddFinancialRole
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("FileModelPrequalificationRequest", b =>
{
b.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b.Property("TypeTestFilesId")
.HasColumnType("bigint");
b.HasKey("PrequalificationRequestId", "TypeTestFilesId");
b.HasIndex("TypeTestFilesId");
b.ToTable("FileModelPrequalificationRequest");
});
modelBuilder.Entity("vendorApproverBackend.Entities.FileModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Description")
.HasColumnType("text")
.HasColumnName("description");
b.Property("Name")
.HasColumnType("text")
.HasColumnName("file_name");
b.Property("Range")
.HasColumnType("integer")
.HasColumnName("range");
b.Property("Share")
.HasColumnType("boolean")
.HasColumnName("share");
b.Property("Size")
.HasColumnType("bigint")
.HasColumnName("file_size");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone")
.HasColumnName("timestmp");
b.Property("Type")
.HasColumnType("text")
.HasColumnName("file_type");
b.Property("Url")
.IsRequired()
.HasColumnType("text")
.HasColumnName("file_url");
b.HasKey("Id");
b.ToTable("File_model");
});
modelBuilder.Entity("vendorApproverBackend.Entities.PrequalificationRequest", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("AfterSalesDate")
.HasColumnType("timestamp with time zone");
b.Property("AfterSalesEvaluationReportId")
.HasColumnType("bigint");
b.Property("AfterSalesProductName")
.HasColumnType("text");
b.Property("AuthorizedPersonnelFileId")
.HasColumnType("bigint");
b.Property("ClientIssuesTrackingSystemId")
.HasColumnType("bigint");
b.Property("ComplianceConfirmationId")
.HasColumnType("bigint");
b.Property("CountryOfOrigin")
.HasColumnType("text");
b.Property("DateEstablished")
.HasColumnType("timestamp with time zone");
b.Property("FinancialReport2022Id")
.HasColumnType("bigint");
b.Property("FinancialReport2023Id")
.HasColumnType("bigint");
b.Property("FinancialReport2024Id")
.HasColumnType("bigint");
b.Property("GeneralArrangementDrawingId")
.HasColumnType("bigint");
b.Property("GpsLocationCoordinates")
.HasColumnType("text");
b.Property("GtpTechnicalDataSheetId")
.HasColumnType("bigint");
b.Property("GtpUploadId")
.HasColumnType("bigint");
b.Property("IsForeignCompanyBranchInOman")
.HasColumnType("boolean");
b.Property("ManufacturerHasLocalSupport")
.HasColumnType("boolean");
b.Property("OfficesAvailableIn")
.HasColumnType("integer");
b.Property("OfficialAgencyAgreementId")
.HasColumnType("bigint");
b.Property("OrgChartCorporateId")
.HasColumnType("bigint");
b.Property("OrgChartFactorySupportId")
.HasColumnType("bigint");
b.Property("OrgChartLocalSupportId")
.HasColumnType("bigint");
b.Property("OrgChartManufacturerId")
.HasColumnType("bigint");
b.Property("PendingCertificationFileId")
.HasColumnType("bigint");
b.Property("Product3DModelId")
.HasColumnType("bigint");
b.Property("ShortName")
.HasColumnType("text");
b.Property("Status")
.HasColumnType("integer")
.HasColumnName("status");
b.Property("SubmissionDate")
.HasColumnType("timestamp with time zone")
.HasColumnName("submission_date");
b.Property("TestType")
.HasColumnType("integer");
b.Property("TypeTestComments")
.HasColumnType("text");
b.Property("TypicalConnectionDrawingId")
.HasColumnType("bigint");
b.Property("VendorFullName")
.HasColumnType("text");
b.Property("VendorId")
.HasColumnType("bigint");
b.Property("WarrantyCertificateId")
.HasColumnType("bigint");
b.Property("Website")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AfterSalesEvaluationReportId");
b.HasIndex("AuthorizedPersonnelFileId");
b.HasIndex("ClientIssuesTrackingSystemId");
b.HasIndex("ComplianceConfirmationId");
b.HasIndex("FinancialReport2022Id");
b.HasIndex("FinancialReport2023Id");
b.HasIndex("FinancialReport2024Id");
b.HasIndex("GeneralArrangementDrawingId");
b.HasIndex("GtpTechnicalDataSheetId");
b.HasIndex("GtpUploadId");
b.HasIndex("OfficialAgencyAgreementId");
b.HasIndex("OrgChartCorporateId");
b.HasIndex("OrgChartFactorySupportId");
b.HasIndex("OrgChartLocalSupportId");
b.HasIndex("OrgChartManufacturerId");
b.HasIndex("PendingCertificationFileId");
b.HasIndex("Product3DModelId");
b.HasIndex("TypicalConnectionDrawingId");
b.HasIndex("VendorId");
b.HasIndex("WarrantyCertificateId");
b.ToTable("PrequalificationRequests");
});
modelBuilder.Entity("vendorApproverBackend.Entities.Product", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Category")
.HasColumnType("integer")
.HasColumnName("category");
b.Property("Code")
.HasColumnType("text")
.HasColumnName("code");
b.Property("Cost")
.HasColumnType("double precision")
.HasColumnName("cost");
b.Property("Description")
.HasColumnType("text")
.HasColumnName("description");
b.Property("ExpiryDate")
.HasColumnType("timestamp with time zone")
.HasColumnName("expiry_date");
b.Property("HasWarranty")
.HasColumnType("boolean")
.HasColumnName("has_warranty");
b.Property("ImageId")
.HasColumnType("bigint");
b.Property("IsFeaturedProduct")
.HasColumnType("boolean")
.HasColumnName("is_featured");
b.Property("Name")
.IsRequired()
.HasColumnType("text")
.HasColumnName("name");
b.Property("Price")
.HasColumnType("double precision")
.HasColumnName("price");
b.Property("Quantity")
.HasColumnType("double precision")
.HasColumnName("quantity");
b.Property("Status")
.HasColumnType("integer")
.HasColumnName("status");
b.Property("Weight")
.HasColumnType("double precision")
.HasColumnName("weight");
b.HasKey("Id");
b.HasIndex("ImageId")
.IsUnique();
b.ToTable("products");
});
modelBuilder.Entity("vendorApproverBackend.Entities.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("user_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Active")
.HasColumnType("boolean")
.HasColumnName("active");
b.Property("Category")
.HasColumnType("integer")
.HasColumnName("Category");
b.Property("City")
.HasColumnType("text")
.HasColumnName("city");
b.Property("Country")
.HasColumnType("text")
.HasColumnName("country");
b.Property("Deleted")
.HasColumnType("boolean")
.HasColumnName("deleted");
b.Property("Email")
.IsRequired()
.HasColumnType("text")
.HasColumnName("email");
b.Property("LastOtp")
.HasColumnType("text")
.HasColumnName("otp");
b.Property("Name")
.IsRequired()
.HasColumnType("text")
.HasColumnName("name");
b.Property("Password")
.IsRequired()
.HasColumnType("text")
.HasColumnName("password");
b.Property("PhoneNumber")
.HasColumnType("text")
.HasColumnName("phone_number");
b.Property("Role")
.HasColumnType("integer")
.HasColumnName("role");
b.Property("StartDate")
.HasColumnType("timestamp with time zone")
.HasColumnName("start_date");
b.Property("Status")
.HasColumnType("boolean")
.HasColumnName("Status");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone")
.HasColumnName("timestmp");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("Username")
.IsRequired()
.HasColumnType("text")
.HasColumnName("user_name");
b.Property("user_device")
.HasColumnType("bigint");
b.Property("users_profile_media")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("Email")
.IsUnique();
b.HasIndex("PhoneNumber")
.IsUnique();
b.HasIndex("Username")
.IsUnique();
b.HasIndex("user_device")
.IsUnique();
b.HasIndex("users_profile_media")
.IsUnique();
b.ToTable("users_table", (string)null);
});
modelBuilder.Entity("vendorApproverBackend.Entities.UserDevice", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("DeviceId")
.HasColumnType("text")
.HasColumnName("device_Id");
b.Property("DeviceType")
.HasColumnType("text")
.HasColumnName("deviceType");
b.Property("Ip")
.HasColumnType("text")
.HasColumnName("ip");
b.Property("LastJwt")
.HasColumnType("text")
.HasColumnName("token");
b.Property("PushNotificationToken")
.HasColumnType("text")
.HasColumnName("tokendevice");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone")
.HasColumnName("timestmp");
b.HasKey("Id");
b.ToTable("UserDevice");
});
modelBuilder.Entity("vendorApproverBackend.Entities.Vendor", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CommercialRegistrationNo")
.HasColumnType("text")
.HasColumnName("Commercial_registratio_no");
b.Property("LocalAgentName")
.HasColumnType("text")
.HasColumnName("Local_agent_name");
b.Property("LocalAgentPhone")
.HasColumnType("text")
.HasColumnName("Local_agent_phone");
b.Property("ManifactoryName")
.HasColumnType("text")
.HasColumnName("manifactory_name");
b.Property("PartnerCompany")
.HasColumnType("text")
.HasColumnName("partner_company");
b.Property("Position")
.HasColumnType("text")
.HasColumnName("position");
b.Property("RepresentativeEmail")
.HasColumnType("text")
.HasColumnName("representative_email");
b.Property("RepresentativeName")
.HasColumnType("text")
.HasColumnName("representative_name");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone")
.HasColumnName("timestmp");
b.Property("UserId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("UserId")
.IsUnique();
b.ToTable("Vendors");
});
modelBuilder.Entity("FileModelPrequalificationRequest", b =>
{
b.HasOne("vendorApproverBackend.Entities.PrequalificationRequest", null)
.WithMany()
.HasForeignKey("PrequalificationRequestId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("vendorApproverBackend.Entities.FileModel", null)
.WithMany()
.HasForeignKey("TypeTestFilesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("vendorApproverBackend.Entities.PrequalificationRequest", b =>
{
b.HasOne("vendorApproverBackend.Entities.FileModel", "AfterSalesEvaluationReport")
.WithMany()
.HasForeignKey("AfterSalesEvaluationReportId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "AuthorizedPersonnelFile")
.WithMany()
.HasForeignKey("AuthorizedPersonnelFileId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "ClientIssuesTrackingSystem")
.WithMany()
.HasForeignKey("ClientIssuesTrackingSystemId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "ComplianceConfirmation")
.WithMany()
.HasForeignKey("ComplianceConfirmationId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "FinancialReport2022")
.WithMany()
.HasForeignKey("FinancialReport2022Id");
b.HasOne("vendorApproverBackend.Entities.FileModel", "FinancialReport2023")
.WithMany()
.HasForeignKey("FinancialReport2023Id");
b.HasOne("vendorApproverBackend.Entities.FileModel", "FinancialReport2024")
.WithMany()
.HasForeignKey("FinancialReport2024Id");
b.HasOne("vendorApproverBackend.Entities.FileModel", "GeneralArrangementDrawing")
.WithMany()
.HasForeignKey("GeneralArrangementDrawingId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "GtpTechnicalDataSheet")
.WithMany()
.HasForeignKey("GtpTechnicalDataSheetId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "GtpUpload")
.WithMany()
.HasForeignKey("GtpUploadId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "OfficialAgencyAgreement")
.WithMany()
.HasForeignKey("OfficialAgencyAgreementId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "OrgChartCorporate")
.WithMany()
.HasForeignKey("OrgChartCorporateId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "OrgChartFactorySupport")
.WithMany()
.HasForeignKey("OrgChartFactorySupportId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "OrgChartLocalSupport")
.WithMany()
.HasForeignKey("OrgChartLocalSupportId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "OrgChartManufacturer")
.WithMany()
.HasForeignKey("OrgChartManufacturerId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "PendingCertificationFile")
.WithMany()
.HasForeignKey("PendingCertificationFileId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "Product3DModel")
.WithMany()
.HasForeignKey("Product3DModelId");
b.HasOne("vendorApproverBackend.Entities.FileModel", "TypicalConnectionDrawing")
.WithMany()
.HasForeignKey("TypicalConnectionDrawingId");
b.HasOne("vendorApproverBackend.Entities.Vendor", "Vendor")
.WithMany("PrequalificationRequests")
.HasForeignKey("VendorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("vendorApproverBackend.Entities.FileModel", "WarrantyCertificate")
.WithMany()
.HasForeignKey("WarrantyCertificateId");
b.OwnsMany("vendorApproverBackend.Entities.AssociatedCompany", "AssociatedCompanies", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b1.Property("Address")
.HasColumnType("text");
b1.Property("CompanyName")
.HasColumnType("text");
b1.Property("TypeOfAssociation")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId", "__synthesizedOrdinal");
b1.ToTable("PrequalificationRequests");
b1.ToJson("AssociatedCompanies");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsMany("vendorApproverBackend.Entities.AuthorizedSignatory", "AuthorizedSignatories", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b1.Property("Designation")
.HasColumnType("text");
b1.Property("Name")
.HasColumnType("text");
b1.Property("SpecimenSignature")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId", "__synthesizedOrdinal");
b1.ToTable("PrequalificationRequests");
b1.ToJson("AuthorizedSignatories");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsMany("vendorApproverBackend.Entities.ClientReference", "ClientReferences", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b1.Property("ClientOwner")
.HasColumnType("text");
b1.Property("Country")
.HasColumnType("text");
b1.Property("DeliveryYear")
.HasColumnType("integer");
b1.Property("OrderYear")
.HasColumnType("integer");
b1.Property("PerformanceCertificateAttached")
.HasColumnType("boolean");
b1.Property("QuantityOfOrder")
.HasColumnType("text");
b1.Property("TypeOfIndustry")
.HasColumnType("text");
b1.Property("YearsInService")
.HasColumnType("integer");
b1.HasKey("PrequalificationRequestId", "__synthesizedOrdinal");
b1.ToTable("PrequalificationRequests");
b1.ToJson("ClientReferences");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsMany("vendorApproverBackend.Entities.ContactPerson", "ContactPersons", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b1.Property("Designation")
.HasColumnType("text");
b1.Property("Email")
.HasColumnType("text");
b1.Property("Name")
.HasColumnType("text");
b1.Property("TelNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId", "__synthesizedOrdinal");
b1.ToTable("PrequalificationRequests");
b1.ToJson("ContactPersons");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.Declaration", "Declaration", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Date")
.HasColumnType("timestamp with time zone");
b1.Property("Designation")
.HasColumnType("text");
b1.Property("FullName")
.HasColumnType("text");
b1.Property("OnBehalfOf")
.HasColumnType("text");
b1.Property("PowerOfAttorneyId")
.HasColumnType("bigint");
b1.HasKey("PrequalificationRequestId");
b1.HasIndex("PowerOfAttorneyId");
b1.ToTable("PrequalificationRequests");
b1.HasOne("vendorApproverBackend.Entities.FileModel", "PowerOfAttorney")
.WithMany()
.HasForeignKey("PowerOfAttorneyId");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.Navigation("PowerOfAttorney");
});
b.OwnsOne("vendorApproverBackend.Entities.FactoryInfrastructure", "FactoryInfrastructure", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("DepartmentBuildings")
.HasColumnType("text");
b1.Property("ProductionCapacity")
.HasColumnType("text");
b1.Property("TotalBuiltUpArea")
.HasColumnType("text");
b1.Property("TotalFactoryArea")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.FinancialStanding", "FinancialStanding", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("AuditorAddress")
.HasColumnType("text");
b1.Property("AuditorName")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.ToJson("FinancialStanding");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.OwnsMany("vendorApproverBackend.Entities.BankFacility", "BankFacilities", b2 =>
{
b2.Property("FinancialStandingPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b2.Property("Address")
.HasColumnType("text");
b2.Property("Amount")
.HasColumnType("numeric");
b2.Property("BankName")
.HasColumnType("text");
b2.Property("Details")
.HasColumnType("text");
b2.HasKey("FinancialStandingPrequalificationRequestId", "__synthesizedOrdinal");
b2.ToTable("PrequalificationRequests");
b2.WithOwner()
.HasForeignKey("FinancialStandingPrequalificationRequestId");
});
b1.OwnsOne("vendorApproverBackend.Entities.FinancialYearDetail", "Details2022", b2 =>
{
b2.Property("FinancialStandingPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("CashFlowOperationRatio")
.HasColumnType("numeric");
b2.Property("CurrentRatio")
.HasColumnType("numeric");
b2.Property("DebtToEquityRatio")
.HasColumnType("numeric");
b2.Property("EbitdaMargin")
.HasColumnType("numeric");
b2.Property("NetProfitMargin")
.HasColumnType("numeric");
b2.HasKey("FinancialStandingPrequalificationRequestId");
b2.ToTable("PrequalificationRequests");
b2.WithOwner()
.HasForeignKey("FinancialStandingPrequalificationRequestId");
});
b1.OwnsOne("vendorApproverBackend.Entities.FinancialYearDetail", "Details2023", b2 =>
{
b2.Property("FinancialStandingPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("CashFlowOperationRatio")
.HasColumnType("numeric");
b2.Property("CurrentRatio")
.HasColumnType("numeric");
b2.Property("DebtToEquityRatio")
.HasColumnType("numeric");
b2.Property("EbitdaMargin")
.HasColumnType("numeric");
b2.Property("NetProfitMargin")
.HasColumnType("numeric");
b2.HasKey("FinancialStandingPrequalificationRequestId");
b2.ToTable("PrequalificationRequests");
b2.WithOwner()
.HasForeignKey("FinancialStandingPrequalificationRequestId");
});
b1.OwnsOne("vendorApproverBackend.Entities.FinancialYearDetail", "Details2024", b2 =>
{
b2.Property("FinancialStandingPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("CashFlowOperationRatio")
.HasColumnType("numeric");
b2.Property("CurrentRatio")
.HasColumnType("numeric");
b2.Property("DebtToEquityRatio")
.HasColumnType("numeric");
b2.Property("EbitdaMargin")
.HasColumnType("numeric");
b2.Property("NetProfitMargin")
.HasColumnType("numeric");
b2.HasKey("FinancialStandingPrequalificationRequestId");
b2.ToTable("PrequalificationRequests");
b2.WithOwner()
.HasForeignKey("FinancialStandingPrequalificationRequestId");
});
b1.Navigation("BankFacilities");
b1.Navigation("Details2022")
.IsRequired();
b1.Navigation("Details2023")
.IsRequired();
b1.Navigation("Details2024")
.IsRequired();
});
b.OwnsOne("vendorApproverBackend.Entities.HumanResourcesDetails", "HumanResourcesDetails", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.ToJson("HumanResourcesDetails");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.OwnsMany("vendorApproverBackend.Entities.QualifiedStaff", "QualifiedStaff", b2 =>
{
b2.Property("HumanResourcesDetailsPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b2.Property("Number")
.HasColumnType("integer");
b2.Property("Qualification")
.HasColumnType("text");
b2.HasKey("HumanResourcesDetailsPrequalificationRequestId", "__synthesizedOrdinal");
b2.ToTable("PrequalificationRequests");
b2.WithOwner()
.HasForeignKey("HumanResourcesDetailsPrequalificationRequestId");
});
b1.OwnsMany("vendorApproverBackend.Entities.StaffCount", "StaffCounts", b2 =>
{
b2.Property("HumanResourcesDetailsPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b2.Property("FactoryCount")
.HasColumnType("integer");
b2.Property("OnSiteCount")
.HasColumnType("integer");
b2.Property("OutsidersCount")
.HasColumnType("integer");
b2.Property("OwnCount")
.HasColumnType("integer");
b2.Property("StaffCategory")
.HasColumnType("text");
b2.HasKey("HumanResourcesDetailsPrequalificationRequestId", "__synthesizedOrdinal");
b2.ToTable("PrequalificationRequests");
b2.WithOwner()
.HasForeignKey("HumanResourcesDetailsPrequalificationRequestId");
});
b1.Navigation("QualifiedStaff");
b1.Navigation("StaffCounts");
});
b.OwnsMany("vendorApproverBackend.Entities.LocalCompanyOwner", "LocalCompanyOwners", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b1.Property("OwnerName")
.HasColumnType("text");
b1.Property("PercentageOfOwnership")
.HasColumnType("double precision");
b1.HasKey("PrequalificationRequestId", "__synthesizedOrdinal");
b1.ToTable("PrequalificationRequests");
b1.ToJson("LocalCompanyOwners");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.Address", "CorporateHeadquarters", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Email")
.HasColumnType("text");
b1.Property("FaxNo")
.HasColumnType("text");
b1.Property("POBox")
.HasColumnType("text");
b1.Property("Street")
.HasColumnType("text");
b1.Property("TelNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.Address", "FactoryAddress", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Email")
.HasColumnType("text");
b1.Property("FaxNo")
.HasColumnType("text");
b1.Property("POBox")
.HasColumnType("text");
b1.Property("Street")
.HasColumnType("text");
b1.Property("TelNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.IndustrialLicense", "IndustrialLicenseFromEconomicDept", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("DateOfRegistration")
.HasColumnType("timestamp with time zone");
b1.Property("ExpiryDate")
.HasColumnType("timestamp with time zone");
b1.Property("IssuingAuthority")
.HasColumnType("text");
b1.Property("LicenseDocumentId")
.HasColumnType("bigint");
b1.Property("RegistrationNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.HasIndex("LicenseDocumentId");
b1.ToTable("PrequalificationRequests");
b1.HasOne("vendorApproverBackend.Entities.FileModel", "LicenseDocument")
.WithMany()
.HasForeignKey("LicenseDocumentId");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.Navigation("LicenseDocument");
});
b.OwnsOne("vendorApproverBackend.Entities.Address", "NearestSalesOfficeToOman", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Email")
.HasColumnType("text");
b1.Property("FaxNo")
.HasColumnType("text");
b1.Property("POBox")
.HasColumnType("text");
b1.Property("Street")
.HasColumnType("text");
b1.Property("TelNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.Address", "OfficeInOman", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Email")
.HasColumnType("text");
b1.Property("FaxNo")
.HasColumnType("text");
b1.Property("POBox")
.HasColumnType("text");
b1.Property("Street")
.HasColumnType("text");
b1.Property("TelNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.IndustrialLicense", "OmanChamberMembership", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("DateOfRegistration")
.HasColumnType("timestamp with time zone");
b1.Property("ExpiryDate")
.HasColumnType("timestamp with time zone");
b1.Property("IssuingAuthority")
.HasColumnType("text");
b1.Property("LicenseDocumentId")
.HasColumnType("bigint");
b1.Property("RegistrationNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.HasIndex("LicenseDocumentId");
b1.ToTable("PrequalificationRequests");
b1.HasOne("vendorApproverBackend.Entities.FileModel", "LicenseDocument")
.WithMany()
.HasForeignKey("LicenseDocumentId");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.Navigation("LicenseDocument");
});
b.OwnsMany("vendorApproverBackend.Entities.IndustrialLicense", "OtherIndustrialLicenses", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id"));
b1.Property("DateOfRegistration")
.HasColumnType("timestamp with time zone");
b1.Property("ExpiryDate")
.HasColumnType("timestamp with time zone");
b1.Property("IssuingAuthority")
.HasColumnType("text");
b1.Property("LicenseDocumentId")
.HasColumnType("bigint");
b1.Property("RegistrationNo")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId", "Id");
b1.HasIndex("LicenseDocumentId");
b1.ToTable("PrequalificationRequests_OtherIndustrialLicenses");
b1.HasOne("vendorApproverBackend.Entities.FileModel", "LicenseDocument")
.WithMany()
.HasForeignKey("LicenseDocumentId");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.Navigation("LicenseDocument");
});
b.OwnsOne("vendorApproverBackend.Entities.ProductAppliedFor", "ProductAppliedFor", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("BriefDescription")
.HasColumnType("text");
b1.Property("EquipmentCategory")
.HasColumnType("integer");
b1.Property("ManufacturerName")
.HasColumnType("text");
b1.Property("ManufacturingCity")
.HasColumnType("text");
b1.Property("ManufacturingCountry")
.HasColumnType("text");
b1.Property("TypeModel")
.HasColumnType("text");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsOne("vendorApproverBackend.Entities.ProductionDetails", "ProductionDetails", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("AuthorityAndResponsibility")
.HasColumnType("text");
b1.Property("ProcessControl")
.HasColumnType("text");
b1.Property("SupportingDocumentId")
.HasColumnType("bigint");
b1.HasKey("PrequalificationRequestId");
b1.HasIndex("SupportingDocumentId");
b1.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.HasOne("vendorApproverBackend.Entities.FileModel", "SupportingDocument")
.WithMany()
.HasForeignKey("SupportingDocumentId");
b1.Navigation("SupportingDocument");
});
b.OwnsOne("vendorApproverBackend.Entities.QualityHseRisk", "QualityHseRisk", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("AreInternalAuditsConducted")
.HasColumnType("boolean");
b1.Property("CanProvideTrainingFacilities")
.HasColumnType("boolean");
b1.Property("EngineeringFabricationStandards")
.HasColumnType("text");
b1.Property("HasFormalQualitySystem")
.HasColumnType("boolean");
b1.Property("HasHseManual")
.HasColumnType("boolean");
b1.Property("HseSystemMeetIsoStandards")
.HasColumnType("boolean");
b1.Property("IsQaSystemApprovedByAgency")
.HasColumnType("boolean");
b1.Property("PendingCertificationDetails")
.HasColumnType("text");
b1.Property("QaSystemMeetIsoRequirements")
.HasColumnType("boolean");
b1.Property("RiskManagementSystem")
.HasColumnType("text");
b1.Property("SystemIncludesQaManual")
.HasColumnType("boolean");
b1.Property("SystemIncludesQaProcedures")
.HasColumnType("boolean");
b1.HasKey("PrequalificationRequestId");
b1.ToTable("PrequalificationRequests");
b1.ToJson("QualityHseRisk");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
b1.OwnsMany("vendorApproverBackend.Entities.CertificationDetail", "Certifications", b2 =>
{
b2.Property("QualityHseRiskPrequalificationRequestId")
.HasColumnType("bigint");
b2.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
b2.Property