// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using kehati.Database;

#nullable disable

namespace kehati.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    [Migration("20260717065158_InitialCreate")]
    partial class InitialCreate
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.1")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("kehati.Models.Entity.Master.Famili", b =>
                {
                    b.Property<int>("MsFamiliId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsFamiliId"));

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

                    b.HasKey("MsFamiliId");

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

            modelBuilder.Entity("kehati.Models.Entity.Master.Group", b =>
                {
                    b.Property<int>("MsGroupId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsGroupId"));

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

                    b.Property<int>("CreatedBy")
                        .HasColumnType("integer");

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

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

                    b.Property<int>("UpdatedBy")
                        .HasColumnType("integer");

                    b.HasKey("MsGroupId");

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

            modelBuilder.Entity("kehati.Models.Entity.Master.Habitat", b =>
                {
                    b.Property<int>("MsHabitusId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsHabitusId"));

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

                    b.HasKey("MsHabitusId");

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

            modelBuilder.Entity("kehati.Models.Entity.Master.Lokasi", b =>
                {
                    b.Property<int>("MsLokasiId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsLokasiId"));

                    b.Property<string>("Area")
                        .HasColumnType("text")
                        .HasColumnName("area");

                    b.Property<string>("Image")
                        .HasColumnType("text")
                        .HasColumnName("image");

                    b.Property<int?>("Kode")
                        .HasColumnType("integer")
                        .HasColumnName("kode");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.Property<string>("Region")
                        .HasColumnType("text")
                        .HasColumnName("region");

                    b.Property<string>("Slug")
                        .HasColumnType("text")
                        .HasColumnName("slug");

                    b.Property<string>("Status")
                        .HasColumnType("text")
                        .HasColumnName("status");

                    b.HasKey("MsLokasiId");

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

            modelBuilder.Entity("kehati.Models.Entity.Master.LokasiTumbuhan", b =>
                {
                    b.Property<int>("MsLokasiTumbuhanId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsLokasiTumbuhanId"));

                    b.Property<int>("MsLokasiId")
                        .HasColumnType("integer")
                        .HasColumnName("ms_lokasi_id");

                    b.Property<int>("MsTumbuhanId")
                        .HasColumnType("integer")
                        .HasColumnName("ms_tumbuhan_id");

                    b.HasKey("MsLokasiTumbuhanId");

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

            modelBuilder.Entity("kehati.Models.Entity.Master.Menu", b =>
                {
                    b.Property<int>("MsMenuId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsMenuId"));

                    b.Property<string>("MenuIcon")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("menu_icon");

                    b.Property<string>("MenuType")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("menu_type");

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

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

                    b.Property<int>("ParentId")
                        .HasColumnType("integer")
                        .HasColumnName("parent_id");

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

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

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

                    b.HasKey("MsMenuId");

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

            modelBuilder.Entity("kehati.Models.Entity.Master.Tumbuhan", b =>
                {
                    b.Property<int>("MsTumbuhanId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("MsTumbuhanId"));

                    b.Property<string>("Cites")
                        .HasColumnType("text")
                        .HasColumnName("cites");

                    b.Property<string>("Image")
                        .HasColumnType("text")
                        .HasColumnName("image");

                    b.Property<string>("Iucn")
                        .HasColumnType("text")
                        .HasColumnName("iucn");

                    b.Property<int>("MsFamiliId")
                        .HasColumnType("integer")
                        .HasColumnName("ms_famili_id");

                    b.Property<int>("MsHabitatId")
                        .HasColumnType("integer")
                        .HasColumnName("ms_habitus_id");

                    b.Property<string>("NamaIlmiah")
                        .HasColumnType("text")
                        .HasColumnName("name_ilmiah");

                    b.Property<string>("Name")
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.Property<string>("Slug")
                        .HasColumnType("text")
                        .HasColumnName("slug");

                    b.Property<string>("StatusPerlindungan")
                        .HasColumnType("text")
                        .HasColumnName("status_perlindungan");

                    b.Property<bool>("TanamanKhasJakarta")
                        .HasColumnType("boolean")
                        .HasColumnName("tanaman_khas_jakarta");

                    b.HasKey("MsTumbuhanId");

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

            modelBuilder.Entity("kehati.Models.Entity.User", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

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

                    b.Property<int>("MsGroupId")
                        .HasColumnType("integer")
                        .HasColumnName("ms_group_id");

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

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

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

                    b.HasKey("Id");

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