2024-08-04 17:53:19 -05:00
|
|
|
|
using LANCommander.Launcher.Data.Enums;
|
2024-06-19 19:36:04 -05:00
|
|
|
|
using LANCommander.SDK.Enums;
|
2024-05-20 19:42:31 -05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
2024-08-04 17:53:19 -05:00
|
|
|
|
namespace LANCommander.Launcher.Data.Models
|
2024-05-20 19:42:31 -05:00
|
|
|
|
{
|
|
|
|
|
|
[Table("Media")]
|
|
|
|
|
|
public class Media : BaseModel
|
|
|
|
|
|
{
|
|
|
|
|
|
public Guid FileId { get; set; }
|
2024-06-20 00:22:03 -05:00
|
|
|
|
[MaxLength(64)]
|
|
|
|
|
|
public string? Name { get; set; }
|
2024-05-20 19:42:31 -05:00
|
|
|
|
public MediaType Type { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[MaxLength(2048)]
|
|
|
|
|
|
public string? SourceUrl { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[MaxLength(255)]
|
|
|
|
|
|
public string? MimeType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[MaxLength(8)]
|
|
|
|
|
|
public string Crc32 { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid? GameId { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[ForeignKey(nameof(GameId))]
|
|
|
|
|
|
[InverseProperty("Media")]
|
|
|
|
|
|
public virtual Game? Game { get; set; }
|
2025-02-16 16:46:31 -06:00
|
|
|
|
|
|
|
|
|
|
public Guid? UserId { get; set; }
|
|
|
|
|
|
public virtual User? User { get; set; }
|
2024-05-20 19:42:31 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|