20 lines
532 B
C#
20 lines
532 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using Nexus.Domain.Entities;
|
|
|
|
namespace Nexus.Infrastructure.Persistence.Configurations;
|
|
|
|
public class ProjectConfiguration : IEntityTypeConfiguration<Project>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Project> builder)
|
|
{
|
|
builder.HasKey(x => x.Id);
|
|
|
|
builder.Property(x => x.Name)
|
|
.IsRequired()
|
|
.HasMaxLength(200);
|
|
|
|
builder.Property(x => x.CreatedAt)
|
|
.IsRequired();
|
|
}
|
|
} |