//
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("20251002153137_UpdateRequestEntityAddingOfficeCountry")]
partial class UpdateRequestEntityAddingOfficeCountry
{
///
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("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.PaymentDetail", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Amount")
.HasColumnType("double precision")
.HasColumnName("amount");
b.Property("AttachementId")
.HasColumnType("bigint")
.HasColumnName("attachement_id");
b.Property("Description")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("description");
b.Property("PaymentDate")
.HasColumnType("timestamp with time zone")
.HasColumnName("payment_date");
b.Property("PaymentMethode")
.HasColumnType("integer")
.HasColumnName("payment_methode");
b.Property("Reference")
.IsRequired()
.HasColumnType("text")
.HasColumnName("reference");
b.Property("Status")
.HasColumnType("integer")
.HasColumnName("status");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone")
.HasColumnName("timestmp");
b.HasKey("Id");
b.ToTable("PaymentDetail");
});
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("OfficeAvailableCountry")
.HasColumnType("text");
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("PaymentDetailId")
.HasColumnType("bigint")
.HasColumnName("payment_detail_id");
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("Timestamp")
.HasColumnType("timestamp with time zone")
.HasColumnName("timestmp");
b.Property("TypeTestComments")
.HasColumnType("text");
b.PrimitiveCollection>("TypeTestFilesIds")
.IsRequired()
.HasColumnType("bigint[]");
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("PaymentDetailId")
.IsUnique();
b.HasIndex("VendorId");
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");
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("vendorApproverBackend.Entities.PrequalificationRequest", b =>
{
b.HasOne("vendorApproverBackend.Entities.PaymentDetail", "PaymentDetail")
.WithOne()
.HasForeignKey("vendorApproverBackend.Entities.PrequalificationRequest", "PaymentDetailId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("vendorApproverBackend.Entities.Vendor", "Vendor")
.WithMany("PrequalificationRequests")
.HasForeignKey("VendorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("vendorApproverBackend.Entities.AdminObservation", "AdminObservations", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id"));
b1.Property("EnableUpdate")
.HasColumnType("boolean");
b1.Property("StepNumber")
.HasColumnType("integer");
b1.HasKey("PrequalificationRequestId", "Id");
b1.ToTable("AdminObservation");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
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.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
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.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
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.ToTable("PrequalificationRequests");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
b.OwnsMany("vendorApproverBackend.Entities.IndustrialLicense", "OtherIndustrialLicenses", b1 =>
{
b1.Property("PrequalificationRequestId")
.HasColumnType("bigint");
b1.Property("__synthesizedOrdinal")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
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", "__synthesizedOrdinal");
b1.ToTable("PrequalificationRequests");
b1.ToJson("OtherIndustrialLicenses");
b1.WithOwner()
.HasForeignKey("PrequalificationRequestId");
});
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