// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Admin.Service.Data;

#nullable disable

namespace Admin.Service.Data.Migrations
{
    [DbContext(typeof(AdminContext))]
    [Migration("20260406034800_AddCorsSetting")]
    partial class AddCorsSetting
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "10.0.0");

            modelBuilder.Entity("Admin.Service.Data.Entites.AuditLog", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("Action")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("TEXT");

                    b.Property<string>("ActorId")
                        .HasMaxLength(64)
                        .HasColumnType("TEXT");

                    b.Property<string>("ActorType")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("Detail")
                        .HasColumnType("TEXT");

                    b.Property<string>("IpAddress")
                        .HasMaxLength(64)
                        .HasColumnType("TEXT");

                    b.Property<string>("Result")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("TEXT");

                    b.Property<string>("Target")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("TEXT");

                    b.Property<string>("UserAgent")
                        .HasMaxLength(512)
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.HasIndex("Action");

                    b.HasIndex("CreatedAt");

                    b.ToTable("AuditLogs");
                });

            modelBuilder.Entity("Admin.Service.Data.Entites.McpAccessKey", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("AllowedTools")
                        .HasMaxLength(2048)
                        .HasColumnType("TEXT");

                    b.Property<string>("CorsAllowedOrigins")
                        .HasMaxLength(4000)
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(64)
                        .HasColumnType("TEXT");

                    b.Property<DateTime?>("ExpiresAt")
                        .HasColumnType("TEXT");

                    b.Property<bool>("IsActive")
                        .HasColumnType("INTEGER");

                    b.Property<string>("KeyHash")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("TEXT");

                    b.Property<string>("KeyPrefix")
                        .IsRequired()
                        .HasMaxLength(16)
                        .HasColumnType("TEXT");

                    b.Property<DateTime?>("LastUsedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("TEXT");

                    b.Property<int?>("PermitLimitOverride")
                        .HasColumnType("INTEGER");

                    b.Property<int?>("QueueLimitOverride")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime?>("RevokedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("RevokedBy")
                        .HasMaxLength(64)
                        .HasColumnType("TEXT");

                    b.Property<string>("SqlConnectionString")
                        .HasMaxLength(4000)
                        .HasColumnType("TEXT");

                    b.Property<string>("SqlProvider")
                        .HasMaxLength(32)
                        .HasColumnType("TEXT");

                    b.Property<int?>("WindowSecondsOverride")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.HasIndex("IsActive");

                    b.HasIndex("KeyHash")
                        .IsUnique();

                    b.HasIndex("KeyPrefix");

                    b.ToTable("McpAccessKeys");
                });

            modelBuilder.Entity("Admin.Service.Data.Entites.SuperUser", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("Mail")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("PasswordHash")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Username")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("SuperUsers");
                });
#pragma warning restore 612, 618
        }
    }
}
