// using System; using Kynareth.Models; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Kynareth.Migrations { [DbContext(typeof(KynarethDbContext))] [Migration("20230114194230_Initial")] partial class Initial { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.1") .HasAnnotation("Proxies:ChangeTracking", false) .HasAnnotation("Proxies:CheckEquality", false) .HasAnnotation("Proxies:LazyLoading", true) .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("Kynareth.Models.ApiCall", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("Route") .IsRequired() .HasColumnType("longtext"); b.Property("TimeStamp") .HasColumnType("datetime(6)"); b.Property("TokenId") .HasColumnType("char(36)"); b.HasKey("Id"); b.HasIndex("TokenId"); b.ToTable("Calls"); }); modelBuilder.Entity("Kynareth.Models.ApiToken", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ClientId") .HasColumnType("bigint unsigned"); b.Property("Description") .IsRequired() .HasColumnType("longtext"); b.Property("IsValid") .HasColumnType("tinyint(1)"); b.Property("OwnerEmail") .IsRequired() .HasColumnType("longtext"); b.Property("Token") .IsRequired() .HasColumnType("longtext"); b.HasKey("Id"); b.ToTable("Tokens"); }); modelBuilder.Entity("Kynareth.Models.ApiCall", b => { b.HasOne("Kynareth.Models.ApiToken", "Token") .WithMany("ApiCalls") .HasForeignKey("TokenId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Token"); }); modelBuilder.Entity("Kynareth.Models.ApiToken", b => { b.Navigation("ApiCalls"); }); #pragma warning restore 612, 618 } } }