| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("bitacora_auditoria")] |
| | | 7 | | public class BitacoraAuditoria |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 10 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("usuario_id")] |
| | 23 | 15 | | public long UsuarioId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("accion_id")] |
| | 23 | 19 | | public long AccionId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [Column("contexto_id")] |
| | 23 | 23 | | public long ContextoId { get; set; } |
| | | 24 | | |
| | | 25 | | [MaxLength(100)] |
| | | 26 | | [Column("host")] |
| | 24 | 27 | | public string? Host { get; set; } |
| | | 28 | | |
| | | 29 | | [Column("fecha")] |
| | 55 | 30 | | public DateTime Fecha { get; set; } = DateTime.Now; |
| | | 31 | | |
| | | 32 | | [MaxLength(60)] |
| | | 33 | | [Column("entidad")] |
| | 13 | 34 | | public string? Entidad { get; set; } |
| | | 35 | | |
| | | 36 | | [Column("entidad_id")] |
| | 13 | 37 | | public long? EntidadId { get; set; } |
| | | 38 | | |
| | | 39 | | [Column("detalle", TypeName = "jsonb")] |
| | 15 | 40 | | public string? Detalle { get; set; } |
| | | 41 | | |
| | | 42 | | [Required] |
| | | 43 | | [MaxLength(20)] |
| | | 44 | | [Column("aplicacion")] |
| | 33 | 45 | | public string Aplicacion { get; set; } = "liquidacion"; |
| | | 46 | | |
| | | 47 | | // Navegación |
| | | 48 | | [ForeignKey("UsuarioId")] |
| | 2 | 49 | | public virtual Usuario Usuario { get; set; } = null!; |
| | | 50 | | |
| | | 51 | | [ForeignKey("AccionId")] |
| | 2 | 52 | | public virtual Accion Accion { get; set; } = null!; |
| | | 53 | | |
| | | 54 | | [ForeignKey("ContextoId")] |
| | 3 | 55 | | public virtual Contexto Contexto { get; set; } = null!; |
| | | 56 | | } |
| | | 57 | | |