Files
Backend-Api/CompanyManagment.EFCore/Mapping/ContactUsMapping.cs
2025-04-23 23:22:26 +03:30

20 lines
778 B
C#

using Company.Domain.ContactUsAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class ContactUsMapping:IEntityTypeConfiguration<ContactUs>
{
public void Configure(EntityTypeBuilder<ContactUs> builder)
{
builder.HasKey(x => x.id);
builder.Property(x => x.FullName).HasMaxLength(200);
builder.Property(x => x.Title).HasMaxLength(200);
builder.Property(x => x.Email).HasMaxLength(200);
builder.Property(x => x.FirstName).HasMaxLength(100);
builder.Property(x => x.LastName).HasMaxLength(100);
builder.Property(x => x.Message).HasMaxLength(500);
builder.Property(x => x.PhoneNumber).HasMaxLength(20);
}
}