Modulos Pacientes Listo

This commit is contained in:
2026-08-11 23:21:29 -03:00
parent b4b25e49e0
commit 7c04a64269
164 changed files with 1717 additions and 5643 deletions
+12 -7
View File
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using vita_asistente.Data.Models;
using System.Reflection.Emit;
using vita_asistente.Models;
namespace vita_asistente.Data
@@ -12,17 +12,22 @@ namespace vita_asistente.Data
{
}
// DbSet for Paciente model
public DbSet<Paciente> Pacientes { get; set; }
public DbSet<Pacientes> Pacientes { get; set; }
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.Entity<ApplicationUser>().ToTable("AspNetUsers");
builder.Entity<Paciente>()
.ToTable("Pacientes")
.HasBaseType<ApplicationUser>();
//------Paciente----------------
builder.Entity<Pacientes>(entity =>
{
entity.HasKey(e => e.Id);
entity.Property(e => e.DocumentType).HasMaxLength(50).IsRequired();
entity.Property(e => e.DocumentNumber).HasMaxLength(20).IsRequired();
entity.Property(e => e.FirstName).HasMaxLength(100).IsRequired();
entity.Property(e => e.LastName).HasMaxLength(100).IsRequired();
} );
}
}
}
-30
View File
@@ -1,30 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using vita_asistente.Models;
namespace vita_asistente.Data.Models
{
public class Paciente : ApplicationUser
{
[StringLength(100)]
public string NombreContactoEmergencia { get; set; } = string.Empty;
[StringLength(50)]
public string TelefonoContactoEmergencia { get; set; } = string.Empty;
[StringLength(50)]
public string TipoSangre { get; set; } = string.Empty;
public bool TieneAlergiasMedicamentosas { get; set; }
[StringLength(500)]
public string AlergiasDescripcion { get; set; } = string.Empty;
public DateTime FechaRegistro { get; set; }
/// <summary>
/// Indicates whether the patient account is active and can log in
/// </summary>
public bool IsActive { get; set; } = true; // Default to active
}
}