using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; namespace eprintServer.Entities; [Table("File_model")] public class FileModel { [Column("id")] public long Id { get; set; } [Column("file_name")] public string? Name { get; set; } [Column("description")] public string? Description { get; set; } [Column("file_url")] public string Url { get; set; } [Column("file_type")] public string? Type { get; set; } [Column("range")] public int? Range { get; set; } [Column("share")] public bool Share { get; set; } [Column("file_size")] public long? Size { get; set; } [JsonIgnore] [Column("timestmp")] public DateTime Timestamp { get; set; } public FileModel() { Timestamp = DateTime.UtcNow; } public FileModel(string name, string url, string type, long size) { Name = name; Url = url; Type = type; Size = size; Timestamp = DateTime.UtcNow; } }