2024-10-07 18:04:26 -05:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2023-01-17 17:57:12 -06:00
|
|
|
|
using System.Text.Json.Serialization;
|
2026-07-08 02:15:54 -05:00
|
|
|
|
using LANCommander.SDK.Enums;
|
2023-01-17 17:57:12 -06:00
|
|
|
|
|
2024-08-04 18:44:33 -05:00
|
|
|
|
namespace LANCommander.Server.Data.Models
|
2023-01-17 17:57:12 -06:00
|
|
|
|
{
|
2023-01-17 19:36:58 -06:00
|
|
|
|
[Table("GameSaves")]
|
2023-01-17 17:57:12 -06:00
|
|
|
|
public class GameSave : BaseModel
|
|
|
|
|
|
{
|
2026-07-08 02:15:54 -05:00
|
|
|
|
public RuntimePlatform Platforms { get; set; }
|
|
|
|
|
|
|
2024-10-11 01:09:12 -05:00
|
|
|
|
public Guid StorageLocationId { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[ForeignKey(nameof(StorageLocationId))]
|
|
|
|
|
|
[InverseProperty(nameof(StorageLocation.GameSaves))]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public StorageLocation StorageLocation { get; set; }
|
2024-10-11 01:09:12 -05:00
|
|
|
|
|
2024-10-23 22:33:28 -05:00
|
|
|
|
public long Size { get; set; }
|
|
|
|
|
|
|
2023-11-28 17:56:16 -06:00
|
|
|
|
public Guid? GameId { get; set; }
|
2023-01-17 17:57:12 -06:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[ForeignKey(nameof(GameId))]
|
|
|
|
|
|
[InverseProperty("GameSaves")]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public Game? Game { get; set; }
|
2023-01-17 17:57:12 -06:00
|
|
|
|
|
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
|
|
|
|
[InverseProperty("GameSaves")]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public User? User { get; set; }
|
2023-01-17 17:57:12 -06:00
|
|
|
|
}
|
|
|
|
|
|
}
|