|
@@ -0,0 +1,309 @@
|
|
|
+// <auto-generated />
|
|
|
+using System;
|
|
|
+using DutyApp.Data;
|
|
|
+using Microsoft.EntityFrameworkCore;
|
|
|
+using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
+using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
+
|
|
|
+#nullable disable
|
|
|
+
|
|
|
+namespace DutyApp.Migrations
|
|
|
+{
|
|
|
+ [DbContext(typeof(DutyContext))]
|
|
|
+ [Migration("20240817023349_202408171033")]
|
|
|
+ partial class _202408171033
|
|
|
+ {
|
|
|
+ /// <inheritdoc />
|
|
|
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
|
+ {
|
|
|
+#pragma warning disable 612, 618
|
|
|
+ modelBuilder.HasAnnotation("ProductVersion", "7.0.20");
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.ByteImage", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<Guid?>("DutyOfficerId")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<byte[]>("ImageBytes")
|
|
|
+ .HasColumnType("BLOB");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.HasIndex("DutyOfficerId")
|
|
|
+ .IsUnique();
|
|
|
+
|
|
|
+ b.ToTable("ByteImages");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DailyDutyRecord", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("RecordId")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<DateOnly>("DutyDate")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("DutyOfficer")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<Guid>("DutyOfficerId")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("Index")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<Guid?>("PictureId")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Status")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Title")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.HasKey("RecordId");
|
|
|
+
|
|
|
+ b.HasIndex("PictureId");
|
|
|
+
|
|
|
+ b.ToTable("DailyDutyRecords");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DailyNews", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("DesFontFamily")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("DesFontSize")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<string>("Description")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(500)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("Index")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<Guid?>("InformationId")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Title")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(10)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("TitleFontFamily")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("TitleFontSize")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.HasIndex("InformationId");
|
|
|
+
|
|
|
+ b.ToTable("DailyNews");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DutyImage", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<byte[]>("ImageBytes")
|
|
|
+ .HasColumnType("BLOB");
|
|
|
+
|
|
|
+ b.Property<string>("ImageName")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("Index")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<string>("Md5")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("DutyImages");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DutyOfficer", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("DutyOfficerId")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("Index")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<bool>("IsActive")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<string>("Name")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Title")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.HasKey("DutyOfficerId");
|
|
|
+
|
|
|
+ b.ToTable("DutyOfficer");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DutyStatus", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Color")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("Index")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<string>("Name")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(10)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("DutyStatus");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.Information", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<DateOnly>("Date")
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("DayOfWeek")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(10)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Holiday")
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Temperature")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(5)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("UvIndex")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(10)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Weather")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(10)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<string>("Wind")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(10)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("Information");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.JobTitle", b =>
|
|
|
+ {
|
|
|
+ b.Property<Guid>("TitleId")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.Property<int>("Index")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<bool>("IsActive")
|
|
|
+ .HasColumnType("INTEGER");
|
|
|
+
|
|
|
+ b.Property<string>("Title")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(20)
|
|
|
+ .HasColumnType("TEXT");
|
|
|
+
|
|
|
+ b.HasKey("TitleId");
|
|
|
+
|
|
|
+ b.ToTable("JobTitles");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.ByteImage", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("DutyApp.Models.DutyOfficer", "DutyOfficer")
|
|
|
+ .WithOne("Picture")
|
|
|
+ .HasForeignKey("DutyApp.Models.ByteImage", "DutyOfficerId");
|
|
|
+
|
|
|
+ b.Navigation("DutyOfficer");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DailyDutyRecord", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("DutyApp.Models.ByteImage", "Picture")
|
|
|
+ .WithMany("DailyDutyRecords")
|
|
|
+ .HasForeignKey("PictureId");
|
|
|
+
|
|
|
+ b.Navigation("Picture");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DailyNews", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("DutyApp.Models.Information", null)
|
|
|
+ .WithMany("DailyNews")
|
|
|
+ .HasForeignKey("InformationId");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.ByteImage", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("DailyDutyRecords");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.DutyOfficer", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("Picture");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("DutyApp.Models.Information", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("DailyNews");
|
|
|
+ });
|
|
|
+#pragma warning restore 612, 618
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|