// <auto-generated />
using System;
using FamilyTreeAPI.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace FamilyTreeAPI.Migrations
{
    [DbContext(typeof(FamilyTreeDBContext))]
    partial class FamilyTreeDBContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.4")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("FamilyTreeAPI.Models.Lookup", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasColumnName("id");

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

                    b.Property<string>("Code")
                        .HasMaxLength(10)
                        .HasColumnType("character varying(10)")
                        .HasColumnName("code");

                    b.Property<string>("Description")
                        .HasMaxLength(80)
                        .HasColumnType("character varying(80)")
                        .HasColumnName("description");

                    b.Property<bool?>("Lactive")
                        .HasColumnType("boolean")
                        .HasColumnName("lactive");

                    b.Property<string>("Type")
                        .HasMaxLength(20)
                        .HasColumnType("character varying(20)")
                        .HasColumnName("ltype");

                    b.HasKey("Id");

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

            modelBuilder.Entity("FamilyTreeAPI.Models.Person", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasColumnName("id");

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

                    b.Property<string>("Address")
                        .HasMaxLength(120)
                        .HasColumnType("character varying(120)")
                        .HasColumnName("address");

                    b.Property<bool?>("Alive")
                        .HasColumnType("boolean")
                        .HasColumnName("alive");

                    b.Property<string>("Email")
                        .HasMaxLength(80)
                        .HasColumnType("character varying(80)")
                        .HasColumnName("email");

                    b.Property<int?>("FatherId")
                        .HasColumnType("integer")
                        .HasColumnName("fatherid");

                    b.Property<string>("FirstName")
                        .HasMaxLength(70)
                        .HasColumnType("character varying(70)")
                        .HasColumnName("firstname");

                    b.Property<string>("Image")
                        .HasMaxLength(300)
                        .HasColumnType("character varying(300)")
                        .HasColumnName("image");

                    b.Property<string>("LastName")
                        .HasMaxLength(70)
                        .HasColumnType("character varying(70)")
                        .HasColumnName("lastname");

                    b.Property<int?>("MotherId")
                        .HasColumnType("integer")
                        .HasColumnName("motherid");

                    b.Property<string>("Phone")
                        .HasMaxLength(30)
                        .HasColumnType("character varying(30)")
                        .HasColumnName("phone");

                    b.Property<string>("Sex")
                        .HasMaxLength(10)
                        .HasColumnType("character varying(10)")
                        .HasColumnName("sex");

                    b.Property<DateTime?>("dob")
                        .HasColumnType("timestamp without time zone")
                        .HasColumnName("dob");

                    b.HasKey("Id");

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

            modelBuilder.Entity("FamilyTreeAPI.Models.PersonPhoto", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasColumnName("id");

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

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

                    b.Property<int>("PersonId")
                        .HasColumnType("integer")
                        .HasColumnName("personid");

                    b.Property<string>("Photo")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("photo");

                    b.HasKey("Id");

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

            modelBuilder.Entity("FamilyTreeAPI.Models.RelationShip", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasColumnName("id");

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

                    b.Property<int>("PersonId")
                        .HasColumnType("integer")
                        .HasColumnName("personid");

                    b.Property<int>("RelatePersonId")
                        .HasColumnType("integer")
                        .HasColumnName("relatepersonid");

                    b.HasKey("Id");

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

            modelBuilder.Entity("FamilyTreeAPI.Models.staff", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasColumnName("id");

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

                    b.Property<string>("Email")
                        .HasMaxLength(80)
                        .HasColumnType("character varying(80)")
                        .HasColumnName("email");

                    b.Property<string>("Firstname")
                        .HasMaxLength(70)
                        .HasColumnType("character varying(70)")
                        .HasColumnName("firstname");

                    b.Property<string>("Lastname")
                        .HasMaxLength(70)
                        .HasColumnType("character varying(70)")
                        .HasColumnName("lastname");

                    b.Property<string>("Phone")
                        .HasMaxLength(30)
                        .HasColumnType("character varying(30)")
                        .HasColumnName("phone");

                    b.Property<bool?>("Sactive")
                        .HasColumnType("boolean")
                        .HasColumnName("sactive");

                    b.Property<string>("Spassword")
                        .HasMaxLength(200)
                        .HasColumnType("character varying(200)")
                        .HasColumnName("spassword");

                    b.Property<int?>("Srole")
                        .HasColumnType("integer")
                        .HasColumnName("srole");

                    b.Property<int?>("Stype")
                        .HasColumnType("integer")
                        .HasColumnName("stype");

                    b.HasKey("Id");

                    b.ToTable("staff", (string)null);
                });
#pragma warning restore 612, 618
        }
    }
}
