using Asentrafin.Api.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Asentrafin.Api.Data.Configurations; public class PlaidItemConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("plaid_items"); builder.HasKey(item => item.Id); builder.Property(item => item.AccessToken).IsRequired(); builder.Property(item => item.PlaidItemId).HasMaxLength(128); builder.Property(item => item.InstitutionId).HasMaxLength(128); builder.Property(item => item.InstitutionName).HasMaxLength(256); builder.Property(item => item.TransactionsCursor).HasMaxLength(512); builder.HasIndex(item => item.PlaidItemId).IsUnique(); } }