Files
mmorales.photo/back/persistance/data/migrations/DataContextModelSnapshot.cs
2025-08-24 14:18:20 +02:00

750 lines
24 KiB
C#

// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using back.persistance.data;
#nullable disable
namespace back.Migrations
{
[DbContext(typeof(DataContext))]
partial class DataContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("EventTag", b =>
{
b.Property<string>("EventId")
.HasColumnType("TEXT");
b.Property<string>("TagId")
.HasColumnType("TEXT");
b.HasKey("EventId", "TagId");
b.HasIndex("TagId");
b.ToTable("EventTags", (string)null);
});
modelBuilder.Entity("GalleryPhoto", b =>
{
b.Property<string>("GalleryId")
.HasColumnType("TEXT");
b.Property<string>("PhotoId")
.HasColumnType("TEXT");
b.HasKey("GalleryId", "PhotoId");
b.HasIndex("PhotoId");
b.ToTable("GalleryPhotos", (string)null);
});
modelBuilder.Entity("GalleryTag", b =>
{
b.Property<string>("GalleryId")
.HasColumnType("TEXT");
b.Property<string>("TagId")
.HasColumnType("TEXT");
b.HasKey("GalleryId", "TagId");
b.HasIndex("TagId");
b.ToTable("GalleryTags", (string)null);
});
modelBuilder.Entity("GalleryUserViewer", b =>
{
b.Property<string>("GalleryId")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.HasKey("GalleryId", "UserId");
b.HasIndex("UserId");
b.ToTable("GalleryUserViewers", (string)null);
});
modelBuilder.Entity("PhotoPerson", b =>
{
b.Property<string>("PhotoId")
.HasColumnType("TEXT");
b.Property<string>("PersonId")
.HasColumnType("TEXT");
b.HasKey("PhotoId", "PersonId");
b.HasIndex("PersonId");
b.ToTable("PhotoPersons", (string)null);
});
modelBuilder.Entity("PhotoTag", b =>
{
b.Property<string>("PhotoId")
.HasColumnType("TEXT");
b.Property<string>("TagId")
.HasColumnType("TEXT");
b.HasKey("PhotoId", "TagId");
b.HasIndex("TagId");
b.ToTable("PhotoTags", (string)null);
});
modelBuilder.Entity("PhotoUserBuyer", b =>
{
b.Property<string>("PhotoId")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.HasKey("PhotoId", "UserId");
b.HasIndex("UserId");
b.ToTable("PhotoUserBuyers", (string)null);
});
modelBuilder.Entity("RolePermission", b =>
{
b.Property<string>("RoleId")
.HasColumnType("TEXT");
b.Property<string>("PermissionId")
.HasColumnType("TEXT");
b.HasKey("RoleId", "PermissionId");
b.HasIndex("PermissionId");
b.ToTable("RolePermissions", (string)null);
});
modelBuilder.Entity("UserRole", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("UserRoles", (string)null);
});
modelBuilder.Entity("back.DataModels.EfmigrationsLock", b =>
{
b.Property<int>("Id")
.HasColumnType("INTEGER");
b.Property<string>("Timestamp")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("__EFMigrationsLock", (string)null);
});
modelBuilder.Entity("back.DataModels.Event", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<string>("Date")
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<int>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("Location")
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Events");
});
modelBuilder.Entity("back.DataModels.Gallery", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("EventId")
.HasColumnType("TEXT");
b.Property<int?>("IsArchived")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<int>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<int?>("IsFavorite")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<int?>("IsPublic")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(1);
b.Property<string>("Title")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("EventId");
b.ToTable("Galleries");
});
modelBuilder.Entity("back.DataModels.Permission", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Permissions");
});
modelBuilder.Entity("back.DataModels.Person", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("Avatar")
.HasColumnType("TEXT");
b.Property<string>("Bio")
.HasMaxLength(250)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasColumnType("TEXT");
b.Property<int>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("ProfilePicture")
.HasColumnType("TEXT");
b.Property<string>("SocialMediaId")
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("SocialMediaId");
b.ToTable("Persons");
});
modelBuilder.Entity("back.DataModels.Photo", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("EventId")
.HasColumnType("TEXT");
b.Property<string>("Extension")
.HasColumnType("TEXT");
b.Property<string>("HighResUrl")
.HasColumnType("TEXT");
b.Property<int?>("IsArchived")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<int?>("IsFavorite")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<int?>("IsPublic")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(1);
b.Property<string>("LowResUrl")
.HasColumnType("TEXT");
b.Property<string>("MidResUrl")
.HasColumnType("TEXT");
b.Property<string>("RankingId")
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("EventId");
b.ToTable("Photos");
});
modelBuilder.Entity("back.DataModels.Ranking", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<int>("DownVotes")
.HasColumnType("INTEGER");
b.Property<int>("TotalVotes")
.HasColumnType("INTEGER");
b.Property<int>("UpVotes")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Rankings");
});
modelBuilder.Entity("back.DataModels.Role", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("BaseRoleModelId")
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(250)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("BaseRoleModelId");
b.ToTable("Roles");
});
modelBuilder.Entity("back.DataModels.SocialMedia", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("BlueSky")
.HasColumnType("TEXT");
b.Property<string>("Discord")
.HasColumnType("TEXT");
b.Property<string>("Facebook")
.HasColumnType("TEXT");
b.Property<string>("Instagram")
.HasColumnType("TEXT");
b.Property<string>("Linkedin")
.HasColumnType("TEXT");
b.Property<string>("Other")
.HasColumnType("TEXT");
b.Property<string>("Pinterest")
.HasColumnType("TEXT");
b.Property<string>("Reddit")
.HasColumnType("TEXT");
b.Property<string>("Tiktok")
.HasColumnType("TEXT");
b.Property<string>("Twitter")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("SocialMedia");
});
modelBuilder.Entity("back.DataModels.Tag", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(25)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex(new[] { "Name" }, "IX_Tags_Name")
.IsUnique();
b.ToTable("Tags");
});
modelBuilder.Entity("back.DataModels.User", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Salt")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("EventTag", b =>
{
b.HasOne("back.DataModels.Event", null)
.WithMany()
.HasForeignKey("EventId")
.IsRequired();
b.HasOne("back.DataModels.Tag", null)
.WithMany()
.HasForeignKey("TagId")
.IsRequired();
});
modelBuilder.Entity("GalleryPhoto", b =>
{
b.HasOne("back.DataModels.Gallery", null)
.WithMany()
.HasForeignKey("GalleryId")
.IsRequired();
b.HasOne("back.DataModels.Photo", null)
.WithMany()
.HasForeignKey("PhotoId")
.IsRequired();
});
modelBuilder.Entity("GalleryTag", b =>
{
b.HasOne("back.DataModels.Gallery", null)
.WithMany()
.HasForeignKey("GalleryId")
.IsRequired();
b.HasOne("back.DataModels.Tag", null)
.WithMany()
.HasForeignKey("TagId")
.IsRequired();
});
modelBuilder.Entity("GalleryUserViewer", b =>
{
b.HasOne("back.DataModels.Gallery", null)
.WithMany()
.HasForeignKey("GalleryId")
.IsRequired();
b.HasOne("back.DataModels.User", null)
.WithMany()
.HasForeignKey("UserId")
.IsRequired();
});
modelBuilder.Entity("PhotoPerson", b =>
{
b.HasOne("back.DataModels.Person", null)
.WithMany()
.HasForeignKey("PersonId")
.IsRequired();
b.HasOne("back.DataModels.Photo", null)
.WithMany()
.HasForeignKey("PhotoId")
.IsRequired();
});
modelBuilder.Entity("PhotoTag", b =>
{
b.HasOne("back.DataModels.Photo", null)
.WithMany()
.HasForeignKey("PhotoId")
.IsRequired();
b.HasOne("back.DataModels.Tag", null)
.WithMany()
.HasForeignKey("TagId")
.IsRequired();
});
modelBuilder.Entity("PhotoUserBuyer", b =>
{
b.HasOne("back.DataModels.Photo", null)
.WithMany()
.HasForeignKey("PhotoId")
.IsRequired();
b.HasOne("back.DataModels.User", null)
.WithMany()
.HasForeignKey("UserId")
.IsRequired();
});
modelBuilder.Entity("RolePermission", b =>
{
b.HasOne("back.DataModels.Permission", null)
.WithMany()
.HasForeignKey("PermissionId")
.IsRequired();
b.HasOne("back.DataModels.Role", null)
.WithMany()
.HasForeignKey("RoleId")
.IsRequired();
});
modelBuilder.Entity("UserRole", b =>
{
b.HasOne("back.DataModels.Role", null)
.WithMany()
.HasForeignKey("RoleId")
.IsRequired();
b.HasOne("back.DataModels.User", null)
.WithMany()
.HasForeignKey("UserId")
.IsRequired();
});
modelBuilder.Entity("back.DataModels.Gallery", b =>
{
b.HasOne("back.DataModels.User", "CreatedByNavigation")
.WithMany("Galleries")
.HasForeignKey("CreatedBy")
.IsRequired();
b.HasOne("back.DataModels.Event", "Event")
.WithMany("Galleries")
.HasForeignKey("EventId");
b.Navigation("CreatedByNavigation");
b.Navigation("Event");
});
modelBuilder.Entity("back.DataModels.Person", b =>
{
b.HasOne("back.DataModels.SocialMedia", "SocialMedia")
.WithMany("People")
.HasForeignKey("SocialMediaId");
b.Navigation("SocialMedia");
});
modelBuilder.Entity("back.DataModels.Photo", b =>
{
b.HasOne("back.DataModels.Person", "CreatedByNavigation")
.WithMany("Photos")
.HasForeignKey("CreatedBy")
.IsRequired();
b.HasOne("back.DataModels.Event", "Event")
.WithMany("Photos")
.HasForeignKey("EventId");
b.Navigation("CreatedByNavigation");
b.Navigation("Event");
});
modelBuilder.Entity("back.DataModels.Role", b =>
{
b.HasOne("back.DataModels.Role", "BaseRoleModel")
.WithMany("InverseBaseRoleModel")
.HasForeignKey("BaseRoleModelId");
b.Navigation("BaseRoleModel");
});
modelBuilder.Entity("back.DataModels.User", b =>
{
b.HasOne("back.DataModels.Person", "IdNavigation")
.WithOne("User")
.HasForeignKey("back.DataModels.User", "Id")
.IsRequired();
b.Navigation("IdNavigation");
});
modelBuilder.Entity("back.DataModels.Event", b =>
{
b.Navigation("Galleries");
b.Navigation("Photos");
});
modelBuilder.Entity("back.DataModels.Person", b =>
{
b.Navigation("Photos");
b.Navigation("User");
});
modelBuilder.Entity("back.DataModels.Role", b =>
{
b.Navigation("InverseBaseRoleModel");
});
modelBuilder.Entity("back.DataModels.SocialMedia", b =>
{
b.Navigation("People");
});
modelBuilder.Entity("back.DataModels.User", b =>
{
b.Navigation("Galleries");
});
#pragma warning restore 612, 618
}
}
}