//
using System;
using System.Collections.Generic;
using ManagerService.Data;
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("20250305163047_InitialCreate")]
partial class InitialCreate
{
///
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.Property("WeatherCity")
.HasColumnType("text");
b.Property("WeatherResult")
.HasColumnType("text");
b.Property("WeatherUpdatedDate")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("Configurations");
});
modelBuilder.Entity("ManagerService.Data.Device", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("BatteryLevel")
.HasColumnType("text");
b.Property("Configuration")
.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.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("integer");
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("InstanceId")
.IsRequired()
.HasColumnType("text");
b.Property("Label")
.IsRequired()
.HasColumnType("text");
b.Property("Type")
.HasColumnType("integer");
b.Property("Url")
.HasColumnType("text");
b.HasKey("Id");
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("Data")
.IsRequired()
.HasColumnType("text");
b.Property("DateCreation")
.HasColumnType("timestamp with time zone");
b.Property>("Description")
.HasColumnType("jsonb");
b.Property("ImageId")
.IsRequired()
.HasColumnType("text");
b.Property("ImageSource")
.IsRequired()
.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>("Title")
.IsRequired()
.HasColumnType("jsonb");
b.Property("Type")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Sections");
});
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");
});
#pragma warning restore 612, 618
}
}
}