//
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Code")
.HasMaxLength(10)
.HasColumnType("character varying(10)")
.HasColumnName("code");
b.Property("Description")
.HasMaxLength(80)
.HasColumnType("character varying(80)")
.HasColumnName("description");
b.Property("Lactive")
.HasColumnType("boolean")
.HasColumnName("lactive");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Address")
.HasMaxLength(120)
.HasColumnType("character varying(120)")
.HasColumnName("address");
b.Property("Alive")
.HasColumnType("boolean")
.HasColumnName("alive");
b.Property("Email")
.HasMaxLength(80)
.HasColumnType("character varying(80)")
.HasColumnName("email");
b.Property("FatherId")
.HasColumnType("integer")
.HasColumnName("fatherid");
b.Property("FirstName")
.HasMaxLength(70)
.HasColumnType("character varying(70)")
.HasColumnName("firstname");
b.Property("Image")
.HasMaxLength(300)
.HasColumnType("character varying(300)")
.HasColumnName("image");
b.Property("LastName")
.HasMaxLength(70)
.HasColumnType("character varying(70)")
.HasColumnName("lastname");
b.Property("MotherId")
.HasColumnType("integer")
.HasColumnName("motherid");
b.Property("Phone")
.HasMaxLength(30)
.HasColumnType("character varying(30)")
.HasColumnName("phone");
b.Property("Sex")
.HasMaxLength(10)
.HasColumnType("character varying(10)")
.HasColumnName("sex");
b.Property("dob")
.HasColumnType("timestamp without time zone")
.HasColumnName("dob");
b.HasKey("Id");
b.ToTable("person", (string)null);
});
modelBuilder.Entity("FamilyTreeAPI.Models.PersonPhoto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("ImagePhoto")
.IsRequired()
.HasColumnType("bytea")
.HasColumnName("imagephot");
b.Property("PersonId")
.HasColumnType("integer")
.HasColumnName("personid");
b.Property("Photo")
.IsRequired()
.HasColumnType("text")
.HasColumnName("photo");
b.HasKey("Id");
b.ToTable("personphoto", (string)null);
});
modelBuilder.Entity("FamilyTreeAPI.Models.RelationShip", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("PersonId")
.HasColumnType("integer")
.HasColumnName("personid");
b.Property("RelatePersonId")
.HasColumnType("integer")
.HasColumnName("relatepersonid");
b.HasKey("Id");
b.ToTable("relationship", (string)null);
});
modelBuilder.Entity("FamilyTreeAPI.Models.staff", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Email")
.HasMaxLength(80)
.HasColumnType("character varying(80)")
.HasColumnName("email");
b.Property("Firstname")
.HasMaxLength(70)
.HasColumnType("character varying(70)")
.HasColumnName("firstname");
b.Property("Lastname")
.HasMaxLength(70)
.HasColumnType("character varying(70)")
.HasColumnName("lastname");
b.Property("Phone")
.HasMaxLength(30)
.HasColumnType("character varying(30)")
.HasColumnName("phone");
b.Property("Sactive")
.HasColumnType("boolean")
.HasColumnName("sactive");
b.Property("Spassword")
.HasMaxLength(200)
.HasColumnType("character varying(200)")
.HasColumnName("spassword");
b.Property("Srole")
.HasColumnType("integer")
.HasColumnName("srole");
b.Property("Stype")
.HasColumnType("integer")
.HasColumnName("stype");
b.HasKey("Id");
b.ToTable("staff", (string)null);
});
#pragma warning restore 612, 618
}
}
}