manager-service/ManagerService/Migrations/20260912210427_AddImmersiveBackground.Designer.cs
Thomas Fransolet b87e49d808 Cle d'API sur les routes visiteur, canal VR et contenu immersif
Securite
- RequireAppKey : filtre qui exige une cle d'API valide ou un utilisateur du
  manager. Pose sur les routes de contenu consommees par les apps visiteur
  (Configuration, Section, Resource, SectionMap, SectionEvent, SectionAgenda,
  SectionParcours, SectionQuiz, ApplicationInstance). Un [Authorize] d'action
  ne peut pas assouplir celui de la classe ; seul [AllowAnonymous] le
  court-circuite, et le filtre redevient le controle d'acces. Il ferme
  l'enumeration par identifiant, pas la confidentialite : la cle s'obtient
  par le slug ou le pincode.
- Instance/slug/{slug} rendait le pinCode, l'adresse de facturation, la TVA et
  les quotas a qui lit l'URL du site visiteur. StripCommercialFields est
  desormais applique sur slug et byPin ; isTrialActive reste expose pour le
  filigrane d'essai.
- Device.Create et Device/{id}/detail repondaient 403 a toute tablette depuis
  a452f4a (13/03) : la classe exige InstanceAdmin, une cle ne porte que
  AppRead. Ouverts a la cle, le cloisonnement par instance etait deja ecrit.

Canal VR
- Device.AppType (defaut Tablet, backfill a 1) ; Create resout
  l'ApplicationInstance sur ce type au lieu de Tablet en dur.
- Get filtre optionnellement par appType ; DeviceDetailDTO expose appVersion
  et lastSeen.
- PUT Device/{id}/heartbeat : batterie, version, connexion. Volontairement
  etroit, une app ne peut ni se renommer ni changer d'instance.
- ApiKeyAppType.VrApp en fin d'enum.

Contenu immersif
- ResourceType : Image360 (11), Video360 (12), Model3D (13), en fin d'enum.
- Section Scene3D : un modele GLB et ses points d'interet, en objet manipule
  ou en decor habite. Les points sont des GeoPoint, avec une LocalTransform
  en jsonb (convention glTF) ; CRUD dans SectionScene3DController.
- Instance.HasImmersiveContent : l'add-on ajoute 100 Go au quota de stockage,
  repose apres un changement de plan et retire a la desactivation.
- ImmersiveBackground (owned) sur Configuration et ApplicationInstance, avec
  une image de repli pour les canaux qui ne rendent pas l'immersif.

Export de configuration
- exportVersion (1) et generatedAt : le JSON devient un contrat, lu tel quel
  par l'app Unity.
- Section.ToDTO() n'etant pas virtuelle, l'export ne portait aucun champ
  specifique de sous-type. Passe par SectionFactory.ToDTO, et charge les
  points des Map et des Scene3D.
- Le fond immersif et son repli partent avec les ressources, URL resolues.

Migrations : AddAppTypeToDevice, AddScene3DSectionAndImmersiveAddon,
AddImmersiveBackground.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 16:54:10 +02:00

2028 lines
70 KiB
C#

// <auto-generated />
using System;
using System.Collections.Generic;
using Manager.DTOs;
using ManagerService.DTOs;
using ManagerService.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NetTopologySuite.Geometries;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Pgvector;
#nullable disable
namespace ManagerService.Migrations
{
[DbContext(typeof(MyInfoMateDbContext))]
[Migration("20260912210427_AddImmersiveBackground")]
partial class AddImmersiveBackground
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis");
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "vector");
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("ManagerService.Data.ApiKey", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<int>("AppType")
.HasColumnType("integer");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateExpiration")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("KeyHash")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.ToTable("ApiKeys");
});
modelBuilder.Entity("ManagerService.Data.AppConfigurationLink", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("ApplicationInstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ConfigurationId")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("DeviceId")
.HasColumnType("text");
b.Property<int?>("GridColSpan")
.HasColumnType("integer");
b.Property<int?>("GridRowSpan")
.HasColumnType("integer");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsDate")
.HasColumnType("boolean");
b.Property<bool>("IsHour")
.HasColumnType("boolean");
b.Property<bool>("IsSectionImageBackground")
.HasColumnType("boolean");
b.Property<string>("LoaderImageId")
.HasColumnType("text");
b.Property<string>("LoaderImageUrl")
.HasColumnType("text");
b.Property<int?>("Order")
.HasColumnType("integer");
b.Property<string>("PrimaryColor")
.HasColumnType("text");
b.Property<int?>("RoundedValue")
.HasColumnType("integer");
b.Property<int?>("ScreenPercentageSectionsMainPage")
.HasColumnType("integer");
b.Property<string>("SecondaryColor")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApplicationInstanceId");
b.HasIndex("ConfigurationId");
b.HasIndex("DeviceId");
b.ToTable("AppConfigurationLinks");
});
modelBuilder.Entity("ManagerService.Data.ApplicationInstance", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("AppName")
.HasColumnType("jsonb");
b.Property<string>("AppStoreUrl")
.HasColumnType("text");
b.Property<int>("AppType")
.HasColumnType("integer");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsAssistant")
.HasColumnType("boolean");
b.Property<bool>("IsQRCodeEnabled")
.HasColumnType("boolean");
b.PrimitiveCollection<List<string>>("Languages")
.HasColumnType("text[]");
b.Property<string>("LoaderImageId")
.HasColumnType("text");
b.Property<string>("LoaderImageUrl")
.HasColumnType("text");
b.Property<string>("MainImageId")
.HasColumnType("text");
b.Property<string>("MainImageUrl")
.HasColumnType("text");
b.Property<string>("PlayStoreUrl")
.HasColumnType("text");
b.Property<string>("PrimaryColor")
.HasColumnType("text");
b.Property<string>("SecondaryColor")
.HasColumnType("text");
b.Property<string>("SectionEventId")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("SectionEventId");
b.HasIndex("InstanceId", "AppType")
.IsUnique();
b.ToTable("ApplicationInstances");
});
modelBuilder.Entity("ManagerService.Data.AuditLog", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("Action")
.HasColumnType("text");
b.Property<string>("EntityId")
.HasColumnType("text");
b.Property<string>("EntityType")
.HasColumnType("text");
b.Property<string>("InstanceId")
.HasColumnType("text");
b.Property<string>("NewValues")
.HasColumnType("text");
b.Property<string>("OldValues")
.HasColumnType("text");
b.Property<DateTime>("Timestamp")
.HasColumnType("timestamp with time zone");
b.Property<string>("UserId")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.ToTable("AuditLogs");
});
modelBuilder.Entity("ManagerService.Data.Configuration", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("ImageId")
.HasColumnType("text");
b.Property<string>("ImageSource")
.HasColumnType("text");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsOffline")
.HasColumnType("boolean");
b.Property<bool>("IsQRCode")
.HasColumnType("boolean");
b.Property<bool>("IsSearchNumber")
.HasColumnType("boolean");
b.Property<bool>("IsSearchText")
.HasColumnType("boolean");
b.Property<string>("Label")
.IsRequired()
.HasColumnType("text");
b.PrimitiveCollection<List<string>>("Languages")
.HasColumnType("text[]");
b.Property<string>("LoaderImageId")
.HasColumnType("text");
b.Property<string>("LoaderImageUrl")
.HasColumnType("text");
b.Property<string>("PrimaryColor")
.HasColumnType("text");
b.Property<string>("SecondaryColor")
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.ToTable("Configurations");
});
modelBuilder.Entity("ManagerService.Data.ContentEmbedding", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<int>("ChunkIndex")
.HasColumnType("integer");
b.Property<string>("ConfigurationId")
.HasColumnType("text");
b.Property<string>("ContentId")
.IsRequired()
.HasColumnType("text");
b.Property<int>("ContentType")
.HasColumnType("integer");
b.Property<Vector>("Embedding")
.IsRequired()
.HasColumnType("vector(768)");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Language")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<int?>("PageNumber")
.HasColumnType("integer");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("Embedding");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("Embedding"), "hnsw");
NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex("Embedding"), new[] { "vector_cosine_ops" });
b.HasIndex("InstanceId", "ContentType");
b.HasIndex("ContentType", "ContentId", "ChunkIndex")
.IsUnique();
b.ToTable("ContentEmbeddings");
});
modelBuilder.Entity("ManagerService.Data.Device", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<int>("AppType")
.HasColumnType("integer");
b.Property<string>("AppVersion")
.HasColumnType("text");
b.Property<string>("BatteryLevel")
.HasColumnType("text");
b.Property<string>("ConfigurationId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("Connected")
.HasColumnType("boolean");
b.Property<string>("ConnectionLevel")
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Identifier")
.HasColumnType("text");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("IpAddressETH")
.HasColumnType("text");
b.Property<string>("IpAddressWLAN")
.HasColumnType("text");
b.Property<DateTime>("LastBatteryLevel")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("LastConnectionLevel")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("LastSeen")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ConfigurationId");
b.HasIndex("InstanceId");
b.ToTable("Devices");
});
modelBuilder.Entity("ManagerService.Data.Instance", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<long>("AiTokensPerMonth")
.HasColumnType("bigint");
b.Property<long>("AiTokensThisMonth")
.HasColumnType("bigint");
b.Property<string>("AiUsageMonthKey")
.HasColumnType("text");
b.Property<string>("BillingAddress")
.HasColumnType("text");
b.Property<string>("BillingCountry")
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("GuideFallbackMessages")
.HasColumnType("jsonb");
b.Property<string>("GuideName")
.HasColumnType("text");
b.Property<string>("GuidePersonaPrompt")
.HasColumnType("text");
b.Property<string>("GuideVoiceId")
.HasColumnType("text");
b.Property<bool>("HasAdvancedStats")
.HasColumnType("boolean");
b.Property<bool>("HasImmersiveContent")
.HasColumnType("boolean");
b.Property<bool>("HasStats")
.HasColumnType("boolean");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsAssistant")
.HasColumnType("boolean");
b.Property<bool>("IsImageWatermark")
.HasColumnType("boolean");
b.Property<bool>("IsMobile")
.HasColumnType("boolean");
b.Property<bool>("IsPushNotification")
.HasColumnType("boolean");
b.Property<bool>("IsTablet")
.HasColumnType("boolean");
b.Property<bool>("IsTrialActive")
.HasColumnType("boolean");
b.Property<bool>("IsVR")
.HasColumnType("boolean");
b.Property<bool>("IsVisitorQuestionCollectionEnabled")
.HasColumnType("boolean");
b.Property<bool>("IsWeb")
.HasColumnType("boolean");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PinCode")
.HasColumnType("text");
b.Property<string>("PublicApiKey")
.HasColumnType("text");
b.Property<int>("StatsHistoryDays")
.HasColumnType("integer");
b.Property<long>("StorageQuotaBytes")
.HasColumnType("bigint");
b.Property<string>("StripeCustomerId")
.HasColumnType("text");
b.Property<string>("StripeSubscriptionId")
.HasColumnType("text");
b.Property<string>("SubscriptionPlanId")
.HasColumnType("text");
b.Property<long>("TrialAiTokensUsed")
.HasColumnType("bigint");
b.Property<bool>("TrialCheckInEmailSent")
.HasColumnType("boolean");
b.Property<DateTime?>("TrialEndsAt")
.HasColumnType("timestamp with time zone");
b.Property<bool>("TrialLastDayEmailSent")
.HasColumnType("boolean");
b.Property<bool>("TrialReminderEmailSent")
.HasColumnType("boolean");
b.Property<string>("VatNumber")
.HasColumnType("text");
b.Property<decimal?>("VatRate")
.HasColumnType("numeric");
b.Property<string>("WebSlug")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("SubscriptionPlanId");
b.ToTable("Instances");
});
modelBuilder.Entity("ManagerService.Data.PushNotification", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("Body")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<string>("HangfireJobId")
.HasColumnType("text");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime?>("ScheduledAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("SentAt")
.HasColumnType("timestamp with time zone");
b.Property<int>("Status")
.HasColumnType("integer");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Topic")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.ToTable("PushNotifications");
});
modelBuilder.Entity("ManagerService.Data.QuestionThemeMonthly", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<string>("InstanceId")
.HasColumnType("text");
b.Property<DateTime>("Month")
.HasColumnType("timestamp with time zone");
b.Property<string>("Theme")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InstanceId", "Month");
b.ToTable("QuestionThemeMonthlies");
});
modelBuilder.Entity("ManagerService.Data.Resource", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<int>("AiChunkCount")
.HasColumnType("integer");
b.Property<string>("AiIndexMessage")
.HasColumnType("text");
b.Property<int>("AiIndexStatus")
.HasColumnType("integer");
b.Property<DateTime?>("AiIndexedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("FileName")
.HasColumnType("text");
b.Property<int?>("Height")
.HasColumnType("integer");
b.Property<bool>("IncludeInAiKnowledge")
.HasColumnType("boolean");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Label")
.IsRequired()
.HasColumnType("text");
b.Property<long>("SizeBytes")
.HasColumnType("bigint");
b.Property<string>("StoragePath")
.HasColumnType("text");
b.Property<int>("Type")
.HasColumnType("integer");
b.Property<string>("Url")
.HasColumnType("text");
b.Property<int?>("Width")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.ToTable("Resources");
});
modelBuilder.Entity("ManagerService.Data.Section", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<int?>("BeaconId")
.HasColumnType("integer");
b.Property<string>("ConfigurationId")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("jsonb");
b.Property<string>("Discriminator")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("ImageId")
.HasColumnType("text");
b.Property<string>("ImageSource")
.HasColumnType("text");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsBeacon")
.HasColumnType("boolean");
b.Property<bool>("IsSubSection")
.HasColumnType("boolean");
b.Property<string>("Label")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Latitude")
.HasColumnType("text");
b.Property<string>("Longitude")
.HasColumnType("text");
b.Property<int?>("MeterZoneGPS")
.HasColumnType("integer");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<string>("ParentId")
.HasColumnType("text");
b.Property<string>("SectionMenuId")
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("Type")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("SectionMenuId");
b.ToTable("Sections");
b.HasDiscriminator().HasValue("Base");
b.UseTphMappingStrategy();
});
modelBuilder.Entity("ManagerService.Data.SubSection.EventAgenda", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Address")
.HasColumnType("jsonb");
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateFrom")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateTo")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("Email")
.HasColumnType("text");
b.Property<string>("IdVideoYoutube")
.HasColumnType("text");
b.Property<bool>("IsSynced")
.HasColumnType("boolean");
b.Property<string>("Label")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("Phone")
.HasColumnType("text");
b.Property<string>("ResourceId")
.HasColumnType("text");
b.Property<string>("SectionAgendaId")
.HasColumnType("text");
b.Property<string>("SectionEventId")
.HasColumnType("text");
b.Property<string>("SyncedImageUrl")
.HasColumnType("text");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("VideoLink")
.HasColumnType("text");
b.Property<string>("VideoResourceId")
.HasColumnType("text");
b.Property<string>("Website")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ResourceId");
b.HasIndex("SectionAgendaId");
b.HasIndex("SectionEventId");
b.HasIndex("VideoResourceId");
b.ToTable("EventAgendas");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GeoPoint", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int?>("CategorieId")
.HasColumnType("integer");
b.Property<string>("Contents")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("jsonb");
b.Property<Geometry>("Geometry")
.HasColumnType("geometry");
b.Property<string>("ImageResourceId")
.HasColumnType("text");
b.Property<string>("ImageUrl")
.HasColumnType("text");
b.Property<string>("LocalTransform")
.HasColumnType("jsonb");
b.Property<string>("Phone")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("PolyColor")
.HasColumnType("text");
b.Property<string>("Prices")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("Schedules")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("SectionEventId")
.HasColumnType("text");
b.Property<string>("SectionMapId")
.HasColumnType("text");
b.Property<string>("SectionScene3DId")
.HasColumnType("text");
b.Property<string>("Site")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("Id");
b.HasIndex("SectionEventId");
b.HasIndex("SectionMapId");
b.HasIndex("SectionScene3DId");
b.ToTable("GeoPoints");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GuidedPath", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("jsonb");
b.Property<int?>("EstimatedDurationMinutes")
.HasColumnType("integer");
b.Property<string>("GameMessageDebut")
.HasColumnType("jsonb");
b.Property<string>("GameMessageFin")
.HasColumnType("jsonb");
b.Property<bool>("HideNextStepsUntilComplete")
.HasColumnType("boolean");
b.Property<string>("ImageResourceId")
.HasColumnType("text");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsGameMode")
.HasColumnType("boolean");
b.Property<bool>("IsLinear")
.HasColumnType("boolean");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<bool>("RequireSuccessToAdvance")
.HasColumnType("boolean");
b.Property<string>("SectionEventId")
.HasColumnType("text");
b.Property<string>("SectionParcoursId")
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("Id");
b.HasIndex("ImageResourceId");
b.HasIndex("InstanceId");
b.HasIndex("SectionEventId");
b.HasIndex("SectionParcoursId");
b.ToTable("GuidedPaths");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GuidedStep", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("AudioIds")
.HasColumnType("jsonb");
b.Property<string>("Contents")
.HasColumnType("jsonb");
b.Property<string>("Description")
.HasColumnType("jsonb");
b.Property<Geometry>("Geometry")
.HasColumnType("geometry");
b.Property<string>("GuidedPathId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ImageUrl")
.HasColumnType("text");
b.Property<bool>("IsGeoTriggered")
.HasColumnType("boolean");
b.Property<bool>("IsStepTimer")
.HasColumnType("boolean");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<string>("TimerExpiredMessage")
.HasColumnType("jsonb");
b.Property<int?>("TimerSeconds")
.HasColumnType("integer");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("jsonb");
b.Property<double?>("ZoneRadiusMeters")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("GuidedPathId");
b.ToTable("GuidedSteps");
});
modelBuilder.Entity("ManagerService.Data.SubSection.QuizQuestion", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("GuidedStepId")
.HasColumnType("text");
b.Property<bool?>("IsSlidingPuzzle")
.HasColumnType("boolean");
b.Property<List<TranslationAndResourceDTO>>("Label")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<int?>("PuzzleCols")
.HasColumnType("integer");
b.Property<string>("PuzzleImageId")
.HasColumnType("text");
b.Property<int?>("PuzzleRows")
.HasColumnType("integer");
b.Property<string>("ResourceId")
.HasColumnType("text");
b.Property<List<ResponseDTO>>("Responses")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("SectionQuizId")
.HasColumnType("text");
b.Property<int>("ValidationQuestionType")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("GuidedStepId");
b.HasIndex("PuzzleImageId");
b.HasIndex("ResourceId");
b.HasIndex("SectionQuizId");
b.ToTable("QuizQuestions");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent+MapAnnotation", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<Geometry>("Geometry")
.HasColumnType("geometry");
b.Property<int>("GeometryType")
.HasColumnType("integer");
b.Property<string>("Icon")
.HasColumnType("text");
b.Property<string>("IconResourceId")
.HasColumnType("text");
b.Property<List<TranslationDTO>>("Label")
.HasColumnType("jsonb");
b.Property<string>("PolyColor")
.HasColumnType("text");
b.Property<string>("ProgrammeBlockId")
.HasColumnType("text");
b.Property<string>("SectionEventId")
.HasColumnType("text");
b.Property<List<TranslationDTO>>("Type")
.HasColumnType("jsonb");
b.HasKey("Id");
b.HasIndex("IconResourceId");
b.HasIndex("ProgrammeBlockId");
b.HasIndex("SectionEventId");
b.ToTable("MapAnnotations");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent+ProgrammeBlock", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<List<TranslationDTO>>("Description")
.HasColumnType("jsonb");
b.Property<DateTime>("EndTime")
.HasColumnType("timestamp with time zone");
b.Property<string>("SectionEventId")
.HasColumnType("text");
b.Property<DateTime>("StartTime")
.HasColumnType("timestamp with time zone");
b.Property<List<TranslationDTO>>("Title")
.HasColumnType("jsonb");
b.HasKey("Id");
b.HasIndex("SectionEventId");
b.ToTable("ProgrammeBlocks");
});
modelBuilder.Entity("ManagerService.Data.SubscriptionPlan", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<long>("AiTokensPerMonth")
.HasColumnType("bigint");
b.Property<bool>("HasAdvancedStats")
.HasColumnType("boolean");
b.Property<bool>("HasStats")
.HasColumnType("boolean");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<int>("StatsHistoryDays")
.HasColumnType("integer");
b.Property<long>("StorageQuotaBytes")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("SubscriptionPlans");
b.HasData(
new
{
Id = "plan-essentiel",
AiTokensPerMonth = 0L,
HasAdvancedStats = false,
HasStats = true,
Name = "Essentiel",
StatsHistoryDays = 30,
StorageQuotaBytes = 1073741824L
},
new
{
Id = "plan-pro",
AiTokensPerMonth = 0L,
HasAdvancedStats = false,
HasStats = true,
Name = "Pro",
StatsHistoryDays = 30,
StorageQuotaBytes = 16106127360L
},
new
{
Id = "plan-premium",
AiTokensPerMonth = 20000000L,
HasAdvancedStats = true,
HasStats = true,
Name = "Premium",
StatsHistoryDays = 395,
StorageQuotaBytes = 53687091200L
},
new
{
Id = "plan-enterprise",
AiTokensPerMonth = 9223372036854775807L,
HasAdvancedStats = true,
HasStats = true,
Name = "Enterprise",
StatsHistoryDays = 395,
StorageQuotaBytes = 0L
});
});
modelBuilder.Entity("ManagerService.Data.User", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<DateTime>("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DateUpdate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("text");
b.Property<string>("FirstName")
.HasColumnType("text");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime?>("PasswordTokenExpiresAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("PasswordTokenHash")
.HasColumnType("text");
b.Property<int>("Role")
.HasColumnType("integer");
b.Property<string>("Token")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.ToTable("Users");
});
modelBuilder.Entity("ManagerService.Data.VisitEvent", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<int>("AppType")
.HasColumnType("integer");
b.Property<string>("ConfigurationId")
.HasColumnType("text");
b.Property<int?>("DurationSeconds")
.HasColumnType("integer");
b.Property<int>("EventType")
.HasColumnType("integer");
b.Property<string>("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Language")
.HasColumnType("text");
b.Property<string>("Metadata")
.HasColumnType("text");
b.Property<string>("SectionId")
.HasColumnType("text");
b.Property<string>("SessionId")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("Timestamp")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("Timestamp");
b.ToTable("VisitEvents");
});
modelBuilder.Entity("ManagerService.Data.VisitorQuestion", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<int>("AppType")
.HasColumnType("integer");
b.Property<string>("CitedContentIds")
.HasColumnType("jsonb");
b.Property<string>("ConfigurationId")
.HasColumnType("text");
b.Property<string>("ConversationId")
.HasColumnType("text");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<bool>("HasAnswer")
.HasColumnType("boolean");
b.Property<string>("InstanceId")
.HasColumnType("text");
b.Property<bool>("IsVoice")
.HasColumnType("boolean");
b.Property<string>("Language")
.HasMaxLength(5)
.HasColumnType("character varying(5)");
b.Property<string>("Question")
.HasColumnType("text");
b.Property<string>("Reply")
.HasColumnType("text");
b.Property<string>("ThemeId")
.HasColumnType("text");
b.Property<long>("TokensUsed")
.HasColumnType("bigint");
b.Property<double>("TopScore")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("ConversationId");
b.HasIndex("InstanceId", "CreatedAt");
b.ToTable("VisitorQuestions");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionAgenda", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<int?>("AgendaMapProvider")
.HasColumnType("integer");
b.Property<List<TranslationDTO>>("AgendaResourceIds")
.IsRequired()
.HasColumnType("jsonb");
b.Property<bool>("IsOnlineAgenda")
.HasColumnType("boolean");
b.HasDiscriminator().HasValue("Agenda");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionArticle", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<List<TranslationDTO>>("ArticleAudioIds")
.IsRequired()
.HasColumnType("jsonb");
b.Property<List<TranslationDTO>>("ArticleContent")
.IsRequired()
.HasColumnType("jsonb");
b.Property<List<ContentDTO>>("ArticleContents")
.IsRequired()
.HasColumnType("jsonb");
b.Property<bool>("ArticleIsContentTop")
.HasColumnType("boolean");
b.Property<bool>("ArticleIsReadAudioAuto")
.HasColumnType("boolean");
b.HasDiscriminator().HasValue("Article");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<string>("BaseSectionMapId")
.HasColumnType("text");
b.Property<DateTime?>("EndDate")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("StartDate")
.HasColumnType("timestamp with time zone");
b.HasIndex("BaseSectionMapId");
b.HasDiscriminator().HasValue("Event");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionGame", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<List<TranslationAndResourceDTO>>("GameMessageDebut")
.IsRequired()
.HasColumnType("jsonb");
b.Property<List<TranslationAndResourceDTO>>("GameMessageFin")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("GamePuzzleCols")
.HasColumnType("integer");
b.Property<string>("GamePuzzleImageId")
.HasColumnType("text");
b.Property<int>("GamePuzzleRows")
.HasColumnType("integer");
b.Property<int>("GameType")
.HasColumnType("integer");
b.HasIndex("GamePuzzleImageId");
b.HasDiscriminator().HasValue("Game");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionMap", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<string>("IconResourceId")
.HasColumnType("text");
b.Property<bool>("IsListViewEnabled")
.HasColumnType("boolean");
b.Property<List<CategorieDTO>>("MapCategories")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("MapCenterLatitude")
.HasColumnType("text");
b.Property<string>("MapCenterLongitude")
.HasColumnType("text");
b.Property<int?>("MapMapProvider")
.HasColumnType("integer");
b.Property<int?>("MapMapType")
.HasColumnType("integer");
b.Property<int?>("MapTypeMapbox")
.HasColumnType("integer");
b.Property<int>("MapZoom")
.HasColumnType("integer");
b.HasIndex("IconResourceId");
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.SectionParcours", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<string>("BaseSectionMapId")
.HasColumnType("text");
b.Property<bool>("ShowMap")
.HasColumnType("boolean");
b.HasIndex("BaseSectionMapId");
b.ToTable("Sections", t =>
{
t.Property("BaseSectionMapId")
.HasColumnName("SectionParcours_BaseSectionMapId");
});
b.HasDiscriminator().HasValue("Parcours");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionPdf", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<List<OrderedTranslationAndResourceDTO>>("PDFOrderedTranslationAndResources")
.IsRequired()
.HasColumnType("jsonb");
b.HasDiscriminator().HasValue("PDF");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionQuiz", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<List<TranslationAndResourceDTO>>("QuizBadLevel")
.IsRequired()
.HasColumnType("jsonb");
b.Property<List<TranslationAndResourceDTO>>("QuizGoodLevel")
.IsRequired()
.HasColumnType("jsonb");
b.Property<List<TranslationAndResourceDTO>>("QuizGreatLevel")
.IsRequired()
.HasColumnType("jsonb");
b.Property<List<TranslationAndResourceDTO>>("QuizMediumLevel")
.IsRequired()
.HasColumnType("jsonb");
b.HasDiscriminator().HasValue("Quiz");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionScene3D", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<int>("Mode")
.HasColumnType("integer");
b.Property<string>("Model3DResourceId")
.HasColumnType("text");
b.Property<string>("Model3DSource")
.HasColumnType("text");
b.HasDiscriminator().HasValue("Model3D");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionSlider", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<List<ContentDTO>>("SliderContents")
.IsRequired()
.HasColumnType("jsonb");
b.HasDiscriminator().HasValue("Slider");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionVideo", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<string>("VideoSource")
.IsRequired()
.HasColumnType("text");
b.HasDiscriminator().HasValue("Video");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionWeather", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<string>("WeatherCity")
.HasColumnType("text");
b.Property<string>("WeatherResult")
.HasColumnType("text");
b.Property<DateTimeOffset?>("WeatherUpdatedDate")
.HasColumnType("timestamp with time zone");
b.HasDiscriminator().HasValue("Weather");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionWeb", b =>
{
b.HasBaseType("ManagerService.Data.Section");
b.Property<string>("WebSource")
.IsRequired()
.HasColumnType("text");
b.HasDiscriminator().HasValue("Web");
});
modelBuilder.Entity("ManagerService.Data.ApiKey", b =>
{
b.HasOne("ManagerService.Data.Instance", "Instance")
.WithMany()
.HasForeignKey("InstanceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Instance");
});
modelBuilder.Entity("ManagerService.Data.AppConfigurationLink", b =>
{
b.HasOne("ManagerService.Data.ApplicationInstance", "ApplicationInstance")
.WithMany("Configurations")
.HasForeignKey("ApplicationInstanceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ManagerService.Data.Configuration", "Configuration")
.WithMany()
.HasForeignKey("ConfigurationId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ManagerService.Data.Device", "Device")
.WithMany()
.HasForeignKey("DeviceId");
b.Navigation("ApplicationInstance");
b.Navigation("Configuration");
b.Navigation("Device");
});
modelBuilder.Entity("ManagerService.Data.ApplicationInstance", b =>
{
b.HasOne("ManagerService.Data.SubSection.SectionEvent", "SectionEvent")
.WithMany()
.HasForeignKey("SectionEventId");
b.OwnsOne("ManagerService.Data.ImmersiveBackground", "ImmersiveBackground", b1 =>
{
b1.Property<string>("ApplicationInstanceId")
.HasColumnType("text");
b1.Property<string>("FallbackResourceId")
.HasColumnType("text");
b1.Property<int>("Kind")
.HasColumnType("integer");
b1.Property<string>("ResourceId")
.HasColumnType("text");
b1.HasKey("ApplicationInstanceId");
b1.ToTable("ApplicationInstances");
b1.WithOwner()
.HasForeignKey("ApplicationInstanceId");
});
b.Navigation("ImmersiveBackground");
b.Navigation("SectionEvent");
});
modelBuilder.Entity("ManagerService.Data.Configuration", b =>
{
b.OwnsOne("ManagerService.Data.ImmersiveBackground", "ImmersiveBackground", b1 =>
{
b1.Property<string>("ConfigurationId")
.HasColumnType("text");
b1.Property<string>("FallbackResourceId")
.HasColumnType("text");
b1.Property<int>("Kind")
.HasColumnType("integer");
b1.Property<string>("ResourceId")
.HasColumnType("text");
b1.HasKey("ConfigurationId");
b1.ToTable("Configurations");
b1.WithOwner()
.HasForeignKey("ConfigurationId");
});
b.Navigation("ImmersiveBackground");
});
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.Instance", b =>
{
b.HasOne("ManagerService.Data.SubscriptionPlan", "SubscriptionPlan")
.WithMany()
.HasForeignKey("SubscriptionPlanId");
b.Navigation("SubscriptionPlan");
});
modelBuilder.Entity("ManagerService.Data.Section", b =>
{
b.HasOne("ManagerService.Data.SubSection.SectionMenu", null)
.WithMany("MenuSections")
.HasForeignKey("SectionMenuId");
});
modelBuilder.Entity("ManagerService.Data.SubSection.EventAgenda", b =>
{
b.HasOne("ManagerService.Data.Resource", "Resource")
.WithMany()
.HasForeignKey("ResourceId");
b.HasOne("ManagerService.Data.SubSection.SectionAgenda", "SectionAgenda")
.WithMany("EventAgendas")
.HasForeignKey("SectionAgendaId");
b.HasOne("ManagerService.Data.SubSection.SectionEvent", "SectionEvent")
.WithMany()
.HasForeignKey("SectionEventId");
b.HasOne("ManagerService.Data.Resource", "VideoResource")
.WithMany()
.HasForeignKey("VideoResourceId");
b.Navigation("Resource");
b.Navigation("SectionAgenda");
b.Navigation("SectionEvent");
b.Navigation("VideoResource");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GeoPoint", b =>
{
b.HasOne("ManagerService.Data.SubSection.SectionEvent", "SectionEvent")
.WithMany()
.HasForeignKey("SectionEventId");
b.HasOne("ManagerService.Data.SubSection.SectionMap", "SectionMap")
.WithMany("MapPoints")
.HasForeignKey("SectionMapId");
b.HasOne("ManagerService.Data.SubSection.SectionScene3D", "SectionScene3D")
.WithMany("Points")
.HasForeignKey("SectionScene3DId")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("SectionEvent");
b.Navigation("SectionMap");
b.Navigation("SectionScene3D");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GuidedPath", b =>
{
b.HasOne("ManagerService.Data.Resource", "ImageResource")
.WithMany()
.HasForeignKey("ImageResourceId");
b.HasOne("ManagerService.Data.SubSection.SectionEvent", "SectionEvent")
.WithMany()
.HasForeignKey("SectionEventId");
b.HasOne("ManagerService.Data.SubSection.SectionParcours", "SectionParcours")
.WithMany("GuidedPaths")
.HasForeignKey("SectionParcoursId")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("ImageResource");
b.Navigation("SectionEvent");
b.Navigation("SectionParcours");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GuidedStep", b =>
{
b.HasOne("ManagerService.Data.SubSection.GuidedPath", "GuidedPath")
.WithMany("Steps")
.HasForeignKey("GuidedPathId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GuidedPath");
});
modelBuilder.Entity("ManagerService.Data.SubSection.QuizQuestion", b =>
{
b.HasOne("ManagerService.Data.SubSection.GuidedStep", "GuidedStep")
.WithMany("QuizQuestions")
.HasForeignKey("GuidedStepId");
b.HasOne("ManagerService.Data.Resource", "PuzzleImage")
.WithMany()
.HasForeignKey("PuzzleImageId");
b.HasOne("ManagerService.Data.Resource", "Resource")
.WithMany()
.HasForeignKey("ResourceId");
b.HasOne("ManagerService.Data.SubSection.SectionQuiz", "SectionQuiz")
.WithMany("QuizQuestions")
.HasForeignKey("SectionQuizId");
b.Navigation("GuidedStep");
b.Navigation("PuzzleImage");
b.Navigation("Resource");
b.Navigation("SectionQuiz");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent+MapAnnotation", b =>
{
b.HasOne("ManagerService.Data.Resource", "IconResource")
.WithMany()
.HasForeignKey("IconResourceId");
b.HasOne("ManagerService.Data.SubSection.SectionEvent+ProgrammeBlock", null)
.WithMany("MapAnnotations")
.HasForeignKey("ProgrammeBlockId");
b.HasOne("ManagerService.Data.SubSection.SectionEvent", null)
.WithMany("GlobalMapAnnotations")
.HasForeignKey("SectionEventId")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("IconResource");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent+ProgrammeBlock", b =>
{
b.HasOne("ManagerService.Data.SubSection.SectionEvent", null)
.WithMany("Programme")
.HasForeignKey("SectionEventId");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent", b =>
{
b.HasOne("ManagerService.Data.SubSection.SectionMap", "BaseMap")
.WithMany()
.HasForeignKey("BaseSectionMapId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("BaseMap");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionGame", b =>
{
b.HasOne("ManagerService.Data.Resource", "GamePuzzleImage")
.WithMany()
.HasForeignKey("GamePuzzleImageId");
b.Navigation("GamePuzzleImage");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionMap", b =>
{
b.HasOne("ManagerService.Data.Resource", "IconResource")
.WithMany()
.HasForeignKey("IconResourceId");
b.Navigation("IconResource");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionParcours", b =>
{
b.HasOne("ManagerService.Data.SubSection.SectionMap", "BaseMap")
.WithMany()
.HasForeignKey("BaseSectionMapId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("BaseMap");
});
modelBuilder.Entity("ManagerService.Data.ApplicationInstance", b =>
{
b.Navigation("Configurations");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GuidedPath", b =>
{
b.Navigation("Steps");
});
modelBuilder.Entity("ManagerService.Data.SubSection.GuidedStep", b =>
{
b.Navigation("QuizQuestions");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent+ProgrammeBlock", b =>
{
b.Navigation("MapAnnotations");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionAgenda", b =>
{
b.Navigation("EventAgendas");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent", b =>
{
b.Navigation("GlobalMapAnnotations");
b.Navigation("Programme");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionMap", b =>
{
b.Navigation("MapPoints");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionMenu", b =>
{
b.Navigation("MenuSections");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionParcours", b =>
{
b.Navigation("GuidedPaths");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionQuiz", b =>
{
b.Navigation("QuizQuestions");
});
modelBuilder.Entity("ManagerService.Data.SubSection.SectionScene3D", b =>
{
b.Navigation("Points");
});
#pragma warning restore 612, 618
}
}
}