135 lines
4.8 KiB
C#
135 lines
4.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Hutopy.Modules.Contents.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Hutopy.Modules.Contents.Migrations
|
|
{
|
|
[DbContext(typeof(ContentsDbContext))]
|
|
[Migration("20250609212411_Initial")]
|
|
partial class Initial
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema("Content")
|
|
.HasAnnotation("ProductVersion", "9.0.3")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Hutopy.Modules.Contents.Data.Album", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("boolean")
|
|
.HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true);
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Albums", "Content");
|
|
});
|
|
|
|
modelBuilder.Entity("Hutopy.Modules.Contents.Data.AlbumPhoto", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("AlbumId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Caption")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("boolean")
|
|
.HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true);
|
|
|
|
b.Property<int>("Order")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("OriginalUrl")
|
|
.IsRequired()
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<string>("ThumbnailUrl")
|
|
.IsRequired()
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AlbumId");
|
|
|
|
b.ToTable("AlbumPhotos", "Content");
|
|
});
|
|
|
|
modelBuilder.Entity("Hutopy.Modules.Contents.Data.AlbumPhoto", b =>
|
|
{
|
|
b.HasOne("Hutopy.Modules.Contents.Data.Album", "Album")
|
|
.WithMany("Photos")
|
|
.HasForeignKey("AlbumId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Album");
|
|
});
|
|
|
|
modelBuilder.Entity("Hutopy.Modules.Contents.Data.Album", b =>
|
|
{
|
|
b.Navigation("Photos");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|