put in ignore file

This commit is contained in:
2025-08-10 22:01:36 +10:00
parent c2bf5cad70
commit ba79e8f1c4
151 changed files with 21703 additions and 0 deletions
@@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
namespace FamilyTreeAPI.Models
{
public partial class FamilyTreeDBContext : DbContext
{
public FamilyTreeDBContext()
{
}
public FamilyTreeDBContext(DbContextOptions<FamilyTreeDBContext> options)
: base(options)
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}
public virtual DbSet<Person> Persons { get; set; } = null!;
public virtual DbSet<RelationShip> RelationShips { get; set; } = null!;
public virtual DbSet<Lookup> Lookups { get; set; } = null!;
public virtual DbSet<staff> staff { get; set; } = null!;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Person>(entity =>
{
entity.ToTable("person");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Address)
.HasMaxLength(120)
.HasColumnName("address");
entity.Property(e => e.Alive).HasColumnName("alive");
entity.Property(e => e.dob).HasColumnName("dob");
entity.Property(e => e.MotherId).HasColumnName("motherid");
entity.Property(e => e.FatherId).HasColumnName("fatherid");
entity.Property(e => e.FirstName)
.HasMaxLength(70)
.HasColumnName("firstname");
entity.Property(e => e.Sex)
.HasMaxLength(10)
.HasColumnName("sex");
entity.Property(e => e.Image)
.HasMaxLength(300)
.HasColumnName("image");
entity.Property(e => e.LastName)
.HasMaxLength(70)
.HasColumnName("lastname");
entity.Property(e => e.Email)
.HasMaxLength(80)
.HasColumnName("email");
entity.Property(e => e.Phone)
.HasMaxLength(30)
.HasColumnName("phone");
});
modelBuilder.Entity<RelationShip>(entity =>
{
entity.ToTable("relationship");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.RelatePersonId).HasColumnName("relatepersonid");
entity.Property(e => e.PersonId).HasColumnName("personid");
});
modelBuilder.Entity<Lookup>(entity =>
{
entity.ToTable("lookup");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Code)
.HasMaxLength(10)
.HasColumnName("code");
entity.Property(e => e.Description)
.HasMaxLength(80)
.HasColumnName("description");
entity.Property(e => e.Lactive).HasColumnName("lactive");
entity.Property(e => e.Type).HasMaxLength(20)
.HasColumnName("ltype");
});
modelBuilder.Entity<staff>(entity =>
{
entity.ToTable("staff");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Email)
.HasMaxLength(80)
.HasColumnName("email");
entity.Property(e => e.Firstname)
.HasMaxLength(70)
.HasColumnName("firstname");
entity.Property(e => e.Lastname)
.HasMaxLength(70)
.HasColumnName("lastname");
entity.Property(e => e.Phone)
.HasMaxLength(30)
.HasColumnName("phone");
entity.Property(e => e.Sactive).HasColumnName("sactive");
entity.Property(e => e.Spassword)
.HasMaxLength(200)
.HasColumnName("spassword");
entity.Property(e => e.Srole).HasColumnName("srole");
entity.Property(e => e.Stype).HasColumnName("stype");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
}
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
namespace FamilyTreeAPI.Models
{
public partial class Lookup
{
public int Id { get; set; }
public string? Code { get; set; }
public string? Description { get; set; }
public string? Type { get; set; }
public bool? Lactive { get; set; }
}
}
+30
View File
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
namespace FamilyTreeAPI.Models
{
public partial class Person
{
public Person()
{
// Servicetasks = new HashSet<Servicetask>();
}
public int Id { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public string? Address { get; set; }
public string? Sex { get; set; }
public string? Image { get; set; }
public bool? Alive { get; set; }
public int? MotherId { get; set; }
public int? FatherId { get; set; }
public DateTime? dob { get; set; }
//public virtual ICollection<Staffwork> Staffworks { get; set; }
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace FamilyTreeAPI.Models;
public class RelationShip
{
public int Id { get; set; }
public int RelatePersonId { get; set; }
public int PersonId { get; set; }
}
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
namespace FamilyTreeAPI.Models
{
public partial class staff
{
public staff()
{
// ServicetaskAssigntoNavigations = new HashSet<Servicetask>();
// ServicetaskStaffs = new HashSet<Servicetask>();
// Staffworks = new HashSet<Staffwork>();
}
public int Id { get; set; }
public string? Firstname { get; set; }
public string? Lastname { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public int? Stype { get; set; }
public int? Srole { get; set; }
public string? Spassword { get; set; }
public bool? Sactive { get; set; }
// public virtual ICollection<Servicetask> ServicetaskAssigntoNavigations { get; set; }
// public virtual ICollection<Servicetask> ServicetaskStaffs { get; set; }
//public virtual ICollection<Staffwork> Staffworks { get; set; }
}
}