// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Ray.BiliBiliTool.Infrastructure.EF;

#nullable disable

namespace Ray.BiliBiliTool.Web.Migrations
{
    [DbContext(typeof(BiliDbContext))]
    [Migration("20250503164108_Update")]
    partial class Update
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "8.0.3");

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzBlobTrigger", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("TriggerName")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_NAME");

                    b.Property<string>("TriggerGroup")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.Property<byte[]>("BlobData")
                        .HasColumnType("bytea")
                        .HasColumnName("BLOB_DATA");

                    b.HasKey("SchedulerName", "TriggerName", "TriggerGroup");

                    b.ToTable("QRTZ_BLOB_TRIGGERS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzCalendar", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("CalendarName")
                        .HasColumnType("text")
                        .HasColumnName("CALENDAR_NAME");

                    b.Property<byte[]>("Calendar")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("CALENDAR");

                    b.HasKey("SchedulerName", "CalendarName");

                    b.ToTable("QRTZ_CALENDARS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzCronTrigger", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("TriggerName")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_NAME");

                    b.Property<string>("TriggerGroup")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.Property<string>("CronExpression")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("CRON_EXPRESSION");

                    b.Property<string>("TimeZoneId")
                        .HasColumnType("text")
                        .HasColumnName("TIME_ZONE_ID");

                    b.HasKey("SchedulerName", "TriggerName", "TriggerGroup");

                    b.ToTable("QRTZ_CRON_TRIGGERS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzFiredTrigger", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("EntryId")
                        .HasColumnType("text")
                        .HasColumnName("ENTRY_ID");

                    b.Property<long>("FiredTime")
                        .HasColumnType("bigint")
                        .HasColumnName("FIRED_TIME");

                    b.Property<string>("InstanceName")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("INSTANCE_NAME");

                    b.Property<bool>("IsNonConcurrent")
                        .HasColumnType("bool")
                        .HasColumnName("IS_NONCONCURRENT");

                    b.Property<string>("JobGroup")
                        .HasColumnType("text")
                        .HasColumnName("JOB_GROUP");

                    b.Property<string>("JobName")
                        .HasColumnType("text")
                        .HasColumnName("JOB_NAME");

                    b.Property<int>("Priority")
                        .HasColumnType("integer")
                        .HasColumnName("PRIORITY");

                    b.Property<bool?>("RequestsRecovery")
                        .HasColumnType("bool")
                        .HasColumnName("REQUESTS_RECOVERY");

                    b.Property<long>("ScheduledTime")
                        .HasColumnType("bigint")
                        .HasColumnName("SCHED_TIME");

                    b.Property<string>("State")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("STATE");

                    b.Property<string>("TriggerGroup")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.Property<string>("TriggerName")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_NAME");

                    b.HasKey("SchedulerName", "EntryId");

                    b.HasIndex("InstanceName")
                        .HasDatabaseName("IDX_QRTZ_FT_TRIG_INST_NAME");

                    b.HasIndex("JobGroup")
                        .HasDatabaseName("IDX_QRTZ_FT_JOB_GROUP");

                    b.HasIndex("JobName")
                        .HasDatabaseName("IDX_QRTZ_FT_JOB_NAME");

                    b.HasIndex("RequestsRecovery")
                        .HasDatabaseName("IDX_QRTZ_FT_JOB_REQ_RECOVERY");

                    b.HasIndex("TriggerGroup")
                        .HasDatabaseName("IDX_QRTZ_FT_TRIG_GROUP");

                    b.HasIndex("TriggerName")
                        .HasDatabaseName("IDX_QRTZ_FT_TRIG_NAME");

                    b.HasIndex("SchedulerName", "TriggerName", "TriggerGroup")
                        .HasDatabaseName("IDX_QRTZ_FT_TRIG_NM_GP");

                    b.ToTable("QRTZ_FIRED_TRIGGERS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzJobDetail", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("JobName")
                        .HasColumnType("text")
                        .HasColumnName("JOB_NAME");

                    b.Property<string>("JobGroup")
                        .HasColumnType("text")
                        .HasColumnName("JOB_GROUP");

                    b.Property<string>("Description")
                        .HasColumnType("text")
                        .HasColumnName("DESCRIPTION");

                    b.Property<bool>("IsDurable")
                        .HasColumnType("bool")
                        .HasColumnName("IS_DURABLE");

                    b.Property<bool>("IsNonConcurrent")
                        .HasColumnType("bool")
                        .HasColumnName("IS_NONCONCURRENT");

                    b.Property<bool>("IsUpdateData")
                        .HasColumnType("bool")
                        .HasColumnName("IS_UPDATE_DATA");

                    b.Property<string>("JobClassName")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("JOB_CLASS_NAME");

                    b.Property<byte[]>("JobData")
                        .HasColumnType("bytea")
                        .HasColumnName("JOB_DATA");

                    b.Property<bool>("RequestsRecovery")
                        .HasColumnType("bool")
                        .HasColumnName("REQUESTS_RECOVERY");

                    b.HasKey("SchedulerName", "JobName", "JobGroup");

                    b.HasIndex("RequestsRecovery")
                        .HasDatabaseName("IDX_QRTZ_J_REQ_RECOVERY");

                    b.ToTable("QRTZ_JOB_DETAILS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzLock", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("LockName")
                        .HasColumnType("text")
                        .HasColumnName("LOCK_NAME");

                    b.HasKey("SchedulerName", "LockName");

                    b.ToTable("QRTZ_LOCKS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzPausedTriggerGroup", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("TriggerGroup")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.HasKey("SchedulerName", "TriggerGroup");

                    b.ToTable("QRTZ_PAUSED_TRIGGER_GRPS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzSchedulerState", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("InstanceName")
                        .HasColumnType("text")
                        .HasColumnName("INSTANCE_NAME");

                    b.Property<long>("CheckInInterval")
                        .HasColumnType("bigint")
                        .HasColumnName("CHECKIN_INTERVAL");

                    b.Property<long>("LastCheckInTime")
                        .HasColumnType("bigint")
                        .HasColumnName("LAST_CHECKIN_TIME");

                    b.HasKey("SchedulerName", "InstanceName");

                    b.ToTable("QRTZ_SCHEDULER_STATE", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzSimplePropertyTrigger", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("TriggerName")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_NAME");

                    b.Property<string>("TriggerGroup")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.Property<bool?>("BooleanProperty1")
                        .HasColumnType("bool")
                        .HasColumnName("BOOL_PROP_1");

                    b.Property<bool?>("BooleanProperty2")
                        .HasColumnType("bool")
                        .HasColumnName("BOOL_PROP_2");

                    b.Property<decimal?>("DecimalProperty1")
                        .HasColumnType("numeric")
                        .HasColumnName("DEC_PROP_1");

                    b.Property<decimal?>("DecimalProperty2")
                        .HasColumnType("numeric")
                        .HasColumnName("DEC_PROP_2");

                    b.Property<int?>("IntegerProperty1")
                        .HasColumnType("integer")
                        .HasColumnName("INT_PROP_1");

                    b.Property<int?>("IntegerProperty2")
                        .HasColumnType("integer")
                        .HasColumnName("INT_PROP_2");

                    b.Property<long?>("LongProperty1")
                        .HasColumnType("bigint")
                        .HasColumnName("LONG_PROP_1");

                    b.Property<long?>("LongProperty2")
                        .HasColumnType("bigint")
                        .HasColumnName("LONG_PROP_2");

                    b.Property<string>("StringProperty1")
                        .HasColumnType("text")
                        .HasColumnName("STR_PROP_1");

                    b.Property<string>("StringProperty2")
                        .HasColumnType("text")
                        .HasColumnName("STR_PROP_2");

                    b.Property<string>("StringProperty3")
                        .HasColumnType("text")
                        .HasColumnName("STR_PROP_3");

                    b.Property<string>("TimeZoneId")
                        .HasColumnType("text")
                        .HasColumnName("TIME_ZONE_ID");

                    b.HasKey("SchedulerName", "TriggerName", "TriggerGroup");

                    b.ToTable("QRTZ_SIMPROP_TRIGGERS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzSimpleTrigger", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("TriggerName")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_NAME");

                    b.Property<string>("TriggerGroup")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.Property<long>("RepeatCount")
                        .HasColumnType("bigint")
                        .HasColumnName("REPEAT_COUNT");

                    b.Property<long>("RepeatInterval")
                        .HasColumnType("bigint")
                        .HasColumnName("REPEAT_INTERVAL");

                    b.Property<long>("TimesTriggered")
                        .HasColumnType("bigint")
                        .HasColumnName("TIMES_TRIGGERED");

                    b.HasKey("SchedulerName", "TriggerName", "TriggerGroup");

                    b.ToTable("QRTZ_SIMPLE_TRIGGERS", (string)null);
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", b =>
                {
                    b.Property<string>("SchedulerName")
                        .HasColumnType("text")
                        .HasColumnName("SCHED_NAME");

                    b.Property<string>("TriggerName")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_NAME");

                    b.Property<string>("TriggerGroup")
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_GROUP");

                    b.Property<string>("CalendarName")
                        .HasColumnType("text")
                        .HasColumnName("CALENDAR_NAME");

                    b.Property<string>("Description")
                        .HasColumnType("text")
                        .HasColumnName("DESCRIPTION");

                    b.Property<long?>("EndTime")
                        .HasColumnType("bigint")
                        .HasColumnName("END_TIME");

                    b.Property<byte[]>("JobData")
                        .HasColumnType("bytea")
                        .HasColumnName("JOB_DATA");

                    b.Property<string>("JobGroup")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("JOB_GROUP");

                    b.Property<string>("JobName")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("JOB_NAME");

                    b.Property<short?>("MisfireInstruction")
                        .HasColumnType("smallint")
                        .HasColumnName("MISFIRE_INSTR");

                    b.Property<long?>("NextFireTime")
                        .HasColumnType("bigint")
                        .HasColumnName("NEXT_FIRE_TIME");

                    b.Property<long?>("PreviousFireTime")
                        .HasColumnType("bigint")
                        .HasColumnName("PREV_FIRE_TIME");

                    b.Property<int?>("Priority")
                        .HasColumnType("integer")
                        .HasColumnName("PRIORITY");

                    b.Property<long>("StartTime")
                        .HasColumnType("bigint")
                        .HasColumnName("START_TIME");

                    b.Property<string>("TriggerState")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_STATE");

                    b.Property<string>("TriggerType")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("TRIGGER_TYPE");

                    b.HasKey("SchedulerName", "TriggerName", "TriggerGroup");

                    b.HasIndex("NextFireTime")
                        .HasDatabaseName("IDX_QRTZ_T_NEXT_FIRE_TIME");

                    b.HasIndex("TriggerState")
                        .HasDatabaseName("IDX_QRTZ_T_STATE");

                    b.HasIndex("NextFireTime", "TriggerState")
                        .HasDatabaseName("IDX_QRTZ_T_NFT_ST");

                    b.HasIndex("SchedulerName", "JobName", "JobGroup");

                    b.ToTable("QRTZ_TRIGGERS", (string)null);
                });

            modelBuilder.Entity("Ray.BiliBiliTool.Domain.ExecutionLog", b =>
                {
                    b.Property<long>("LogId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<long>("DateAddedUtc")
                        .HasColumnType("INTEGER");

                    b.Property<string>("ErrorMessage")
                        .HasMaxLength(8000)
                        .HasColumnType("TEXT");

                    b.Property<long?>("FireTimeUtc")
                        .HasColumnType("INTEGER");

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

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

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

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

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

                    b.Property<TimeSpan?>("JobRunTime")
                        .HasColumnType("TEXT");

                    b.Property<string>("LogType")
                        .IsRequired()
                        .HasColumnType("varchar(20)");

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

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

                    b.Property<string>("ReturnCode")
                        .HasMaxLength(28)
                        .HasColumnType("TEXT");

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

                    b.Property<long?>("ScheduleFireTimeUtc")
                        .HasColumnType("INTEGER");

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

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

                    b.HasKey("LogId");

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

                    b.HasIndex("DateAddedUtc", "LogType");

                    b.HasIndex("TriggerName", "TriggerGroup", "JobName", "JobGroup", "DateAddedUtc");

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

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzBlobTrigger", b =>
                {
                    b.HasOne("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", "Trigger")
                        .WithMany("BlobTriggers")
                        .HasForeignKey("SchedulerName", "TriggerName", "TriggerGroup")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Trigger");
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzCronTrigger", b =>
                {
                    b.HasOne("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", "Trigger")
                        .WithMany("CronTriggers")
                        .HasForeignKey("SchedulerName", "TriggerName", "TriggerGroup")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Trigger");
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzSimplePropertyTrigger", b =>
                {
                    b.HasOne("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", "Trigger")
                        .WithMany("SimplePropertyTriggers")
                        .HasForeignKey("SchedulerName", "TriggerName", "TriggerGroup")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Trigger");
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzSimpleTrigger", b =>
                {
                    b.HasOne("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", "Trigger")
                        .WithMany("SimpleTriggers")
                        .HasForeignKey("SchedulerName", "TriggerName", "TriggerGroup")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Trigger");
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", b =>
                {
                    b.HasOne("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzJobDetail", "JobDetail")
                        .WithMany("Triggers")
                        .HasForeignKey("SchedulerName", "JobName", "JobGroup")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("JobDetail");
                });

            modelBuilder.Entity("Ray.BiliBiliTool.Domain.ExecutionLog", b =>
                {
                    b.OwnsOne("Ray.BiliBiliTool.Domain.ExecutionLogDetail", "ExecutionLogDetail", b1 =>
                        {
                            b1.Property<long>("LogId")
                                .HasColumnType("INTEGER");

                            b1.Property<int?>("ErrorCode")
                                .HasColumnType("INTEGER");

                            b1.Property<string>("ErrorHelpLink")
                                .HasMaxLength(1000)
                                .HasColumnType("TEXT");

                            b1.Property<string>("ErrorStackTrace")
                                .HasColumnType("TEXT");

                            b1.Property<string>("ExecutionDetails")
                                .HasColumnType("TEXT");

                            b1.HasKey("LogId");

                            b1.ToTable("bili_execution_log_details", (string)null);

                            b1.WithOwner()
                                .HasForeignKey("LogId");
                        });

                    b.Navigation("ExecutionLogDetail");
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzJobDetail", b =>
                {
                    b.Navigation("Triggers");
                });

            modelBuilder.Entity("AppAny.Quartz.EntityFrameworkCore.Migrations.QuartzTrigger", b =>
                {
                    b.Navigation("BlobTriggers");

                    b.Navigation("CronTriggers");

                    b.Navigation("SimplePropertyTriggers");

                    b.Navigation("SimpleTriggers");
                });
#pragma warning restore 612, 618
        }
    }
}
