mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 19:40:06 +01:00
214 lines
6.9 KiB
C#
214 lines
6.9 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using QuotifyBE.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace QuotifyBE.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.Category", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Categories");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.Image", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Url")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Images");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.Quote", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Author")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int?>("ImageId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("LastUpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Text")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ImageId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Quotes");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.QuoteCategory", b =>
|
|
{
|
|
b.Property<int>("QuoteId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("CategoryId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("QuoteId", "CategoryId");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.ToTable("QuoteCategories");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.Statistic", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("IValue")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Label")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("SValue")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Label")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Statistics");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Role")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.Quote", b =>
|
|
{
|
|
b.HasOne("QuotifyBE.Entities.Image", "Image")
|
|
.WithMany()
|
|
.HasForeignKey("ImageId");
|
|
|
|
b.HasOne("QuotifyBE.Entities.User", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Image");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.QuoteCategory", b =>
|
|
{
|
|
b.HasOne("QuotifyBE.Entities.Category", "Category")
|
|
.WithMany()
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("QuotifyBE.Entities.Quote", "Quote")
|
|
.WithMany("QuoteCategories")
|
|
.HasForeignKey("QuoteId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Category");
|
|
|
|
b.Navigation("Quote");
|
|
});
|
|
|
|
modelBuilder.Entity("QuotifyBE.Entities.Quote", b =>
|
|
{
|
|
b.Navigation("QuoteCategories");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|