171 lines
5.9 KiB
C#
171 lines
5.9 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using public_valetax.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace public_valetax.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20251226122935_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.0")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("public_valetax.Models.JournalEntry", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<string>("BodyParameters")
|
|
.HasColumnType("text")
|
|
.HasColumnName("body_parameters");
|
|
|
|
b.Property<long>("EventId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("event_id");
|
|
|
|
b.Property<string>("ExceptionType")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)")
|
|
.HasColumnName("exception_type");
|
|
|
|
b.Property<string>("Message")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("message");
|
|
|
|
b.Property<string>("QueryParameters")
|
|
.HasColumnType("text")
|
|
.HasColumnName("query_parameters");
|
|
|
|
b.Property<string>("StackTrace")
|
|
.HasColumnType("text")
|
|
.HasColumnName("stack_trace");
|
|
|
|
b.Property<DateTime>("Timestamp")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("timestamp");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EventId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("journal_entries");
|
|
});
|
|
|
|
modelBuilder.Entity("public_valetax.Models.Node", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<long?>("ParentId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("parent_id");
|
|
|
|
b.Property<long>("TreeId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("tree_id");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.HasIndex("TreeId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("nodes");
|
|
});
|
|
|
|
modelBuilder.Entity("public_valetax.Models.Tree", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)")
|
|
.HasColumnName("name");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("trees");
|
|
});
|
|
|
|
modelBuilder.Entity("public_valetax.Models.Node", b =>
|
|
{
|
|
b.HasOne("public_valetax.Models.Node", "Parent")
|
|
.WithMany("Children")
|
|
.HasForeignKey("ParentId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("public_valetax.Models.Tree", "Tree")
|
|
.WithMany("Nodes")
|
|
.HasForeignKey("TreeId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Parent");
|
|
|
|
b.Navigation("Tree");
|
|
});
|
|
|
|
modelBuilder.Entity("public_valetax.Models.Node", b =>
|
|
{
|
|
b.Navigation("Children");
|
|
});
|
|
|
|
modelBuilder.Entity("public_valetax.Models.Tree", b =>
|
|
{
|
|
b.Navigation("Nodes");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|