// using System; using AMREZ.EOP.Infrastructures.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace AMREZ.EOP.Infrastructures.Migrations { [DbContext(typeof(AppDbContext))] [Migration("20251010092049_AddProductMasterData")] partial class AddProductMasterData { /// 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("AMREZ.EOP.Domain.Entities.Authentications.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "Code") .IsUnique(); b.ToTable("permissions", null, t => { t.HasCheckConstraint("ck_permissions_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_permissions_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "Code") .IsUnique(); b.ToTable("roles", null, t => { t.HasCheckConstraint("ck_roles_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_roles_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.RolePermission", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("PermissionId") .HasColumnType("uuid"); b.Property("RoleId") .HasColumnType("uuid"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("PermissionId"); b.HasIndex("RoleId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "PermissionId"); b.HasIndex("TenantId", "RoleId", "PermissionId") .IsUnique(); b.ToTable("role_permissions", null, t => { t.HasCheckConstraint("ck_role_permissions_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_role_permissions_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(0); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("LockoutEndUtc") .HasColumnType("timestamp with time zone"); b.Property("MfaEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("PasswordHash") .IsRequired() .HasColumnType("text"); b.Property("SecurityStamp") .HasColumnType("text"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.ToTable("users", null, t => { t.HasCheckConstraint("ck_users_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_users_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserExternalAccount", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("Email") .HasColumnType("text"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("LinkedAt") .HasColumnType("timestamp with time zone"); b.Property("Provider") .HasColumnType("integer"); b.Property("Subject") .IsRequired() .HasColumnType("text"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserId"); b.HasIndex("TenantId", "Provider", "Subject") .IsUnique(); b.ToTable("user_external_accounts", null, t => { t.HasCheckConstraint("ck_user_external_accounts_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_external_accounts_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserIdentity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("Identifier") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsPrimary") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Type") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserId") .HasColumnType("uuid"); b.Property("VerifiedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "Type", "Identifier") .IsUnique(); b.HasIndex("TenantId", "UserId", "Type", "IsPrimary") .HasDatabaseName("ix_user_identity_primary_per_type"); b.ToTable("user_identities", null, t => { t.HasCheckConstraint("ck_user_identities_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_identities_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserMfaFactor", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AddedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("CredentialId") .HasColumnType("text"); b.Property("Email") .HasColumnType("text"); b.Property("Enabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Label") .HasColumnType("text"); b.Property("LastUsedAt") .HasColumnType("timestamp with time zone"); b.Property("PhoneE164") .HasColumnType("text"); b.Property("PublicKey") .HasColumnType("text"); b.Property("Secret") .HasColumnType("text"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Type") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserId"); b.ToTable("user_mfa_factors", null, t => { t.HasCheckConstraint("ck_user_mfa_factors_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_mfa_factors_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserPasswordHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ChangedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("PasswordHash") .IsRequired() .HasColumnType("text"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserId", "ChangedAt"); b.ToTable("user_password_histories", null, t => { t.HasCheckConstraint("ck_user_password_histories_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_password_histories_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserRole", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("RoleId") .HasColumnType("uuid"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("RoleId"); b.HasIndex("TenantId"); b.HasIndex("UserId"); b.HasIndex("TenantId", "RoleId"); b.HasIndex("TenantId", "UserId", "RoleId") .IsUnique(); b.ToTable("user_roles", null, t => { t.HasCheckConstraint("ck_user_roles_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_roles_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserSession", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("DeviceId") .HasColumnType("text"); b.Property("ExpiresAt") .HasColumnType("timestamp with time zone"); b.Property("IpAddress") .HasColumnType("text"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IssuedAt") .HasColumnType("timestamp with time zone"); b.Property("RefreshTokenHash") .IsRequired() .HasColumnType("text"); b.Property("RevokedAt") .HasColumnType("timestamp with time zone"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserAgent") .HasColumnType("text"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "DeviceId"); b.HasIndex("TenantId", "UserId"); b.ToTable("user_sessions", null, t => { t.HasCheckConstraint("ck_user_sessions_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_sessions_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.Address", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CountryCode") .IsRequired() .HasMaxLength(2) .HasColumnType("character varying(2)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("District") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("GeoLat") .HasColumnType("double precision"); b.Property("GeoLng") .HasColumnType("double precision"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Line1") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("Line2") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("PostalCode") .HasMaxLength(10) .HasColumnType("character varying(10)"); b.Property("Province") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Road") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Soi") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Subdistrict") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("Verified") .HasColumnType("boolean"); b.Property("Village") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.HasKey("Id"); b.HasIndex("TenantId"); b.ToTable("addresses", null, t => { t.HasCheckConstraint("ck_addresses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_addresses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerAddress", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AddressId") .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("CustomerProfileId") .HasColumnType("uuid"); b.Property("IsDefault") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Label") .HasColumnType("integer"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "AddressId"); b.HasIndex("TenantId", "CustomerProfileId", "Label"); b.HasIndex("TenantId", "CustomerProfileId", "Label", "IsDefault") .IsUnique() .HasDatabaseName("ux_default_customer_address_per_label") .HasFilter("\"IsDefault\" = TRUE"); b.ToTable("customer_addresses", null, t => { t.HasCheckConstraint("ck_customer_addresses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_customer_addresses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerContact", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("CustomerProfileId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsPrimary") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IsVerified") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Type") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("Value") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "CustomerProfileId", "Type"); b.HasIndex("TenantId", "CustomerProfileId", "Type", "IsPrimary") .IsUnique() .HasDatabaseName("ux_customer_contact_primary_per_type") .HasFilter("\"IsPrimary\" = TRUE"); b.ToTable("customer_contacts", null, t => { t.HasCheckConstraint("ck_customer_contacts_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_customer_contacts_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Status") .HasColumnType("integer"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Type") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "DisplayName"); b.ToTable("customer_profiles", null, t => { t.HasCheckConstraint("ck_customer_profiles_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_customer_profiles_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerTag", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("CustomerProfileId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Tag") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "CustomerProfileId", "Tag") .IsUnique(); b.ToTable("customer_tags", null, t => { t.HasCheckConstraint("ck_customer_tags_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_customer_tags_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.OrganizationProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("BranchCode") .HasMaxLength(5) .HasColumnType("character varying(5)"); b.Property("CompanyType") .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("CustomerProfileId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("LegalNameEn") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("LegalNameTh") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("RegistrationNo") .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("TaxId13") .HasMaxLength(13) .HasColumnType("character varying(13)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "CustomerProfileId") .IsUnique(); b.HasIndex("TenantId", "TaxId13", "BranchCode") .IsUnique() .HasFilter("\"TaxId13\" IS NOT NULL"); b.ToTable("organization_profiles", null, t => { t.HasCheckConstraint("ck_organization_profiles_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_organization_profiles_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.PersonProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("BirthDate") .HasColumnType("timestamp with time zone"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("CustomerProfileId") .HasColumnType("uuid"); b.Property("FirstNameEn") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("FirstNameTh") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("LastNameEn") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("LastNameTh") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("NationalId") .HasMaxLength(13) .HasColumnType("character varying(13)"); b.Property("PassportNo") .HasMaxLength(32) .HasColumnType("character varying(32)"); b.Property("Prefix") .HasMaxLength(32) .HasColumnType("character varying(32)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "CustomerProfileId") .IsUnique(); b.ToTable("person_profiles", null, t => { t.HasCheckConstraint("ck_person_profiles_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_person_profiles_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Department", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("ParentDepartmentId") .HasColumnType("uuid"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "Code") .IsUnique(); b.HasIndex("TenantId", "ParentDepartmentId"); b.ToTable("departments", null, t => { t.HasCheckConstraint("ck_departments_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_departments_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.EmergencyContact", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("Email") .HasColumnType("text"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsPrimary") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Phone") .HasColumnType("text"); b.Property("Relationship") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserProfileId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserProfileId", "IsPrimary"); b.ToTable("emergency_contacts", null, t => { t.HasCheckConstraint("ck_emergency_contacts_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_emergency_contacts_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.EmployeeAddress", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("City") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Country") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsPrimary") .HasColumnType("boolean"); b.Property("Line1") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("Line2") .HasColumnType("text"); b.Property("PostalCode") .IsRequired() .HasMaxLength(32) .HasColumnType("character varying(32)"); b.Property("State") .HasColumnType("text"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Type") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserProfileId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserProfileId", "IsPrimary"); b.ToTable("employee_addresses", null, t => { t.HasCheckConstraint("ck_employee_addresses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_employee_addresses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.EmployeeBankAccount", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AccountHolder") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("AccountNumber") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("BankName") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Branch") .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsPrimary") .HasColumnType("boolean"); b.Property("Note") .HasColumnType("text"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserProfileId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserProfileId", "IsPrimary"); b.ToTable("employee_bank_accounts", null, t => { t.HasCheckConstraint("ck_employee_bank_accounts_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_employee_bank_accounts_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Employment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("DepartmentId") .HasColumnType("uuid"); b.Property("EmploymentType") .HasColumnType("integer"); b.Property("EndDate") .HasColumnType("timestamp with time zone"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("ManagerUserId") .HasColumnType("uuid"); b.Property("PositionId") .HasColumnType("uuid"); b.Property("StartDate") .HasColumnType("timestamp with time zone"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserProfileId") .HasColumnType("uuid"); b.Property("WorkEmail") .HasColumnType("text"); b.Property("WorkPhone") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "DepartmentId"); b.HasIndex("TenantId", "PositionId"); b.HasIndex("TenantId", "UserProfileId", "StartDate"); b.ToTable("employments", null, t => { t.HasCheckConstraint("ck_employments_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_employments_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Position", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("Level") .HasColumnType("integer"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("Title") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "Code") .IsUnique(); b.ToTable("positions", null, t => { t.HasCheckConstraint("ck_positions_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_positions_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("DateOfBirth") .HasColumnType("timestamp with time zone"); b.Property("DepartmentId") .HasColumnType("uuid"); b.Property("FirstName") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Gender") .HasColumnType("integer"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("LastName") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("MiddleName") .HasColumnType("text"); b.Property("Nickname") .HasColumnType("text"); b.Property("PositionId") .HasColumnType("uuid"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("DepartmentId"); b.HasIndex("PositionId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "UserId") .IsUnique(); b.ToTable("user_profiles", null, t => { t.HasCheckConstraint("ck_user_profiles_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_user_profiles_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Allergen", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("allergens", "master", t => { t.HasCheckConstraint("ck_allergens_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_allergens_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.AllergenBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("allergen_blocks", "master", t => { t.HasCheckConstraint("ck_allergen_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_allergen_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Brand", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("ExternalRef") .HasColumnType("text"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("brands", "master", t => { t.HasCheckConstraint("ck_brands_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_brands_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.BrandBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("brand_blocks", "master", t => { t.HasCheckConstraint("ck_brand_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_brand_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("ParentId") .HasColumnType("uuid"); b.Property("Path") .HasColumnType("text"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("SortOrder") .HasColumnType("integer"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("ParentId"); b.HasIndex("Path"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "ParentId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.HasIndex("Scope", "TenantId", "SortOrder"); b.ToTable("categories", "master", t => { t.HasCheckConstraint("ck_categories_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_categories_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CategoryBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("category_blocks", "master", t => { t.HasCheckConstraint("ck_category_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_category_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CategoryExt", b => { b.Property("CategoryId") .HasColumnType("uuid"); b.Property("ChannelVisibility") .HasColumnType("jsonb"); b.Property("FacetSchema") .HasColumnType("jsonb"); b.Property("ImageUrl") .HasColumnType("text"); b.Property("SeoDescription") .HasColumnType("text"); b.Property("SeoTitle") .HasColumnType("text"); b.Property("Slug") .HasColumnType("text"); b.HasKey("CategoryId"); b.ToTable("category_exts", "master"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.ComplianceStatus", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("compliance_statuses", "master", t => { t.HasCheckConstraint("ck_compliance_statuses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_compliance_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.ComplianceStatusBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("compliance_status_blocks", "master", t => { t.HasCheckConstraint("ck_compliance_status_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_compliance_status_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Country", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("countries", "master", t => { t.HasCheckConstraint("ck_countries_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_countries_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CountryBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("country_blocks", "master", t => { t.HasCheckConstraint("ck_country_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_country_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("Exponent") .HasColumnType("smallint"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("currencies", "master", t => { t.HasCheckConstraint("ck_currencies_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_currencies_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CurrencyBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("currency_blocks", "master", t => { t.HasCheckConstraint("ck_currency_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_currency_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.DocControlStatus", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("doc_control_statuses", "master", t => { t.HasCheckConstraint("ck_doc_control_statuses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_doc_control_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.DocControlStatusBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("doc_control_status_blocks", "master", t => { t.HasCheckConstraint("ck_doc_control_status_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_doc_control_status_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.FuncTest", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("func_tests", "master", t => { t.HasCheckConstraint("ck_func_tests_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_func_tests_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.FuncTestBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("func_test_blocks", "master", t => { t.HasCheckConstraint("ck_func_test_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_func_test_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.HazardClass", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("hazard_classes", "master", t => { t.HasCheckConstraint("ck_hazard_classes_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_hazard_classes_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.HazardClassBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("hazard_class_blocks", "master", t => { t.HasCheckConstraint("ck_hazard_class_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_hazard_class_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Language", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("languages", "master", t => { t.HasCheckConstraint("ck_languages_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_languages_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.LanguageBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("language_blocks", "master", t => { t.HasCheckConstraint("ck_language_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_language_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Manufacturer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CountryCode") .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("manufacturers", "master", t => { t.HasCheckConstraint("ck_manufacturers_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_manufacturers_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.ManufacturerBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("manufacturer_blocks", "master", t => { t.HasCheckConstraint("ck_manufacturer_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_manufacturer_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Market", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("markets", "master", t => { t.HasCheckConstraint("ck_markets_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_markets_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.MarketBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("market_blocks", "master", t => { t.HasCheckConstraint("ck_market_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_market_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.PackingGroup", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("packing_groups", "master", t => { t.HasCheckConstraint("ck_packing_groups_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_packing_groups_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.PackingGroupBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("packing_group_blocks", "master", t => { t.HasCheckConstraint("ck_packing_group_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_packing_group_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.QaStage", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("qa_stages", "master", t => { t.HasCheckConstraint("ck_qa_stages_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_qa_stages_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.QaStageBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("qa_stage_blocks", "master", t => { t.HasCheckConstraint("ck_qa_stage_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_qa_stage_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.QcStatus", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("qc_statuses", "master", t => { t.HasCheckConstraint("ck_qc_statuses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_qc_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.QcStatusBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("qc_status_blocks", "master", t => { t.HasCheckConstraint("ck_qc_status_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_qc_status_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RecallClass", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("recall_classes", "master", t => { t.HasCheckConstraint("ck_recall_classes_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_recall_classes_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RecallClassBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("recall_class_blocks", "master", t => { t.HasCheckConstraint("ck_recall_class_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_recall_class_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RiskClass", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("risk_classes", "master", t => { t.HasCheckConstraint("ck_risk_classes_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_risk_classes_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RiskClassBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("risk_class_blocks", "master", t => { t.HasCheckConstraint("ck_risk_class_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_risk_class_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Route", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("routes", "master", t => { t.HasCheckConstraint("ck_routes_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_routes_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RouteBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("route_blocks", "master", t => { t.HasCheckConstraint("ck_route_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_route_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RxSchedule", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("rx_schedules", "master", t => { t.HasCheckConstraint("ck_rx_schedules_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_rx_schedules_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RxScheduleBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("rx_schedule_blocks", "master", t => { t.HasCheckConstraint("ck_rx_schedule_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_rx_schedule_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Species", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("species", "master", t => { t.HasCheckConstraint("ck_species_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_species_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.SpeciesBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("species_blocks", "master", t => { t.HasCheckConstraint("ck_species_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_species_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.StabilityStatus", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("stability_statuses", "master", t => { t.HasCheckConstraint("ck_stability_statuses_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_stability_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.StabilityStatusBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("stability_status_blocks", "master", t => { t.HasCheckConstraint("ck_stability_status_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_stability_status_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.SterilizationMethod", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("sterilization_methods", "master", t => { t.HasCheckConstraint("ck_sterilization_methods_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_sterilization_methods_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.SterilizationMethodBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("sterilization_method_blocks", "master", t => { t.HasCheckConstraint("ck_sterilization_method_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_sterilization_method_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Uom", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("BaseCode") .HasColumnType("text"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("SiFactor") .HasColumnType("numeric"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("uoms", "master", t => { t.HasCheckConstraint("ck_uoms_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_uoms_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.UomBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("uom_blocks", "master", t => { t.HasCheckConstraint("ck_uom_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_uom_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Vvm", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("IsSystem") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Meta") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NameI18n") .HasColumnType("jsonb"); b.Property("OverridesGlobalId") .HasColumnType("uuid"); b.Property("Scope") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("text") .HasDefaultValue("global"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasAlternateKey("TenantId", "Id"); b.HasIndex("TenantId"); b.HasIndex("Scope", "TenantId", "Code") .IsUnique(); b.ToTable("vvms", "master", t => { t.HasCheckConstraint("ck_vvms_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_vvms_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.VvmBlock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("created_at") .HasDefaultValueSql("now() at time zone 'utc'"); b.Property("CreatedBy") .HasColumnType("text") .HasColumnName("created_by"); b.Property("GlobalId") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("TenantId") .HasColumnType("uuid") .HasColumnName("tenant_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UpdatedBy") .HasColumnType("text") .HasColumnName("updated_by"); b.HasKey("Id"); b.HasIndex("GlobalId"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "GlobalId") .IsUnique(); b.ToTable("vvm_blocks", "master", t => { t.HasCheckConstraint("ck_vvm_blocks_tenant_not_null", "tenant_id is not null"); t.HasCheckConstraint("ck_vvm_blocks_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'"); }); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Tenancy.TenantConfig", b => { b.Property("TenantKey") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("ConnectionString") .HasColumnType("text"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Mode") .HasColumnType("integer"); b.Property("Schema") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("TenantId") .HasColumnType("uuid"); b.Property("UpdatedAtUtc") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("updated_at_utc") .HasDefaultValueSql("now() at time zone 'utc'"); b.HasKey("TenantKey"); b.HasAlternateKey("TenantId"); b.HasIndex("IsActive"); b.HasIndex("TenantId") .IsUnique(); b.ToTable("tenants", "meta"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Tenancy.TenantDomain", b => { b.Property("Domain") .HasMaxLength(253) .HasColumnType("character varying(253)"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsPlatformBaseDomain") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("TenantKey") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("UpdatedAtUtc") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasColumnName("updated_at_utc") .HasDefaultValueSql("now() at time zone 'utc'"); b.HasKey("Domain"); b.HasIndex("IsActive"); b.HasIndex("IsPlatformBaseDomain"); b.HasIndex("TenantKey"); b.ToTable("tenant_domains", "meta"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.RolePermission", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.Permission", "Permission") .WithMany("RolePermissions") .HasForeignKey("PermissionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.Role", "Role") .WithMany("RolePermissions") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.Permission", null) .WithMany() .HasForeignKey("TenantId", "PermissionId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.Role", null) .WithMany() .HasForeignKey("TenantId", "RoleId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Permission"); b.Navigation("Role"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserExternalAccount", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithMany("ExternalAccounts") .HasForeignKey("TenantId", "UserId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserIdentity", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithMany("Identities") .HasForeignKey("TenantId", "UserId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserMfaFactor", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithMany("MfaFactors") .HasForeignKey("TenantId", "UserId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserPasswordHistory", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithMany("PasswordHistories") .HasForeignKey("TenantId", "UserId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserRole", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.Role", "Role") .WithMany("UserRoles") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithMany("UserRoles") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.Role", null) .WithMany() .HasForeignKey("TenantId", "RoleId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", null) .WithMany() .HasForeignKey("TenantId", "UserId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Role"); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.UserSession", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithMany("Sessions") .HasForeignKey("TenantId", "UserId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerAddress", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Customers.Address", "Address") .WithMany("CustomerLinks") .HasForeignKey("TenantId", "AddressId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "Customer") .WithMany("Addresses") .HasForeignKey("TenantId", "CustomerProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Address"); b.Navigation("Customer"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerContact", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "Customer") .WithMany("Contacts") .HasForeignKey("TenantId", "CustomerProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Customer"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerTag", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "Customer") .WithMany("Tags") .HasForeignKey("TenantId", "CustomerProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Customer"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.OrganizationProfile", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "Customer") .WithOne("Organization") .HasForeignKey("AMREZ.EOP.Domain.Entities.Customers.OrganizationProfile", "TenantId", "CustomerProfileId") .HasPrincipalKey("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Customer"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.PersonProfile", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "Customer") .WithOne("Person") .HasForeignKey("AMREZ.EOP.Domain.Entities.Customers.PersonProfile", "TenantId", "CustomerProfileId") .HasPrincipalKey("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", "TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Customer"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Department", b => { b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.Department", "Parent") .WithMany("Children") .HasForeignKey("TenantId", "ParentDepartmentId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Restrict); b.Navigation("Parent"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.EmergencyContact", b => { b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", "UserProfile") .WithMany("EmergencyContacts") .HasForeignKey("TenantId", "UserProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("UserProfile"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.EmployeeAddress", b => { b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", "UserProfile") .WithMany("Addresses") .HasForeignKey("TenantId", "UserProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("UserProfile"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.EmployeeBankAccount", b => { b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", "UserProfile") .WithMany("BankAccounts") .HasForeignKey("TenantId", "UserProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("UserProfile"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Employment", b => { b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.Department", "Department") .WithMany() .HasForeignKey("TenantId", "DepartmentId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Restrict); b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.Position", "Position") .WithMany() .HasForeignKey("TenantId", "PositionId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Restrict); b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", "UserProfile") .WithMany("Employments") .HasForeignKey("TenantId", "UserProfileId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Department"); b.Navigation("Position"); b.Navigation("UserProfile"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", b => { b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.Department", null) .WithMany("Profiles") .HasForeignKey("DepartmentId"); b.HasOne("AMREZ.EOP.Domain.Entities.HumanResources.Position", null) .WithMany("Profiles") .HasForeignKey("PositionId"); b.HasOne("AMREZ.EOP.Domain.Entities.Authentications.User", "User") .WithOne() .HasForeignKey("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", "TenantId", "UserId") .HasPrincipalKey("AMREZ.EOP.Domain.Entities.Authentications.User", "TenantId", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.AllergenBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Allergen", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.BrandBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Brand", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Category", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Category", "Parent") .WithMany("Children") .HasForeignKey("TenantId", "ParentId") .HasPrincipalKey("TenantId", "Id") .OnDelete(DeleteBehavior.Restrict); b.Navigation("Parent"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CategoryBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Category", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CategoryExt", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Category", "Category") .WithOne() .HasForeignKey("AMREZ.EOP.Domain.Entities.MasterData.CategoryExt", "CategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Category"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.ComplianceStatusBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.ComplianceStatus", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CountryBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Country", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.CurrencyBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Currency", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.DocControlStatusBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.DocControlStatus", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.FuncTestBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.FuncTest", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.HazardClassBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.HazardClass", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.LanguageBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Language", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.ManufacturerBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Manufacturer", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.MarketBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Market", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.PackingGroupBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.PackingGroup", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.QaStageBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.QaStage", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.QcStatusBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.QcStatus", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RecallClassBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.RecallClass", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RiskClassBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.RiskClass", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RouteBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Route", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.RxScheduleBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.RxSchedule", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.SpeciesBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Species", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.StabilityStatusBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.StabilityStatus", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.SterilizationMethodBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.SterilizationMethod", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.UomBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Uom", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.VvmBlock", b => { b.HasOne("AMREZ.EOP.Domain.Entities.MasterData.Vvm", null) .WithMany() .HasForeignKey("GlobalId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Tenancy.TenantDomain", b => { b.HasOne("AMREZ.EOP.Domain.Entities.Tenancy.TenantConfig", null) .WithMany() .HasForeignKey("TenantKey") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.Permission", b => { b.Navigation("RolePermissions"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.Role", b => { b.Navigation("RolePermissions"); b.Navigation("UserRoles"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Authentications.User", b => { b.Navigation("ExternalAccounts"); b.Navigation("Identities"); b.Navigation("MfaFactors"); b.Navigation("PasswordHistories"); b.Navigation("Sessions"); b.Navigation("UserRoles"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.Address", b => { b.Navigation("CustomerLinks"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.Customers.CustomerProfile", b => { b.Navigation("Addresses"); b.Navigation("Contacts"); b.Navigation("Organization"); b.Navigation("Person"); b.Navigation("Tags"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Department", b => { b.Navigation("Children"); b.Navigation("Profiles"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.Position", b => { b.Navigation("Profiles"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.HumanResources.UserProfile", b => { b.Navigation("Addresses"); b.Navigation("BankAccounts"); b.Navigation("EmergencyContacts"); b.Navigation("Employments"); }); modelBuilder.Entity("AMREZ.EOP.Domain.Entities.MasterData.Category", b => { b.Navigation("Children"); }); #pragma warning restore 612, 618 } } }