LANCommander/LANCommander.Server.Data/Models/Archive.cs

44 lines
1.3 KiB
C#
Raw Permalink Normal View History

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; }
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; }
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
public Guid? RedistributableId { get; set; }
[JsonIgnore]
[ForeignKey(nameof(RedistributableId))]
[InverseProperty("Archives")]
2024-11-27 01:51:47 -06:00
public Redistributable? Redistributable { get; set; }
[Display(Name = "Last Version")]
2024-11-27 01:51:47 -06:00
public Archive? LastVersion { get; set; }
[Display(Name = "Uncompressed Size")]
public long UncompressedSize { get; set; }
[Display(Name = "Compressed Size")]
public long CompressedSize { get; set; }
2023-01-02 15:44:04 -06:00
}
}