// <auto-generated />
using System;
using Knot.Shared.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace Knot.Shared.Infrastructure.Migrations
{
    [DbContext(typeof(SystemDbContext))]
    [Migration("20260322191936_InitialSystem")]
    partial class InitialSystem
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasDefaultSchema("system")
                .HasAnnotation("ProductVersion", "10.0.4")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("Knot.Shared.Infrastructure.Persistence.Entities.DailyStat", b =>
                {
                    b.Property<DateTime>("Date")
                        .HasColumnType("timestamp with time zone");

                    b.Property<long>("ActiveUsers")
                        .HasColumnType("bigint");

                    b.Property<long>("TotalFilesSize")
                        .HasColumnType("bigint");

                    b.Property<long>("TotalMessages")
                        .HasColumnType("bigint");

                    b.HasKey("Date");

                    b.ToTable("DailyStats", "system");
                });

            modelBuilder.Entity("Knot.Shared.Infrastructure.Persistence.Entities.SystemSetting", b =>
                {
                    b.Property<string>("Key")
                        .HasColumnType("text");

                    b.Property<string>("EncryptedValue")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("Key");

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