// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Musify.Infrastructure.Persistence; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Musify.Infrastructure.Persistence.Migrations { [DbContext(typeof(Database))] [Migration("20260322023145_FirstMigration")] partial class FirstMigration { /// protected override void BuildTargetModel(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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedDate") .HasColumnType("timestamp with time zone"); b.Property("Description") .IsRequired() .HasMaxLength(254) .HasColumnType("character varying(254)"); b.Property("LargePictureKeyName") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("MediumPictureKeyName") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("SmallPictureKeyName") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("UpdatedDate") .HasColumnType("timestamp with time zone"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("PlayLists"); }); modelBuilder.Entity("Musify.Domain.Entities.PlayListHasTrack", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AddedAt") .HasColumnType("timestamp with time zone"); b.Property("PlayListId") .HasColumnType("uuid"); b.Property("Position") .HasColumnType("integer"); b.Property("TrackId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("PlayListId"); b.HasIndex("TrackId"); b.ToTable("PlayListHasTrack"); }); modelBuilder.Entity("Musify.Domain.Entities.ProcessExecution", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConversationId") .HasColumnType("uuid"); b.Property("CorrelationId") .HasColumnType("uuid"); b.Property("ErrorMessage") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("FinishedDateTime") .HasColumnType("timestamp with time zone"); b.Property("MessageId") .HasColumnType("uuid"); b.Property("ProcessName") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("StartedDateTime") .HasColumnType("timestamp with time zone"); b.Property("Status") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("CorrelationId", "ProcessName"); b.ToTable("ProcessExecution"); }); modelBuilder.Entity("Musify.Domain.Entities.ProcessStepExecution", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Attempt") .HasColumnType("integer"); b.Property("ComponentType") .HasColumnType("integer"); b.Property("ErrorMessage") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("FinishedDateTime") .HasColumnType("timestamp with time zone"); b.Property("ProcessExecutionId") .HasColumnType("uuid"); b.Property("StartedDateTime") .HasColumnType("timestamp with time zone"); b.Property("Status") .HasColumnType("integer"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedDate") .HasColumnType("timestamp with time zone"); b.Property("LargePictureKeyName") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("MediumPictureKeyName") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("NormalizedTitle") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("SmallPictureKeyName") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("Title") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("UpdatedDate") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.ToTable("Tracks"); }); modelBuilder.Entity("Musify.Domain.Entities.Upload", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("BucketName") .IsRequired() .HasColumnType("text"); b.Property("ContentType") .IsRequired() .HasColumnType("text"); b.Property("CreatedTime") .HasColumnType("timestamp with time zone"); b.Property("KeyName") .IsRequired() .HasColumnType("text"); b.Property("State") .HasColumnType("integer"); b.HasKey("Id"); b.ToTable("Upload"); }); modelBuilder.Entity("Musify.Domain.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.ToTable("User"); }); modelBuilder.Entity("Musify.Domain.Entities.UserHasTrack", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("TrackId") .HasColumnType("uuid"); b.Property("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 } } }