InkForge/shared/migrations/InkForge.Sqlite/Migrations/NoteDbContextModelSnapshot.cs

118 lines
3.8 KiB
C#
Raw Normal View History

2024-02-07 22:44:37 +01:00
// <auto-generated />
using System;
using InkForge.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace InkForge.Sqlite.Migrations
{
[DbContext(typeof(NoteDbContext))]
partial class NoteDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
2024-04-05 12:31:34 +02:00
modelBuilder.HasAnnotation("ProductVersion", "8.0.3");
2024-02-07 22:44:37 +01:00
modelBuilder.Entity("InkForge.Data.Blob", b =>
{
2024-05-02 21:44:13 +02:00
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2024-02-07 22:44:37 +01:00
2024-04-05 12:31:34 +02:00
b.Property<byte[]>("Value")
2024-02-07 22:44:37 +01:00
.IsRequired()
.HasColumnType("BLOB");
b.HasKey("Id");
2024-05-02 21:44:13 +02:00
b.ToTable("Blobs");
2024-02-07 22:44:37 +01:00
});
2024-04-05 12:31:34 +02:00
modelBuilder.Entity("InkForge.Data.MetadataEntity", b =>
2024-02-16 02:24:25 +01:00
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
2024-05-02 21:44:13 +02:00
b.ToTable("Metadata");
2024-02-16 02:24:25 +01:00
});
2024-04-05 12:31:34 +02:00
modelBuilder.Entity("InkForge.Data.NoteEntity", b =>
2024-02-07 22:44:37 +01:00
{
2024-02-16 02:24:25 +01:00
b.Property<int>("Id")
2024-02-07 22:44:37 +01:00
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2024-04-05 12:31:34 +02:00
b.Property<int?>("ParentId")
2024-02-07 22:44:37 +01:00
.HasColumnType("INTEGER");
2024-04-05 12:31:34 +02:00
b.HasKey("Id");
2024-02-07 22:44:37 +01:00
2024-04-05 12:31:34 +02:00
b.HasIndex("ParentId");
2024-02-07 22:44:37 +01:00
2024-05-02 21:44:13 +02:00
b.ToTable("Notes");
2024-02-07 22:44:37 +01:00
});
2024-04-05 12:31:34 +02:00
modelBuilder.Entity("InkForge.Data.NoteEntity", b =>
2024-02-07 22:44:37 +01:00
{
2024-04-05 12:31:34 +02:00
b.HasOne("InkForge.Data.NoteEntity", "Parent")
.WithMany()
.HasForeignKey("ParentId");
2024-02-07 22:44:37 +01:00
2024-05-02 21:44:13 +02:00
b.OwnsOne("InkForge.Data.Note", "Value", b1 =>
2024-02-07 22:44:37 +01:00
{
2024-04-05 12:31:34 +02:00
b1.Property<int>("NoteEntityId")
2024-02-07 22:44:37 +01:00
.HasColumnType("INTEGER");
2024-05-02 21:44:13 +02:00
b1.Property<int>("ContentId")
.HasColumnType("INTEGER");
2024-02-07 22:44:37 +01:00
b1.Property<DateTimeOffset>("Created")
.HasColumnType("TEXT");
b1.Property<DateTimeOffset?>("Deleted")
.HasColumnType("TEXT");
b1.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b1.Property<DateTimeOffset>("Updated")
.HasColumnType("TEXT");
2024-04-05 12:31:34 +02:00
b1.HasKey("NoteEntityId");
2024-02-07 22:44:37 +01:00
2024-05-02 21:44:13 +02:00
b1.HasIndex("ContentId")
.IsUnique();
2024-02-07 22:44:37 +01:00
2024-05-02 21:44:13 +02:00
b1.ToTable("Notes");
2024-02-07 22:44:37 +01:00
2024-05-02 21:44:13 +02:00
b1.HasOne("InkForge.Data.Blob", null)
.WithOne()
.HasForeignKey("InkForge.Data.NoteEntity.Value#InkForge.Data.Note", "ContentId")
2024-02-07 22:44:37 +01:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b1.WithOwner()
2024-04-05 12:31:34 +02:00
.HasForeignKey("NoteEntityId");
2024-02-07 22:44:37 +01:00
});
2024-04-05 12:31:34 +02:00
b.Navigation("Parent");
2024-02-07 22:44:37 +01:00
b.Navigation("Value")
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}