// <auto-generated />
using System;
using ColaFlow.Modules.IssueManagement.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 ColaFlow.Modules.IssueManagement.Infrastructure.Migrations
{
    [DbContext(typeof(IssueManagementDbContext))]
    [Migration("20251104104008_InitialIssueModule")]
    partial class InitialIssueModule
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.10")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("ColaFlow.Modules.IssueManagement.Domain.Entities.Issue", b =>
                {
                    b.Property<Guid>("Id")
                        .HasColumnType("uuid");

                    b.Property<Guid?>("AssigneeId")
                        .HasColumnType("uuid");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Description")
                        .IsRequired()
                        .HasMaxLength(2000)
                        .HasColumnType("character varying(2000)");

                    b.Property<string>("Priority")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<Guid>("ProjectId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("ReporterId")
                        .HasColumnType("uuid");

                    b.Property<string>("Status")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<Guid>("TenantId")
                        .HasColumnType("uuid");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)");

                    b.Property<string>("Type")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("Id");

                    b.HasIndex("AssigneeId")
                        .HasDatabaseName("IX_Issues_AssigneeId");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_Issues_CreatedAt");

                    b.HasIndex("ProjectId")
                        .HasDatabaseName("IX_Issues_ProjectId");

                    b.HasIndex("TenantId")
                        .HasDatabaseName("IX_Issues_TenantId");

                    b.HasIndex("ProjectId", "Status")
                        .HasDatabaseName("IX_Issues_ProjectId_Status");

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