LANCommander/LANCommander.Server.Data/Models/GameSave.cs

32 lines
922 B
C#
Raw Permalink Normal View History

using System.ComponentModel.DataAnnotations.Schema;
2023-01-17 17:57:12 -06:00
using System.Text.Json.Serialization;
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
{
public RuntimePlatform Platforms { get; set; }
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-23 22:33:28 -05:00
public long Size { get; set; }
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
}
}