| | | 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")] |
| | 3 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("usuario_id")] |
| | 3 | 15 | | public long UsuarioId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("accion_id")] |
| | 3 | 19 | | public long AccionId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [Column("contexto_id")] |
| | 3 | 23 | | public long ContextoId { get; set; } |
| | | 24 | | |
| | | 25 | | [MaxLength(100)] |
| | | 26 | | [Column("host")] |
| | 4 | 27 | | public string? Host { get; set; } |
| | | 28 | | |
| | | 29 | | [Column("fecha")] |
| | 6 | 30 | | public DateTime Fecha { get; set; } = DateTime.UtcNow; |
| | | 31 | | |
| | | 32 | | [MaxLength(60)] |
| | | 33 | | [Column("entidad")] |
| | 0 | 34 | | public string? Entidad { get; set; } |
| | | 35 | | |
| | | 36 | | [Column("entidad_id")] |
| | 0 | 37 | | public long? EntidadId { get; set; } |
| | | 38 | | |
| | | 39 | | [Column("detalle", TypeName = "jsonb")] |
| | 0 | 40 | | public string? Detalle { get; set; } |
| | | 41 | | |
| | | 42 | | // Navegación |
| | | 43 | | [ForeignKey("UsuarioId")] |
| | 1 | 44 | | public virtual Usuario Usuario { get; set; } = null!; |
| | | 45 | | |
| | | 46 | | [ForeignKey("AccionId")] |
| | 1 | 47 | | public virtual Accion Accion { get; set; } = null!; |
| | | 48 | | |
| | | 49 | | [ForeignKey("ContextoId")] |
| | 1 | 50 | | public virtual Contexto Contexto { get; set; } = null!; |
| | | 51 | | } |
| | | 52 | | |