// using System; using System.Collections.Generic; using Manager.DTOs; using ManagerService.DTOs; using ManagerService.Data; using ManagerService.Data.SubSection; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace ManagerService.Migrations { [DbContext(typeof(MyInfoMateDbContext))] [Migration("20250324140608_UpdateMix2")] partial class UpdateMix2 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("ManagerService.Data.Configuration", b => { b.Property("Id") .HasColumnType("text"); b.Property("DateCreation") .HasColumnType("timestamp with time zone"); b.Property("ImageId") .HasColumnType("text"); b.Property("ImageSource") .HasColumnType("text"); b.Property("InstanceId") .IsRequired() .HasColumnType("text"); b.Property("IsDate") .HasColumnType("boolean"); b.Property("IsHour") .HasColumnType("boolean"); b.Property("IsMobile") .HasColumnType("boolean"); b.Property("IsOffline") .HasColumnType("boolean"); b.Property("IsSectionImageBackground") .HasColumnType("boolean"); b.Property("IsTablet") .HasColumnType("boolean"); b.Property("Label") .IsRequired() .HasColumnType("text"); b.PrimitiveCollection>("Languages") .HasColumnType("text[]"); b.Property("LoaderImageId") .HasColumnType("text"); b.Property("LoaderImageUrl") .HasColumnType("text"); b.Property("PrimaryColor") .HasColumnType("text"); b.Property("RoundedValue") .HasColumnType("integer"); b.Property("ScreenPercentageSectionsMainPage") .HasColumnType("integer"); b.Property("SecondaryColor") .HasColumnType("text"); b.Property>("Title") .IsRequired() .HasColumnType("jsonb"); b.HasKey("Id"); b.ToTable("Configurations"); }); modelBuilder.Entity("ManagerService.Data.Device", b => { b.Property("Id") .HasColumnType("text"); b.Property("BatteryLevel") .HasColumnType("text"); b.Property("ConfigurationId") .IsRequired() .HasColumnType("text"); b.Property("Connected") .HasColumnType("boolean"); b.Property("ConnectionLevel") .HasColumnType("text"); b.Property("DateCreation") .HasColumnType("timestamp with time zone"); b.Property("DateUpdate") .HasColumnType("timestamp with time zone"); b.Property("Identifier") .HasColumnType("text"); b.Property("InstanceId") .IsRequired() .HasColumnType("text"); b.Property("IpAddressETH") .IsRequired() .HasColumnType("text"); b.Property("IpAddressWLAN") .IsRequired() .HasColumnType("text"); b.Property("LastBatteryLevel") .HasColumnType("timestamp with time zone"); b.Property("LastConnectionLevel") .HasColumnType("timestamp with time zone"); b.Property("Name") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("ConfigurationId"); b.ToTable("Devices"); }); modelBuilder.Entity("ManagerService.Data.Instance", b => { b.Property("Id") .HasColumnType("text"); b.Property("DateCreation") .HasColumnType("timestamp with time zone"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("PinCode") .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Instances"); }); modelBuilder.Entity("ManagerService.Data.Resource", b => { b.Property("Id") .HasColumnType("text"); b.Property("DateCreation") .HasColumnType("timestamp with time zone"); b.Property("GeoPointId") .HasColumnType("integer"); b.Property("InstanceId") .IsRequired() .HasColumnType("text"); b.Property("Label") .IsRequired() .HasColumnType("text"); b.Property("Type") .HasColumnType("integer"); b.Property("Url") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("GeoPointId"); b.ToTable("Resources"); }); modelBuilder.Entity("ManagerService.Data.Section", b => { b.Property("Id") .HasColumnType("text"); b.Property("BeaconId") .HasColumnType("integer"); b.Property("ConfigurationId") .IsRequired() .HasColumnType("text"); b.Property("DateCreation") .HasColumnType("timestamp with time zone"); b.Property>("Description") .HasColumnType("jsonb"); b.Property("Discriminator") .IsRequired() .HasMaxLength(8) .HasColumnType("character varying(8)"); b.Property("ImageId") .HasColumnType("text"); b.Property("ImageSource") .HasColumnType("text"); b.Property("InstanceId") .IsRequired() .HasColumnType("text"); b.Property("IsBeacon") .HasColumnType("boolean"); b.Property("IsSubSection") .HasColumnType("boolean"); b.Property("Label") .IsRequired() .HasColumnType("text"); b.Property("Latitude") .HasColumnType("text"); b.Property("Longitude") .HasColumnType("text"); b.Property("MeterZoneGPS") .HasColumnType("integer"); b.Property("Order") .HasColumnType("integer"); b.Property("ParentId") .HasColumnType("text"); b.Property("SectionMenuId") .HasColumnType("text"); b.Property>("Title") .IsRequired() .HasColumnType("jsonb"); b.Property("Type") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("SectionMenuId"); b.ToTable("Sections"); b.HasDiscriminator().HasValue("Base"); b.UseTphMappingStrategy(); }); modelBuilder.Entity("ManagerService.Data.SubSection.Categorie", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Icon") .HasColumnType("text"); b.Property>("Label") .IsRequired() .HasColumnType("jsonb"); b.Property("Order") .HasColumnType("integer"); b.Property("ResourceId") .HasColumnType("text"); b.Property("SectionMapId") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("ResourceId"); b.HasIndex("SectionMapId"); b.ToTable("Categorie"); }); modelBuilder.Entity("ManagerService.Data.SubSection.Content", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property>("Description") .IsRequired() .HasColumnType("jsonb"); b.Property("Order") .HasColumnType("integer"); b.Property("ResourceId") .HasColumnType("text"); b.Property("SectionArticleId") .HasColumnType("text"); b.Property("SectionSliderId") .HasColumnType("text"); b.Property>("Title") .IsRequired() .HasColumnType("jsonb"); b.HasKey("Id"); b.HasIndex("ResourceId"); b.HasIndex("SectionArticleId"); b.HasIndex("SectionSliderId"); b.ToTable("Content"); }); modelBuilder.Entity("ManagerService.Data.SubSection.GeoPoint", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CategorieId") .HasColumnType("integer"); b.Property>("Description") .IsRequired() .HasColumnType("jsonb"); b.Property>("Email") .IsRequired() .HasColumnType("jsonb"); b.Property("ImageResourceId") .HasColumnType("text"); b.Property("ImageUrl") .HasColumnType("text"); b.Property("Latitude") .HasColumnType("text"); b.Property("Longitude") .HasColumnType("text"); b.Property>("Phone") .IsRequired() .HasColumnType("jsonb"); b.Property>("Prices") .IsRequired() .HasColumnType("jsonb"); b.Property>("Schedules") .IsRequired() .HasColumnType("jsonb"); b.Property("SectionMapId") .HasColumnType("text"); b.Property>("Site") .IsRequired() .HasColumnType("jsonb"); b.Property>("Title") .IsRequired() .HasColumnType("jsonb"); b.HasKey("Id"); b.HasIndex("SectionMapId"); b.ToTable("GeoPoint"); }); modelBuilder.Entity("ManagerService.Data.SubSection.OrderedTranslationAndResource", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Order") .HasColumnType("integer"); b.Property("SectionPdfId") .HasColumnType("text"); b.Property>("TranslationAndResources") .IsRequired() .HasColumnType("jsonb"); b.HasKey("Id"); b.HasIndex("SectionPdfId"); b.ToTable("OrderedTranslationAndResource"); }); modelBuilder.Entity("ManagerService.Data.SubSection.QuizQuestion", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property>("Label") .IsRequired() .HasColumnType("jsonb"); b.Property("Order") .HasColumnType("integer"); b.Property("ResourceId") .HasColumnType("text"); b.Property>("Responses") .IsRequired() .HasColumnType("jsonb"); b.Property("SectionQuizId") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("ResourceId"); b.HasIndex("SectionQuizId"); b.ToTable("QuizQuestion"); }); modelBuilder.Entity("ManagerService.Data.User", b => { b.Property("Id") .HasColumnType("text"); b.Property("DateCreation") .HasColumnType("timestamp with time zone"); b.Property("Email") .IsRequired() .HasColumnType("text"); b.Property("FirstName") .HasColumnType("text"); b.Property("InstanceId") .IsRequired() .HasColumnType("text"); b.Property("LastName") .IsRequired() .HasColumnType("text"); b.Property("Password") .IsRequired() .HasColumnType("text"); b.Property("Token") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Users"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionAgenda", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property("AgendaMapProvider") .HasColumnType("integer"); b.Property>("AgendaResourceIds") .IsRequired() .HasColumnType("jsonb"); b.HasDiscriminator().HasValue("Agenda"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionArticle", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property>("ArticleAudioIds") .IsRequired() .HasColumnType("jsonb"); b.Property>("ArticleContent") .IsRequired() .HasColumnType("jsonb"); b.Property("ArticleIsContentTop") .HasColumnType("boolean"); b.Property("ArticleIsReadAudioAuto") .HasColumnType("boolean"); b.HasDiscriminator().HasValue("Article"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionMap", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property("MapCenterLatitude") .HasColumnType("text"); b.Property("MapCenterLongitude") .HasColumnType("text"); b.Property("MapMapProvider") .HasColumnType("integer"); b.Property("MapMapType") .HasColumnType("integer"); b.Property("MapResourceId") .HasColumnType("text"); b.Property("MapTypeMapbox") .HasColumnType("integer"); b.Property("MapZoom") .HasColumnType("integer"); b.HasIndex("MapResourceId"); b.HasDiscriminator().HasValue("Map"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionMenu", b => { b.HasBaseType("ManagerService.Data.Section"); b.HasDiscriminator().HasValue("Menu"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionPdf", b => { b.HasBaseType("ManagerService.Data.Section"); b.HasDiscriminator().HasValue("PDF"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionPuzzle", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property("PuzzleCols") .HasColumnType("integer"); b.Property("PuzzleImageId") .HasColumnType("text"); b.Property>("PuzzleMessageDebut") .IsRequired() .HasColumnType("jsonb"); b.Property>("PuzzleMessageFin") .IsRequired() .HasColumnType("jsonb"); b.Property("PuzzleRows") .HasColumnType("integer"); b.HasIndex("PuzzleImageId"); b.HasDiscriminator().HasValue("Puzzle"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionQuiz", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property>("QuizBadLevel") .IsRequired() .HasColumnType("jsonb"); b.Property>("QuizGoodLevel") .IsRequired() .HasColumnType("jsonb"); b.Property>("QuizGreatLevel") .IsRequired() .HasColumnType("jsonb"); b.Property>("QuizMediumLevel") .IsRequired() .HasColumnType("jsonb"); b.HasDiscriminator().HasValue("Quiz"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionSlider", b => { b.HasBaseType("ManagerService.Data.Section"); b.HasDiscriminator().HasValue("Slider"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionVideo", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property("VideoSource") .IsRequired() .HasColumnType("text"); b.HasDiscriminator().HasValue("Video"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionWeather", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property("WeatherCity") .HasColumnType("text"); b.Property("WeatherResult") .HasColumnType("text"); b.Property("WeatherUpdatedDate") .HasColumnType("timestamp with time zone"); b.HasDiscriminator().HasValue("Weather"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionWeb", b => { b.HasBaseType("ManagerService.Data.Section"); b.Property("WebSource") .IsRequired() .HasColumnType("text"); b.HasDiscriminator().HasValue("Web"); }); modelBuilder.Entity("ManagerService.Data.Device", b => { b.HasOne("ManagerService.Data.Configuration", "Configuration") .WithMany() .HasForeignKey("ConfigurationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Configuration"); }); modelBuilder.Entity("ManagerService.Data.Resource", b => { b.HasOne("ManagerService.Data.SubSection.GeoPoint", null) .WithMany("Contents") .HasForeignKey("GeoPointId"); }); modelBuilder.Entity("ManagerService.Data.Section", b => { b.HasOne("ManagerService.Data.SubSection.SectionMenu", null) .WithMany("MenuSections") .HasForeignKey("SectionMenuId"); }); modelBuilder.Entity("ManagerService.Data.SubSection.Categorie", b => { b.HasOne("ManagerService.Data.Resource", "Resource") .WithMany() .HasForeignKey("ResourceId"); b.HasOne("ManagerService.Data.SubSection.SectionMap", null) .WithMany("MapCategories") .HasForeignKey("SectionMapId"); b.Navigation("Resource"); }); modelBuilder.Entity("ManagerService.Data.SubSection.Content", b => { b.HasOne("ManagerService.Data.Resource", "Resource") .WithMany() .HasForeignKey("ResourceId"); b.HasOne("ManagerService.Data.SubSection.SectionArticle", null) .WithMany("ArticleContents") .HasForeignKey("SectionArticleId"); b.HasOne("ManagerService.Data.SubSection.SectionSlider", null) .WithMany("SliderContents") .HasForeignKey("SectionSliderId"); b.Navigation("Resource"); }); modelBuilder.Entity("ManagerService.Data.SubSection.GeoPoint", b => { b.HasOne("ManagerService.Data.SubSection.SectionMap", null) .WithMany("MapPoints") .HasForeignKey("SectionMapId"); }); modelBuilder.Entity("ManagerService.Data.SubSection.OrderedTranslationAndResource", b => { b.HasOne("ManagerService.Data.SubSection.SectionPdf", null) .WithMany("PDFOrderedTranslationAndResources") .HasForeignKey("SectionPdfId"); }); modelBuilder.Entity("ManagerService.Data.SubSection.QuizQuestion", b => { b.HasOne("ManagerService.Data.Resource", "Resource") .WithMany() .HasForeignKey("ResourceId"); b.HasOne("ManagerService.Data.SubSection.SectionQuiz", null) .WithMany("QuizQuestions") .HasForeignKey("SectionQuizId"); b.Navigation("Resource"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionMap", b => { b.HasOne("ManagerService.Data.Resource", "MapResource") .WithMany() .HasForeignKey("MapResourceId"); b.Navigation("MapResource"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionPuzzle", b => { b.HasOne("ManagerService.Data.Resource", "PuzzleImage") .WithMany() .HasForeignKey("PuzzleImageId"); b.Navigation("PuzzleImage"); }); modelBuilder.Entity("ManagerService.Data.SubSection.GeoPoint", b => { b.Navigation("Contents"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionArticle", b => { b.Navigation("ArticleContents"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionMap", b => { b.Navigation("MapCategories"); b.Navigation("MapPoints"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionMenu", b => { b.Navigation("MenuSections"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionPdf", b => { b.Navigation("PDFOrderedTranslationAndResources"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionQuiz", b => { b.Navigation("QuizQuestions"); }); modelBuilder.Entity("ManagerService.Data.SubSection.SectionSlider", b => { b.Navigation("SliderContents"); }); #pragma warning restore 612, 618 } } }