| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("documentos")] |
| | | 7 | | public class Documento |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 20 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [MaxLength(50)] |
| | | 15 | | [Column("tipo")] |
| | 34 | 16 | | public string Tipo { get; set; } = string.Empty; |
| | | 17 | | |
| | | 18 | | [Required] |
| | | 19 | | [Column("entidad_id")] |
| | 13 | 20 | | public long EntidadId { get; set; } |
| | | 21 | | |
| | | 22 | | [Required] |
| | | 23 | | [MaxLength(500)] |
| | | 24 | | [Column("ruta_relativa")] |
| | 45 | 25 | | public string RutaRelativa { get; set; } = string.Empty; |
| | | 26 | | |
| | | 27 | | [Required] |
| | | 28 | | [MaxLength(255)] |
| | | 29 | | [Column("nombre_original")] |
| | 46 | 30 | | public string NombreOriginal { get; set; } = string.Empty; |
| | | 31 | | |
| | | 32 | | [Required] |
| | | 33 | | [MaxLength(100)] |
| | | 34 | | [Column("content_type")] |
| | 46 | 35 | | public string ContentType { get; set; } = string.Empty; |
| | | 36 | | |
| | | 37 | | [Required] |
| | | 38 | | [Column("tamanio_bytes")] |
| | 15 | 39 | | public long TamanioBytes { get; set; } |
| | | 40 | | |
| | | 41 | | [Column("fecha_carga")] |
| | 34 | 42 | | public DateTime FechaCarga { get; set; } = DateTime.Now; |
| | | 43 | | |
| | | 44 | | [Column("usuario_carga_id")] |
| | 4 | 45 | | public long? UsuarioCargaId { get; set; } |
| | | 46 | | |
| | | 47 | | [ForeignKey("UsuarioCargaId")] |
| | 0 | 48 | | public virtual Usuario? UsuarioCarga { get; set; } |
| | | 49 | | } |