2023-10-18 04:55:10 +00:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using System.Net.NetworkInformation;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
|
using PhoneToolMX.Data;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace PhoneToolMX.Models.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(PTMXContext))]
|
|
|
|
|
partial class PTMXContextModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
2023-10-20 19:57:22 +00:00
|
|
|
|
.HasAnnotation("ProductVersion", "6.0.23")
|
2023-10-18 04:55:10 +00:00
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
|
|
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ExtensionPhone", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("ExtensionsId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("PhonesId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.HasKey("ExtensionsId", "PhonesId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("PhonesId");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("ExtensionPhone");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ExtensionUser", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("ExtensionsId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("OwnersId")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("ExtensionsId", "OwnersId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("OwnersId");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("ExtensionUser");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.CustomData", b =>
|
|
|
|
|
{
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.Property<int?>("Id")
|
2023-10-18 04:55:10 +00:00
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int?>("Id"));
|
2023-10-18 04:55:10 +00:00
|
|
|
|
|
|
|
|
|
b.Property<byte[]>("Data")
|
|
|
|
|
.HasColumnType("bytea");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DataType")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("FriendlyName")
|
|
|
|
|
.HasMaxLength(16)
|
|
|
|
|
.HasColumnType("character varying(16)");
|
|
|
|
|
|
|
|
|
|
b.Property<int?>("PhoneId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<long>("Size")
|
|
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("PhoneId");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("CustomData");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.Extension", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int?>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int?>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("DirectoryName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ExtId")
|
|
|
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
|
|
|
.HasColumnType("integer")
|
|
|
|
|
.HasComputedColumnSql("\"Id\" + 1000", true);
|
|
|
|
|
|
|
|
|
|
b.Property<int?>("HoldMusicId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("Listed")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("text")
|
|
|
|
|
.HasDefaultValueSql("encode(gen_random_bytes(18), 'base64')");
|
|
|
|
|
|
2023-10-18 04:55:10 +00:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("HoldMusicId");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("Extensions");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.Phone", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int?>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int?>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int?>("BackgroundId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("FriendlyName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<PhysicalAddress>("MacAddress")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("macaddr");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ModelId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2023-10-20 21:32:56 +00:00
|
|
|
|
b.Property<int?>("PrimaryExtensionId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2023-10-18 04:55:10 +00:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("BackgroundId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ModelId");
|
|
|
|
|
|
2023-10-20 21:32:56 +00:00
|
|
|
|
b.HasIndex("PrimaryExtensionId");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("Phones");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.PhoneModel", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int?>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int?>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<long>("MaxExtensions")
|
|
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ModelName")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("PreVvxPolycom")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("PhoneModels");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
|
|
|
|
|
b.HasData(
|
|
|
|
|
new
|
|
|
|
|
{
|
|
|
|
|
Id = 0,
|
|
|
|
|
MaxExtensions = 6L,
|
|
|
|
|
ModelName = "Polycom VVX300/310",
|
|
|
|
|
PreVvxPolycom = false
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.Role", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<string>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("NormalizedName")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("Role");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.User", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<string>("Id")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
|
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("PasswordHash")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("UserName")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("Users");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneUser", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<string>("OwnersId")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("PhonesId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.HasKey("OwnersId", "PhonesId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("PhonesId");
|
|
|
|
|
|
2023-10-20 19:57:22 +00:00
|
|
|
|
b.ToTable("PhoneUser");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ExtensionPhone", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.Extension", null)
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ExtensionsId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.Phone", null)
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("PhonesId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ExtensionUser", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.Extension", null)
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ExtensionsId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.User", null)
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("OwnersId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.CustomData", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.Phone", null)
|
|
|
|
|
.WithMany("Ringtones")
|
|
|
|
|
.HasForeignKey("PhoneId");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.Extension", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.CustomData", "HoldMusic")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("HoldMusicId");
|
|
|
|
|
|
|
|
|
|
b.Navigation("HoldMusic");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.Phone", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.CustomData", "Background")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("BackgroundId");
|
|
|
|
|
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.PhoneModel", "Model")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ModelId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2023-10-20 21:32:56 +00:00
|
|
|
|
b.HasOne("PhoneToolMX.Models.Extension", "PrimaryExtension")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("PrimaryExtensionId");
|
|
|
|
|
|
2023-10-18 04:55:10 +00:00
|
|
|
|
b.Navigation("Background");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Model");
|
2023-10-20 21:32:56 +00:00
|
|
|
|
|
|
|
|
|
b.Navigation("PrimaryExtension");
|
2023-10-18 04:55:10 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneUser", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.User", null)
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("OwnersId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("PhoneToolMX.Models.Phone", null)
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("PhonesId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("PhoneToolMX.Models.Phone", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Ringtones");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|