feat: update entity configurations to specify column types for cities, states, and countries
This commit is contained in:
+5
-1
@@ -20,7 +20,9 @@ public class CityConfiguration : IEntityTypeConfiguration<City>
|
||||
|
||||
builder.Property(c => c.Name)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.Latitude)
|
||||
.IsRequired()
|
||||
@@ -33,6 +35,8 @@ public class CityConfiguration : IEntityTypeConfiguration<City>
|
||||
builder.Property(c => c.Native)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
|
||||
.HasDefaultValue("");
|
||||
|
||||
builder.Property(c => c.IsDeleted)
|
||||
|
||||
+18
-6
@@ -20,7 +20,9 @@ public class CountryConfiguration : IEntityTypeConfiguration<Country>
|
||||
|
||||
builder.Property(c => c.Name)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.Iso3)
|
||||
.IsRequired()
|
||||
@@ -40,7 +42,9 @@ public class CountryConfiguration : IEntityTypeConfiguration<Country>
|
||||
|
||||
builder.Property(c => c.Capital)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.Currency)
|
||||
.IsRequired()
|
||||
@@ -48,7 +52,9 @@ public class CountryConfiguration : IEntityTypeConfiguration<Country>
|
||||
|
||||
builder.Property(c => c.CurrencyName)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.CurrencySymbol)
|
||||
.IsRequired()
|
||||
@@ -60,15 +66,21 @@ public class CountryConfiguration : IEntityTypeConfiguration<Country>
|
||||
|
||||
builder.Property(c => c.Native)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.Region)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.Subregion)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)")
|
||||
;
|
||||
|
||||
builder.Property(c => c.Latitude)
|
||||
.IsRequired()
|
||||
|
||||
+8
-2
@@ -20,7 +20,9 @@ public class StateConfiguration : IEntityTypeConfiguration<State>
|
||||
|
||||
builder.Property(s => s.Name)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
;
|
||||
|
||||
builder.Property(s => s.StateCode)
|
||||
.IsRequired()
|
||||
@@ -36,11 +38,15 @@ public class StateConfiguration : IEntityTypeConfiguration<State>
|
||||
|
||||
builder.Property(s => s.Type)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)")
|
||||
;
|
||||
|
||||
builder.Property(s => s.Native)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)")
|
||||
|
||||
.HasDefaultValue("");
|
||||
|
||||
builder.Property(s => s.IsDeleted)
|
||||
|
||||
+3523
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class u14 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user