2023-01-02 15:44:04 -06:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2023-01-14 15:51:41 -06:00
|
|
|
|
using System.Text.Json.Serialization;
|
2023-01-02 15:44:04 -06:00
|
|
|
|
|
2024-08-04 18:44:33 -05:00
|
|
|
|
namespace LANCommander.Server.Data.Models
|
2023-01-02 15:44:04 -06:00
|
|
|
|
{
|
|
|
|
|
|
public class Archive : BaseModel
|
|
|
|
|
|
{
|
|
|
|
|
|
public string? Changelog { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string ObjectKey { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
|
public string Version { get; set; }
|
|
|
|
|
|
|
2024-10-11 01:09:12 -05:00
|
|
|
|
public Guid StorageLocationId { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[ForeignKey(nameof(StorageLocationId))]
|
|
|
|
|
|
[InverseProperty(nameof(StorageLocation.Archives))]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public StorageLocation StorageLocation { get; set; }
|
2024-10-11 01:09:12 -05:00
|
|
|
|
|
2023-10-18 01:14:31 -05:00
|
|
|
|
public Guid? GameId { get; set; }
|
2023-01-14 15:51:41 -06:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[ForeignKey(nameof(GameId))]
|
|
|
|
|
|
[InverseProperty("Archives")]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public Game? Game { get; set; }
|
2023-01-02 15:44:04 -06:00
|
|
|
|
|
2023-10-18 01:14:31 -05:00
|
|
|
|
public Guid? RedistributableId { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[ForeignKey(nameof(RedistributableId))]
|
|
|
|
|
|
[InverseProperty("Archives")]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public Redistributable? Redistributable { get; set; }
|
2023-10-18 01:14:31 -05:00
|
|
|
|
|
2023-08-25 19:25:49 -05:00
|
|
|
|
[Display(Name = "Last Version")]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public Archive? LastVersion { get; set; }
|
2023-01-06 02:06:19 -06:00
|
|
|
|
|
2023-08-25 19:25:49 -05:00
|
|
|
|
[Display(Name = "Uncompressed Size")]
|
2023-01-06 02:06:19 -06:00
|
|
|
|
public long UncompressedSize { get; set; }
|
2023-08-25 19:25:49 -05:00
|
|
|
|
|
|
|
|
|
|
[Display(Name = "Compressed Size")]
|
2023-01-06 02:06:19 -06:00
|
|
|
|
public long CompressedSize { get; set; }
|
2023-01-02 15:44:04 -06:00
|
|
|
|
}
|
|
|
|
|
|
}
|