400 lines
14 KiB
C#
400 lines
14 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Musify.Infrastructure.Persistence;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Musify.Infrastructure.Persistence.Migrations
|
|
{
|
|
[DbContext(typeof(Database))]
|
|
partial class DatabaseModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.5")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.PlayList", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedDate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("LargePictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("MediumPictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<string>("OriginalPictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("SmallPictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<DateTime>("UpdatedDate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("PlayLists");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.PlayListHasTrack", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("AddedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("PlayListId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Position")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<Guid>("TrackId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PlayListId");
|
|
|
|
b.HasIndex("TrackId");
|
|
|
|
b.ToTable("PlayListHasTrack");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.ProcessExecution", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("ConversationId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("CorrelationId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("ErrorMessage")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<DateTime?>("FinishedDateTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("MessageId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("ProcessName")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<DateTime>("StartedDateTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CorrelationId", "ProcessName");
|
|
|
|
b.ToTable("ProcessExecution");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.ProcessStepExecution", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Attempt")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ComponentType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("ErrorMessage")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<DateTime?>("FinishedDateTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("ProcessExecutionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("StartedDateTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("StepName")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProcessExecutionId", "StepName");
|
|
|
|
b.ToTable("ProcessStepExecution");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.Track", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("AudioFolderName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<DateTime>("CreatedDate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("LargePictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("MediumPictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("NormalizedTitle")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<string>("OriginalAudioName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("OriginalPictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("SmallPictureName")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<DateTime>("UpdatedDate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Tracks");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.Upload", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Bucket")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ContentType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Key")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("State")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Upload");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.UserHasTrack", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("TrackId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TrackId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserHasTrack");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.PlayList", b =>
|
|
{
|
|
b.HasOne("Musify.Domain.Entities.User", "User")
|
|
.WithMany("PlayLists")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.PlayListHasTrack", b =>
|
|
{
|
|
b.HasOne("Musify.Domain.Entities.PlayList", "PlayList")
|
|
.WithMany("PlayListTracks")
|
|
.HasForeignKey("PlayListId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Musify.Domain.Entities.Track", "Track")
|
|
.WithMany("PlayListTracks")
|
|
.HasForeignKey("TrackId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("PlayList");
|
|
|
|
b.Navigation("Track");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.ProcessStepExecution", b =>
|
|
{
|
|
b.HasOne("Musify.Domain.Entities.ProcessExecution", "ProcessExecution")
|
|
.WithMany("Steps")
|
|
.HasForeignKey("ProcessExecutionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("ProcessExecution");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.UserHasTrack", b =>
|
|
{
|
|
b.HasOne("Musify.Domain.Entities.Track", "Track")
|
|
.WithMany("UserTracks")
|
|
.HasForeignKey("TrackId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Musify.Domain.Entities.User", "User")
|
|
.WithMany("UserTracks")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Track");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.PlayList", b =>
|
|
{
|
|
b.Navigation("PlayListTracks");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.ProcessExecution", b =>
|
|
{
|
|
b.Navigation("Steps");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.Track", b =>
|
|
{
|
|
b.Navigation("PlayListTracks");
|
|
|
|
b.Navigation("UserTracks");
|
|
});
|
|
|
|
modelBuilder.Entity("Musify.Domain.Entities.User", b =>
|
|
{
|
|
b.Navigation("PlayLists");
|
|
|
|
b.Navigation("UserTracks");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|