Cleanup folder structure again

This commit is contained in:
lumijiez
2025-06-21 20:53:49 +03:00
parent f959770e25
commit ec78744d19
100 changed files with 195 additions and 232 deletions

View File

@@ -0,0 +1,39 @@
using Imprink.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Imprink.Infrastructure.Configuration;
public class OrderAddressConfiguration : EntityBaseConfiguration<OrderAddress>
{
public override void Configure(EntityTypeBuilder<OrderAddress> builder)
{
base.Configure(builder);
builder.Property(oa => oa.OrderId)
.IsRequired();
builder.Property(oa => oa.Street)
.IsRequired()
.HasMaxLength(200);
builder.Property(oa => oa.City)
.IsRequired()
.HasMaxLength(100);
builder.Property(oa => oa.State)
.HasMaxLength(100);
builder.Property(oa => oa.PostalCode)
.IsRequired()
.HasMaxLength(20);
builder.Property(oa => oa.Country)
.IsRequired()
.HasMaxLength(100);
builder.HasIndex(oa => oa.OrderId)
.IsUnique()
.HasDatabaseName("IX_OrderAddress_OrderId");
}
}