You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
882 B

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using CellularManagement.Domain.Entities;
namespace CellularManagement.Infrastructure.Configurations.Permission;
public class PermissionConfiguration : IEntityTypeConfiguration<CellularManagement.Domain.Entities.Permission>
{
public void Configure(EntityTypeBuilder<CellularManagement.Domain.Entities.Permission> builder)
{
builder.ToTable("tb_permissions");
builder.HasKey(p => p.Id);
builder.Property(p => p.Name).IsRequired().HasMaxLength(50);
builder.Property(p => p.Description).HasMaxLength(200);
builder.Property(p => p.Code).IsRequired().HasMaxLength(50);
builder.Property(p => p.Type).IsRequired().HasMaxLength(50);
builder.Property(p => p.CreatedAt).IsRequired().HasColumnType("timestamp with time zone");
}
}