Add address/order handling
This commit is contained in:
@@ -12,10 +12,35 @@ public class OrderAddressConfiguration : EntityBaseConfiguration<OrderAddress>
|
||||
|
||||
builder.Property(oa => oa.OrderId)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(oa => oa.AddressType)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(oa => oa.FirstName)
|
||||
.HasMaxLength(100);
|
||||
|
||||
builder.Property(oa => oa.LastName)
|
||||
.HasMaxLength(100);
|
||||
|
||||
builder.Property(oa => oa.Company)
|
||||
.HasMaxLength(200);
|
||||
|
||||
builder.Property(oa => oa.Street)
|
||||
builder.Property(oa => oa.AddressLine1)
|
||||
.IsRequired()
|
||||
.HasMaxLength(200);
|
||||
|
||||
builder.Property(oa => oa.AddressLine2)
|
||||
.HasMaxLength(200);
|
||||
|
||||
builder.Property(oa => oa.ApartmentNumber)
|
||||
.HasMaxLength(20);
|
||||
|
||||
builder.Property(oa => oa.BuildingNumber)
|
||||
.HasMaxLength(20);
|
||||
|
||||
builder.Property(oa => oa.Floor)
|
||||
.HasMaxLength(20);
|
||||
|
||||
builder.Property(oa => oa.City)
|
||||
.IsRequired()
|
||||
@@ -32,6 +57,12 @@ public class OrderAddressConfiguration : EntityBaseConfiguration<OrderAddress>
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
|
||||
builder.Property(oa => oa.PhoneNumber)
|
||||
.HasMaxLength(20);
|
||||
|
||||
builder.Property(oa => oa.Instructions)
|
||||
.HasMaxLength(500);
|
||||
|
||||
builder.HasIndex(oa => oa.OrderId)
|
||||
.IsUnique()
|
||||
.HasDatabaseName("IX_OrderAddress_OrderId");
|
||||
|
||||
Reference in New Issue
Block a user