// using System; using Blahblah.FlowerStory.Server.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Blahblah.FlowerStory.Server.Migrations { [DbContext(typeof(FlowerDatabase))] [Migration("20230724084100_Add-Photo-Size")] partial class AddPhotoSize { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.9"); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.FlowerItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasColumnName("fid"); b.Property("CategoryId") .HasColumnType("INTEGER") .HasColumnName("categoryid"); b.Property("Cost") .HasColumnType("real") .HasColumnName("cost"); b.Property("DateBuyUnixTime") .HasColumnType("INTEGER") .HasColumnName("datebuy") .HasAnnotation("Relational:JsonPropertyName", "dateBuy"); b.Property("Latitude") .HasColumnType("REAL") .HasColumnName("latitude"); b.Property("Longitude") .HasColumnType("REAL") .HasColumnName("longitude"); b.Property("Memo") .HasColumnType("TEXT") .HasColumnName("memo"); b.Property("Name") .IsRequired() .HasColumnType("TEXT") .HasColumnName("name"); b.Property("OwnerId") .HasColumnType("INTEGER") .HasColumnName("uid"); b.Property("Purchase") .HasColumnType("TEXT") .HasColumnName("purchase"); b.HasKey("Id"); b.HasIndex("OwnerId"); b.ToTable("flowers"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.PhotoItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasColumnName("pid"); b.Property("DateUploadUnixTime") .HasColumnType("INTEGER") .HasColumnName("dateupload") .HasAnnotation("Relational:JsonPropertyName", "dateUpload"); b.Property("FileName") .IsRequired() .HasColumnType("TEXT") .HasColumnName("filename"); b.Property("FileType") .IsRequired() .HasColumnType("TEXT") .HasColumnName("filetype"); b.Property("FlowerId") .HasColumnType("INTEGER") .HasColumnName("fid"); b.Property("Height") .HasColumnType("INTEGER") .HasColumnName("height"); b.Property("OwnerId") .HasColumnType("INTEGER") .HasColumnName("uid"); b.Property("Path") .IsRequired() .HasColumnType("TEXT") .HasColumnName("path"); b.Property("RecordId") .HasColumnType("INTEGER") .HasColumnName("rid"); b.Property("Width") .HasColumnType("INTEGER") .HasColumnName("width"); b.HasKey("Id"); b.HasIndex("FlowerId"); b.HasIndex("OwnerId"); b.HasIndex("RecordId"); b.ToTable("photos"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.RecordItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasColumnName("rid"); b.Property("ByUserId") .HasColumnType("INTEGER") .HasColumnName("byuid"); b.Property("ByUserName") .HasColumnType("TEXT") .HasColumnName("byname"); b.Property("DateUnixTime") .HasColumnType("INTEGER") .HasColumnName("date") .HasAnnotation("Relational:JsonPropertyName", "date"); b.Property("EventId") .HasColumnType("INTEGER") .HasColumnName("eid"); b.Property("FlowerId") .HasColumnType("INTEGER") .HasColumnName("fid"); b.Property("Latitude") .HasColumnType("REAL") .HasColumnName("latitude"); b.Property("Longitude") .HasColumnType("REAL") .HasColumnName("longitude"); b.Property("Memo") .HasColumnType("TEXT") .HasColumnName("memo"); b.Property("OwnerId") .HasColumnType("INTEGER") .HasColumnName("uid"); b.HasKey("Id"); b.HasIndex("FlowerId"); b.HasIndex("OwnerId"); b.ToTable("records"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.TokenItem", b => { b.Property("Id") .HasColumnType("TEXT") .HasColumnName("tid"); b.Property("ActiveDateUnixTime") .HasColumnType("INTEGER") .HasColumnName("activedate") .HasAnnotation("Relational:JsonPropertyName", "activeDate"); b.Property("ClientAgent") .HasColumnType("TEXT") .HasColumnName("clientagent"); b.Property("ClientApp") .HasColumnType("TEXT") .HasColumnName("clientapp"); b.Property("DeviceId") .HasColumnType("TEXT") .HasColumnName("deviceid"); b.Property("ExpireDateUnixTime") .HasColumnType("INTEGER") .HasColumnName("expiredate") .HasAnnotation("Relational:JsonPropertyName", "expireDate"); b.Property("ExpireSeconds") .HasColumnType("INTEGER") .HasColumnName("expiresecs"); b.Property("LogonDateUnixTime") .HasColumnType("INTEGER") .HasColumnName("logondate") .HasAnnotation("Relational:JsonPropertyName", "logonDate"); b.Property("UserId") .HasColumnType("INTEGER") .HasColumnName("uid"); b.Property("VerifyCode") .HasColumnType("TEXT") .HasColumnName("verifycode"); b.HasKey("Id"); b.ToTable("tokens"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.UserItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasColumnName("uid"); b.Property("ActiveDateUnixTime") .HasColumnType("INTEGER") .HasColumnName("activedate"); b.Property("Avatar") .HasColumnType("BLOB") .HasColumnName("avatar"); b.Property("Email") .HasColumnType("TEXT") .HasColumnName("email"); b.Property("Level") .HasColumnType("INTEGER") .HasColumnName("level"); b.Property("Mobile") .HasColumnType("TEXT") .HasColumnName("mobile"); b.Property("Name") .IsRequired() .HasColumnType("TEXT") .HasColumnName("name"); b.Property("Password") .IsRequired() .HasColumnType("TEXT") .HasColumnName("password"); b.Property("RegisterDateUnixTime") .HasColumnType("INTEGER") .HasColumnName("regdate") .HasAnnotation("Relational:JsonPropertyName", "registerDate"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT") .HasColumnName("id"); b.HasKey("Id"); b.ToTable("users"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.FlowerItem", b => { b.HasOne("Blahblah.FlowerStory.Server.Data.Model.UserItem", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Owner"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.PhotoItem", b => { b.HasOne("Blahblah.FlowerStory.Server.Data.Model.FlowerItem", "Flower") .WithMany("Photos") .HasForeignKey("FlowerId"); b.HasOne("Blahblah.FlowerStory.Server.Data.Model.UserItem", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Blahblah.FlowerStory.Server.Data.Model.RecordItem", "Record") .WithMany("Photos") .HasForeignKey("RecordId"); b.Navigation("Flower"); b.Navigation("Owner"); b.Navigation("Record"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.RecordItem", b => { b.HasOne("Blahblah.FlowerStory.Server.Data.Model.FlowerItem", "Flower") .WithMany() .HasForeignKey("FlowerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Blahblah.FlowerStory.Server.Data.Model.UserItem", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Flower"); b.Navigation("Owner"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.FlowerItem", b => { b.Navigation("Photos"); }); modelBuilder.Entity("Blahblah.FlowerStory.Server.Data.Model.RecordItem", b => { b.Navigation("Photos"); }); #pragma warning restore 612, 618 } } }