Full code refactor and clean-up.

This commit is contained in:
2024-11-09 01:37:59 +00:00
parent 1ebc273ff7
commit 9a429ce439
108 changed files with 12878 additions and 12195 deletions

View File

@@ -27,27 +27,26 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace RomRepoMgr.Database.Models
namespace RomRepoMgr.Database.Models;
public class DbFile : BaseModel<ulong>
{
public class DbFile : BaseModel<ulong>
{
[Required]
public ulong Size { get; set; }
[StringLength(8, MinimumLength = 8)]
public string Crc32 { get; set; }
[StringLength(32, MinimumLength = 32)]
public string Md5 { get; set; }
[StringLength(40, MinimumLength = 40)]
public string Sha1 { get; set; }
[StringLength(64, MinimumLength = 64)]
public string Sha256 { get; set; }
[StringLength(96, MinimumLength = 96)]
public string Sha384 { get; set; }
[StringLength(128, MinimumLength = 128)]
public string Sha512 { get; set; }
[DefaultValue(false)]
public bool IsInRepo { get; set; }
public string OriginalFileName { get; set; }
public virtual ICollection<FileByMachine> Machines { get; set; }
}
[Required]
public ulong Size { get; set; }
[StringLength(8, MinimumLength = 8)]
public string Crc32 { get; set; }
[StringLength(32, MinimumLength = 32)]
public string Md5 { get; set; }
[StringLength(40, MinimumLength = 40)]
public string Sha1 { get; set; }
[StringLength(64, MinimumLength = 64)]
public string Sha256 { get; set; }
[StringLength(96, MinimumLength = 96)]
public string Sha384 { get; set; }
[StringLength(128, MinimumLength = 128)]
public string Sha512 { get; set; }
[DefaultValue(false)]
public bool IsInRepo { get; set; }
public string OriginalFileName { get; set; }
public virtual ICollection<FileByMachine> Machines { get; set; }
}