/
ilyakos
/
ChatWithAI
Обзор
Документация
Войти
/
ilyakos
/
ChatWithAI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ChatWithAI.Database/Migrations/AppDbContextModelSnapshot.cs
219 строк
7 KB
ilyakos
feat: Добавляет сущности Prompt, Chat, Message с репозиториями
23 май 2026, 16:07
23 май 2026, 16:07
9fd07e3
Код
Авторство
О чём код?
// <auto-generated /> using System; using ChatWithAI.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace ChatWithAI.Database.Migrations { [DbContext(typeof(AppDbContext))] partial class AppDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("ChatWithAI.Database.Models.Chat", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property<DateTime>("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property<DateTime?>("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property<bool>("IsDeleted") .HasColumnType("boolean"); b.Property<string>("LastResponseId") .HasColumnType("text"); b.Property<Guid>("PromptId") .HasColumnType("uuid"); b.Property<Guid>("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("PromptId"); b.HasIndex("UserId"); b.ToTable("Chats"); }); modelBuilder.Entity("ChatWithAI.Database.Models.Message", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property<Guid>("ChatId") .HasColumnType("uuid"); b.Property<DateTime>("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property<DateTime?>("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property<string>("ImageBase64") .HasColumnType("text"); b.Property<bool>("IsDeleted") .HasColumnType("boolean"); b.Property<bool>("IsUser") .HasColumnType("boolean"); b.Property<string>("Text") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("ChatId"); b.ToTable("Messages"); }); modelBuilder.Entity("ChatWithAI.Database.Models.Prompt", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property<DateTime>("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property<Guid>("CreatorId") .HasColumnType("uuid"); b.Property<DateTime?>("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property<string>("ImageBase64") .HasColumnType("text"); b.Property<bool>("IsDeleted") .HasColumnType("boolean"); b.Property<string>("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)"); b.Property<string>("Text") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("CreatorId"); b.ToTable("Prompts"); }); modelBuilder.Entity("ChatWithAI.Database.Models.User", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property<DateTime>("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property<DateTime?>("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property<string>("Email") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property<bool>("IsDeleted") .HasColumnType("boolean"); b.Property<string>("PasswordHash") .IsRequired() .HasColumnType("text"); b.Property<string>("Username") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.HasKey("Id"); b.HasIndex("Email") .IsUnique() .HasFilter("\"IsDeleted\" = false"); b.HasIndex("Username") .IsUnique() .HasFilter("\"IsDeleted\" = false"); b.ToTable("Users"); }); modelBuilder.Entity("ChatWithAI.Database.Models.Chat", b => { b.HasOne("ChatWithAI.Database.Models.Prompt", "Prompt") .WithMany() .HasForeignKey("PromptId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("ChatWithAI.Database.Models.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Prompt"); b.Navigation("User"); }); modelBuilder.Entity("ChatWithAI.Database.Models.Message", b => { b.HasOne("ChatWithAI.Database.Models.Chat", "Chat") .WithMany("Messages") .HasForeignKey("ChatId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Chat"); }); modelBuilder.Entity("ChatWithAI.Database.Models.Prompt", b => { b.HasOne("ChatWithAI.Database.Models.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Creator"); }); modelBuilder.Entity("ChatWithAI.Database.Models.Chat", b => { b.Navigation("Messages"); }); #pragma warning restore 612, 618 } } }