/
afanasevn
/
MaxSystems
Обзор
Документация
Войти
/
afanasevn
/
MaxSystems
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/MaxSystems.Infrastructure/Data/Configurations/ImportLogConfiguration.cs
24 строки
798 B
IBS\NAfanasev
Add project files.
18 июн 2026, 01:12
18 июн 2026, 01:12
b06aa39
Код
Авторство
О чём код?
using MaxSystems.Domain.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace MaxSystems.Infrastructure.Data.Configurations; public class ImportLogConfiguration : IEntityTypeConfiguration<ImportLog> { public void Configure(EntityTypeBuilder<ImportLog> builder) { builder.ToTable("import_logs"); builder.HasKey(x => x.Id); builder.Property(x => x.FileName).HasMaxLength(512).IsRequired(); builder.Property(x => x.DataType).HasMaxLength(64).IsRequired(); builder.Property(x => x.ErrorsJson).HasColumnType("jsonb"); builder.HasOne(x => x.User) .WithMany(x => x.ImportLogs) .HasForeignKey(x => x.UserId) .OnDelete(DeleteBehavior.SetNull); } }