Инициализировать репозиторий «Дейл»

Первый коммит: модульный монолит ядра (.NET 10) и gRPC-сервисы
ai/ml/telegram, фронтенд Vue 3/Vite/Tailwind, документация (ТЗ,
инструкция пользователя, техдокументация, код-стайл), бэклог,
скрипты развёртывания и архив прототипа LeadRadar.
This commit is contained in:
Rustam Khalimov
2026-09-11 02:50:17 +03:00
commit 9e07568ddd
1402 changed files with 177470 additions and 0 deletions
@@ -0,0 +1,31 @@
using Deal.Infrastructure.Persistence.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Deal.Infrastructure.Persistence;
/// <summary>
/// EF-конфигурация лимита тенанта: таблица tenant_limits в схеме public.
/// </summary>
public sealed class TenantLimitConfiguration : IEntityTypeConfiguration<TenantLimitEntity>
{
public void Configure(EntityTypeBuilder<TenantLimitEntity> builder)
{
builder.ToTable("tenant_limits", "public");
builder.HasKey(x => x.TenantId);
builder.Property(x => x.BudgetTokens).IsRequired();
builder.Property(x => x.Period).IsRequired().HasDefaultValue("month");
builder.Property(x => x.PeriodStart).IsRequired();
builder.Property(x => x.UsedTokens).IsRequired();
builder.Property(x => x.Warned80).IsRequired();
builder.Property(x => x.NotifiedExhausted).IsRequired();
builder.Property(x => x.UpdatedAt).IsRequired();
builder.HasOne<TenantEntity>()
.WithMany()
.HasForeignKey(x => x.TenantId)
.OnDelete(DeleteBehavior.Restrict);
}
}