//
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PagerParser;
#nullable disable
namespace PagerParser.Migrations
{
[DbContext(typeof(PagerContext))]
partial class PagerContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PagerParser.Bart.BartAvailabilityRecord", b =>
{
b.Property("BartAvailabilityRecordId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("BartAvailabilityRecordId"));
b.Property("CreatedByBartMemberId")
.HasColumnType("integer");
b.Property("CreatedOn")
.HasColumnType("timestamp with time zone");
b.Property("IsDefault")
.HasColumnType("boolean");
b.Property("MemberBartMemberId")
.HasColumnType("integer");
b.Property("ModifiedByBartMemberId")
.HasColumnType("integer");
b.Property("ModifiedOn")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.HasColumnType("integer");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone");
b.HasKey("BartAvailabilityRecordId");
b.HasIndex("CreatedByBartMemberId");
b.HasIndex("MemberBartMemberId");
b.HasIndex("ModifiedByBartMemberId");
b.ToTable("BartAvailabilityRecords");
});
modelBuilder.Entity("PagerParser.Bart.BartMember", b =>
{
b.Property("BartMemberId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("BartMemberId"));
b.Property("MemberName")
.IsRequired()
.HasColumnType("text");
b.HasKey("BartMemberId");
b.HasIndex("MemberName");
b.ToTable("BartMembers");
});
modelBuilder.Entity("PagerParser.GpsPosition", b =>
{
b.Property("GpsPositionId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("GpsPositionId"));
b.Property("Latitude")
.HasColumnType("double precision");
b.Property("Longitude")
.HasColumnType("double precision");
b.HasKey("GpsPositionId");
b.ToTable("GpsPositions");
});
modelBuilder.Entity("PagerParser.Handlers.DiscordAlertChannel", b =>
{
b.Property("DiscordAlertChannelId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("DiscordAlertChannelId"));
b.Property("ChannelId")
.HasColumnType("numeric(20,0)");
b.Property("GuildId")
.HasColumnType("numeric(20,0)");
b.Property("RequireMention")
.HasColumnType("boolean");
b.HasKey("DiscordAlertChannelId");
b.HasIndex("GuildId")
.IsUnique();
b.ToTable("DiscordAlertChannels");
});
modelBuilder.Entity("PagerParser.Handlers.DiscordAlertSubscription", b =>
{
b.Property("DiscordAlertSubscriptionId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("DiscordAlertSubscriptionId"));
b.Property("GuildId")
.HasColumnType("numeric(20,0)");
b.Property("PageDestination")
.IsRequired()
.HasColumnType("text");
b.Property("PrincipalId")
.HasColumnType("numeric(20,0)");
b.Property("PrincipalType")
.HasColumnType("integer");
b.HasKey("DiscordAlertSubscriptionId");
b.HasIndex("GuildId");
b.ToTable("DiscordAlertSubscriptions");
});
modelBuilder.Entity("PagerParser.PagerMessage", b =>
{
b.Property("PagerMessageId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("PagerMessageId"));
b.Property("Message")
.IsRequired()
.HasColumnType("text");
b.Property("Timestamp")
.HasColumnType("timestamp with time zone");
b.HasKey("PagerMessageId");
b.HasIndex("Message");
b.ToTable("PagerMessages");
});
modelBuilder.Entity("PagerParser.ParsedPagerMessage", b =>
{
b.Property("ParsedPagerMessageId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ParsedPagerMessageId"));
b.Property("AlertLevel")
.HasColumnType("integer");
b.Property("AssignmentArea")
.IsRequired()
.HasColumnType("text");
b.Property("AttendingServices")
.HasColumnType("integer");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("FireGroundChannel")
.HasColumnType("integer");
b.Property("FirecomJobNo")
.HasColumnType("integer");
b.Property("GpsPositionId")
.HasColumnType("integer");
b.Property("GridReference")
.HasColumnType("integer");
b.Property("JobType")
.IsRequired()
.HasColumnType("text");
b.Property("MapGrid")
.HasColumnType("text");
b.Property("MapNo")
.HasColumnType("integer");
b.Property("MapType")
.HasColumnType("integer");
b.Property("Note")
.HasColumnType("text");
b.Property("PageDestination")
.IsRequired()
.HasColumnType("text");
b.Property>("PagedServices")
.IsRequired()
.HasColumnType("text[]");
b.Property("PagerMessage")
.HasColumnType("integer");
b.HasKey("ParsedPagerMessageId");
b.HasIndex("FirecomJobNo");
b.HasIndex("GpsPositionId");
b.HasIndex("PageDestination");
b.HasIndex("PagerMessage")
.IsUnique();
b.ToTable("ParsedPagerMessages");
});
modelBuilder.Entity("PagerParser.Bart.BartAvailabilityRecord", b =>
{
b.HasOne("PagerParser.Bart.BartMember", "CreatedBy")
.WithMany()
.HasForeignKey("CreatedByBartMemberId");
b.HasOne("PagerParser.Bart.BartMember", "Member")
.WithMany()
.HasForeignKey("MemberBartMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PagerParser.Bart.BartMember", "ModifiedBy")
.WithMany()
.HasForeignKey("ModifiedByBartMemberId");
b.Navigation("CreatedBy");
b.Navigation("Member");
b.Navigation("ModifiedBy");
});
modelBuilder.Entity("PagerParser.ParsedPagerMessage", b =>
{
b.HasOne("PagerParser.GpsPosition", "GpsPosition")
.WithMany()
.HasForeignKey("GpsPositionId");
b.HasOne("PagerParser.PagerMessage", "OriginalMessage")
.WithOne("ParsedMessage")
.HasForeignKey("PagerParser.ParsedPagerMessage", "PagerMessage")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GpsPosition");
b.Navigation("OriginalMessage");
});
modelBuilder.Entity("PagerParser.PagerMessage", b =>
{
b.Navigation("ParsedMessage");
});
#pragma warning restore 612, 618
}
}
}