feat: implement core domain models, authentication service, and UI components for the attendance system

This commit is contained in:
2026-07-31 14:39:25 -04:00
commit f476f704eb
329 changed files with 12622 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace Asistencia.Models;
public class AsistenciaAlumno
{
public int IdDetalleContrato { get; set; }
public DateTime FechaAsistencia { get; set; }
[MaxLength(10)]
public string Hora { get; set; } = string.Empty;
public int IdTipoAsistencia { get; set; } = 3;
public DetalleContrato? DetalleContrato { get; set; }
}
+29
View File
@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
namespace Asistencia.Models;
public class AsistenciaProfesor
{
[Key]
public int Id { get; set; }
public int IdCursoAbierto { get; set; }
[MaxLength(20)]
public string RutPasaporte { get; set; } = string.Empty;
public DateTime FechaAsistencia { get; set; }
[MaxLength(10)]
public string HoraInicio { get; set; } = string.Empty;
[MaxLength(10)]
public string HoraFin { get; set; } = string.Empty;
[MaxLength(20)]
public string Estado { get; set; } = "Activa";
public bool Temporal { get; set; }
public CursoAbierto? CursoAbierto { get; set; }
}
+12
View File
@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace Asistencia.Models;
public class Curso
{
[Key]
public int IdCursos { get; set; }
[MaxLength(200)]
public string NombreCurso { get; set; } = string.Empty;
}
+32
View File
@@ -0,0 +1,32 @@
using System.ComponentModel.DataAnnotations;
namespace Asistencia.Models;
public class CursoAbierto
{
[Key]
public int IdCursoAbierto { get; set; }
public int IdCursos { get; set; }
[MaxLength(50)]
public string Sala { get; set; } = string.Empty;
[MaxLength(100)]
public string Sede { get; set; } = string.Empty;
[MaxLength(10)]
public string HoraInicio { get; set; } = string.Empty;
[MaxLength(10)]
public string HoraFin { get; set; } = string.Empty;
public DateTime FechaInicio { get; set; }
public DateTime FechaTermino { get; set; }
[MaxLength(20)]
public string ProfesorRun { get; set; } = string.Empty;
public Curso? Curso { get; set; }
}
+30
View File
@@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations;
namespace Asistencia.Models;
public class DetalleContrato
{
[Key]
public int IdDetalleContrato { get; set; }
public int IdCursoAbierto { get; set; }
[MaxLength(100)]
public string AP_Paterno { get; set; } = string.Empty;
[MaxLength(100)]
public string AP_Materno { get; set; } = string.Empty;
[MaxLength(100)]
public string Nombres { get; set; } = string.Empty;
[MaxLength(200)]
public string Email { get; set; } = string.Empty;
[MaxLength(20)]
public string Telefono { get; set; } = string.Empty;
public CursoAbierto? CursoAbierto { get; set; }
public string NombreCompleto => $"{Nombres} {AP_Paterno} {AP_Materno}".Trim();
}
+35
View File
@@ -0,0 +1,35 @@
using System.ComponentModel.DataAnnotations;
namespace Asistencia.Models;
public class Profesor
{
[Key]
[MaxLength(20)]
public string RutPasaporte { get; set; } = string.Empty;
[MaxLength(100)]
public string Nombre { get; set; } = string.Empty;
[MaxLength(100)]
public string Paterno { get; set; } = string.Empty;
[MaxLength(100)]
public string Materno { get; set; } = string.Empty;
[MaxLength(200)]
public string Email { get; set; } = string.Empty;
[MaxLength(20)]
public string Fono { get; set; } = string.Empty;
[MaxLength(300)]
public string Direccion { get; set; } = string.Empty;
[MaxLength(500)]
public string Clave { get; set; } = string.Empty;
public bool CrearClave { get; set; }
public string NombreCompleto => $"{Nombre} {Paterno} {Materno}".Trim();
}
+16
View File
@@ -0,0 +1,16 @@
namespace Asistencia.Models;
public static class TipoAsistencia
{
public const int Presente = 1;
public const int Tardanza = 2;
public const int Ausente = 3;
public static string Nombre(int id) => id switch
{
Presente => "Presente",
Tardanza => "Tardanza",
Ausente => "Ausente",
_ => "Desconocido"
};
}