mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Major refactor and cleanup.
This commit is contained in:
@@ -26,38 +26,37 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class ApplicationRole : IdentityRole
|
||||
{
|
||||
public class ApplicationRole : IdentityRole
|
||||
public const string RoleUberAdmin = "UberAdmin";
|
||||
public const string RoleWriter = "Writer";
|
||||
public const string RoleProofreader = "Proofreader";
|
||||
public const string RoleTranslator = "Translator";
|
||||
public const string RoleSuperTranslator = "SuperTranslator";
|
||||
public const string RoleCollaborator = "Collaborator";
|
||||
public const string RoleCurator = "Curator";
|
||||
public const string RolePhysicalCurator = "PhysicalCurator";
|
||||
public const string RoleTechnician = "Technician";
|
||||
public const string RoleSuperTechnician = "SuperTechnician";
|
||||
public const string RoleAdmin = "Administrator";
|
||||
public const string RoleNone = "NormalUser";
|
||||
|
||||
public ApplicationRole() => Created = DateTime.UtcNow;
|
||||
|
||||
public ApplicationRole(string name) : base(name)
|
||||
{
|
||||
public const string ROLE_UBERADMIN = "UberAdmin";
|
||||
public const string ROLE_WRITER = "Writer";
|
||||
public const string ROLE_PROOFREADER = "Proofreader";
|
||||
public const string ROLE_TRANSLATOR = "Translator";
|
||||
public const string ROLE_SUPERTRANSLATOR = "SuperTranslator";
|
||||
public const string ROLE_COLLABORATOR = "Collaborator";
|
||||
public const string ROLE_CURATOR = "Curator";
|
||||
public const string ROLE_PHYSICALCURATOR = "PhysicalCurator";
|
||||
public const string ROLE_TECHNICIAN = "Technician";
|
||||
public const string ROLE_SUPERTECHNICIAN = "SuperTechnician";
|
||||
public const string ROLE_ADMIN = "Administrator";
|
||||
public const string ROLE_NONE = "NormalUser";
|
||||
|
||||
public ApplicationRole() => Created = DateTime.UtcNow;
|
||||
|
||||
public ApplicationRole(string name) : base(name)
|
||||
{
|
||||
Description = name;
|
||||
Created = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public ApplicationRole(string name, string description) : base(name)
|
||||
{
|
||||
Description = description;
|
||||
Created = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public string Description { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
Description = name;
|
||||
Created = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public ApplicationRole(string name, string description) : base(name)
|
||||
{
|
||||
Description = description;
|
||||
Created = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public string Description { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
}
|
||||
@@ -26,16 +26,15 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
||||
public virtual ICollection<OwnedMachine> OwnedMachines { get; set; }
|
||||
public virtual ICollection<Dump> Dumps { get; set; }
|
||||
public virtual ICollection<BookScan> BookScans { get; set; }
|
||||
public virtual ICollection<DocumentScan> DocumentScans { get; set; }
|
||||
public virtual ICollection<MagazineScan> MagazineScans { get; set; }
|
||||
}
|
||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
||||
public virtual ICollection<OwnedMachine> OwnedMachines { get; set; }
|
||||
public virtual ICollection<Dump> Dumps { get; set; }
|
||||
public virtual ICollection<BookScan> BookScans { get; set; }
|
||||
public virtual ICollection<DocumentScan> DocumentScans { get; set; }
|
||||
public virtual ICollection<MagazineScan> MagazineScans { get; set; }
|
||||
}
|
||||
@@ -2,24 +2,23 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Audit : BaseModel<long>
|
||||
{
|
||||
public AuditType Type { get; set; }
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
public string Table { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public Dictionary<string, object> Keys { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public Dictionary<string, object> OldValues { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public Dictionary<string, object> NewValues { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public List<string> AffectedColumns { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[Required]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
}
|
||||
public class Audit : BaseModel<long>
|
||||
{
|
||||
public AuditType Type { get; set; }
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
public string Table { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public Dictionary<string, object> Keys { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public Dictionary<string, object> OldValues { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public Dictionary<string, object> NewValues { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public List<string> AffectedColumns { get; set; }
|
||||
|
||||
[Required]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
}
|
||||
@@ -28,28 +28,30 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public abstract class BaseFile : BaseModel<ulong>
|
||||
{
|
||||
public abstract class BaseFile : BaseModel<ulong>
|
||||
{
|
||||
[StringLength(8192), Required]
|
||||
public string Path { get; set; }
|
||||
[StringLength(255), Required]
|
||||
public string Name { get; set; }
|
||||
[Required, DefaultValue('/')]
|
||||
public char PathSeparator { get; set; }
|
||||
public bool IsDirectory { get; set; }
|
||||
public DateTime? CreationDate { get; set; }
|
||||
public DateTime? AccessDate { get; set; }
|
||||
public DateTime? StatusChangeDate { get; set; }
|
||||
public DateTime? BackupDate { get; set; }
|
||||
public DateTime? LastWriteDate { get; set; }
|
||||
public FileAttributes Attributes { get; set; }
|
||||
public ushort? PosixMode { get; set; }
|
||||
public uint? DeviceNumber { get; set; }
|
||||
public ulong? GroupId { get; set; }
|
||||
public ulong? UserId { get; set; }
|
||||
public ulong? Inode { get; set; }
|
||||
public ulong? Links { get; set; }
|
||||
}
|
||||
[StringLength(8192)]
|
||||
[Required]
|
||||
public string Path { get; set; }
|
||||
[StringLength(255)]
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
[DefaultValue('/')]
|
||||
public char PathSeparator { get; set; }
|
||||
public bool IsDirectory { get; set; }
|
||||
public DateTime? CreationDate { get; set; }
|
||||
public DateTime? AccessDate { get; set; }
|
||||
public DateTime? StatusChangeDate { get; set; }
|
||||
public DateTime? BackupDate { get; set; }
|
||||
public DateTime? LastWriteDate { get; set; }
|
||||
public FileAttributes Attributes { get; set; }
|
||||
public ushort? PosixMode { get; set; }
|
||||
public uint? DeviceNumber { get; set; }
|
||||
public ulong? GroupId { get; set; }
|
||||
public ulong? UserId { get; set; }
|
||||
public ulong? Inode { get; set; }
|
||||
public ulong? Links { get; set; }
|
||||
}
|
||||
@@ -26,15 +26,14 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public abstract class BaseModel<TKey>
|
||||
{
|
||||
public TKey Id { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
}
|
||||
public abstract class BaseModel<TKey>
|
||||
{
|
||||
public TKey Id { get; set; }
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
}
|
||||
@@ -27,76 +27,75 @@ using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public abstract class BasePhoto : BaseModel<Guid>
|
||||
{
|
||||
public abstract class BasePhoto : BaseModel<Guid>
|
||||
{
|
||||
public double? Aperture { get; set; }
|
||||
public string Author { get; set; }
|
||||
[DisplayName("Camera manufacturer")]
|
||||
public string CameraManufacturer { get; set; }
|
||||
[DisplayName("Camera model")]
|
||||
public string CameraModel { get; set; }
|
||||
[DisplayName("Color space")]
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
[DisplayName("User comments")]
|
||||
public string Comments { get; set; }
|
||||
public Contrast? Contrast { get; set; }
|
||||
[DisplayName("Date and time of digitizing")]
|
||||
public DateTime? CreationDate { get; set; }
|
||||
[DisplayName("Digital zoom ratio")]
|
||||
public double? DigitalZoomRatio { get; set; }
|
||||
[DisplayName("Exif version")]
|
||||
public string ExifVersion { get; set; }
|
||||
[DisplayName("Exposure time")]
|
||||
public double? ExposureTime { get; set; }
|
||||
[DisplayName("Exposure mode")]
|
||||
public ExposureMode? ExposureMethod { get; set; }
|
||||
[DisplayName("Exposure Program")]
|
||||
public ExposureProgram? ExposureProgram { get; set; }
|
||||
public Flash? Flash { get; set; }
|
||||
[DisplayName("F-number")]
|
||||
public double? Focal { get; set; }
|
||||
[DisplayName("Lens focal length")]
|
||||
public double? FocalLength { get; set; }
|
||||
[DisplayName("Focal length in 35 mm film")]
|
||||
public double? FocalLengthEquivalent { get; set; }
|
||||
[DisplayName("Horizontal resolution")]
|
||||
public double? HorizontalResolution { get; set; }
|
||||
[DisplayName("ISO speed rating")]
|
||||
public ushort? IsoRating { get; set; }
|
||||
[DisplayName("Lens used")]
|
||||
public string Lens { get; set; }
|
||||
[DisplayName("Light source")]
|
||||
public LightSource? LightSource { get; set; }
|
||||
[DisplayName("Metering mode")]
|
||||
public MeteringMode? MeteringMode { get; set; }
|
||||
[DisplayName("Resolution unit")]
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
public Orientation? Orientation { get; set; }
|
||||
public Saturation? Saturation { get; set; }
|
||||
[DisplayName("Scene capture type")]
|
||||
public SceneCaptureType? SceneCaptureType { get; set; }
|
||||
[DisplayName("Sensing method")]
|
||||
public SensingMethod? SensingMethod { get; set; }
|
||||
public Sharpness? Sharpness { get; set; }
|
||||
[DisplayName("Software used")]
|
||||
public string SoftwareUsed { get; set; }
|
||||
[DisplayName("Subject distance range")]
|
||||
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
||||
[Timestamp]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Vertical resolution")]
|
||||
public double? VerticalResolution { get; set; }
|
||||
[DisplayName("White balance")]
|
||||
public WhiteBalance? WhiteBalance { get; set; }
|
||||
public string OriginalExtension { get; set; }
|
||||
public double? Aperture { get; set; }
|
||||
public string Author { get; set; }
|
||||
[DisplayName("Camera manufacturer")]
|
||||
public string CameraManufacturer { get; set; }
|
||||
[DisplayName("Camera model")]
|
||||
public string CameraModel { get; set; }
|
||||
[DisplayName("Color space")]
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
[DisplayName("User comments")]
|
||||
public string Comments { get; set; }
|
||||
public Contrast? Contrast { get; set; }
|
||||
[DisplayName("Date and time of digitizing")]
|
||||
public DateTime? CreationDate { get; set; }
|
||||
[DisplayName("Digital zoom ratio")]
|
||||
public double? DigitalZoomRatio { get; set; }
|
||||
[DisplayName("Exif version")]
|
||||
public string ExifVersion { get; set; }
|
||||
[DisplayName("Exposure time")]
|
||||
public double? ExposureTime { get; set; }
|
||||
[DisplayName("Exposure mode")]
|
||||
public ExposureMode? ExposureMethod { get; set; }
|
||||
[DisplayName("Exposure Program")]
|
||||
public ExposureProgram? ExposureProgram { get; set; }
|
||||
public Flash? Flash { get; set; }
|
||||
[DisplayName("F-number")]
|
||||
public double? Focal { get; set; }
|
||||
[DisplayName("Lens focal length")]
|
||||
public double? FocalLength { get; set; }
|
||||
[DisplayName("Focal length in 35 mm film")]
|
||||
public double? FocalLengthEquivalent { get; set; }
|
||||
[DisplayName("Horizontal resolution")]
|
||||
public double? HorizontalResolution { get; set; }
|
||||
[DisplayName("ISO speed rating")]
|
||||
public ushort? IsoRating { get; set; }
|
||||
[DisplayName("Lens used")]
|
||||
public string Lens { get; set; }
|
||||
[DisplayName("Light source")]
|
||||
public LightSource? LightSource { get; set; }
|
||||
[DisplayName("Metering mode")]
|
||||
public MeteringMode? MeteringMode { get; set; }
|
||||
[DisplayName("Resolution unit")]
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
public Orientation? Orientation { get; set; }
|
||||
public Saturation? Saturation { get; set; }
|
||||
[DisplayName("Scene capture type")]
|
||||
public SceneCaptureType? SceneCaptureType { get; set; }
|
||||
[DisplayName("Sensing method")]
|
||||
public SensingMethod? SensingMethod { get; set; }
|
||||
public Sharpness? Sharpness { get; set; }
|
||||
[DisplayName("Software used")]
|
||||
public string SoftwareUsed { get; set; }
|
||||
[DisplayName("Subject distance range")]
|
||||
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
||||
[Timestamp]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Vertical resolution")]
|
||||
public double? VerticalResolution { get; set; }
|
||||
[DisplayName("White balance")]
|
||||
public WhiteBalance? WhiteBalance { get; set; }
|
||||
public string OriginalExtension { get; set; }
|
||||
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
[Required]
|
||||
public virtual License License { get; set; }
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
[Required]
|
||||
public virtual License License { get; set; }
|
||||
|
||||
public int LicenseId { get; set; }
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
public int LicenseId { get; set; }
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
@@ -27,37 +27,36 @@ using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public abstract class BaseScan : BaseModel<Guid>
|
||||
{
|
||||
public abstract class BaseScan : BaseModel<Guid>
|
||||
{
|
||||
public string Author { get; set; }
|
||||
[DisplayName("Color space")]
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
[DisplayName("User comments")]
|
||||
public string Comments { get; set; }
|
||||
[DisplayName("Date and time of digitizing")]
|
||||
public DateTime? CreationDate { get; set; }
|
||||
[DisplayName("Exif version")]
|
||||
public string ExifVersion { get; set; }
|
||||
[DisplayName("Horizontal resolution")]
|
||||
public double? HorizontalResolution { get; set; }
|
||||
[DisplayName("Resolution unit")]
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
[DisplayName("Scanner manufacturer")]
|
||||
public string ScannerManufacturer { get; set; }
|
||||
[DisplayName("Scanner model")]
|
||||
public string ScannerModel { get; set; }
|
||||
[DisplayName("Software used")]
|
||||
public string SoftwareUsed { get; set; }
|
||||
[Timestamp]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Vertical resolution")]
|
||||
public double? VerticalResolution { get; set; }
|
||||
public string OriginalExtension { get; set; }
|
||||
public string Author { get; set; }
|
||||
[DisplayName("Color space")]
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
[DisplayName("User comments")]
|
||||
public string Comments { get; set; }
|
||||
[DisplayName("Date and time of digitizing")]
|
||||
public DateTime? CreationDate { get; set; }
|
||||
[DisplayName("Exif version")]
|
||||
public string ExifVersion { get; set; }
|
||||
[DisplayName("Horizontal resolution")]
|
||||
public double? HorizontalResolution { get; set; }
|
||||
[DisplayName("Resolution unit")]
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
[DisplayName("Scanner manufacturer")]
|
||||
public string ScannerManufacturer { get; set; }
|
||||
[DisplayName("Scanner model")]
|
||||
public string ScannerModel { get; set; }
|
||||
[DisplayName("Software used")]
|
||||
public string SoftwareUsed { get; set; }
|
||||
[Timestamp]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Vertical resolution")]
|
||||
public double? VerticalResolution { get; set; }
|
||||
public string OriginalExtension { get; set; }
|
||||
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
@@ -26,26 +26,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Book : DocumentBase
|
||||
{
|
||||
[StringLength(13, MinimumLength = 10)]
|
||||
public string Isbn { get; set; }
|
||||
public short? Pages { get; set; }
|
||||
public int? Edition { get; set; }
|
||||
public long? PreviousId { get; set; }
|
||||
public long? SourceId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Book Previous { get; set; }
|
||||
public virtual Book Source { get; set; }
|
||||
public virtual Book Next { get; set; }
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
public virtual ICollection<Book> Derivates { get; set; }
|
||||
public virtual ICollection<CompaniesByBook> Companies { get; set; }
|
||||
public virtual ICollection<PeopleByBook> People { get; set; }
|
||||
public virtual ICollection<BooksByMachine> Machines { get; set; }
|
||||
public virtual ICollection<BooksByMachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<BookScan> Scans { get; set; }
|
||||
}
|
||||
public class Book : DocumentBase
|
||||
{
|
||||
[StringLength(13, MinimumLength = 10)]
|
||||
public string Isbn { get; set; }
|
||||
public short? Pages { get; set; }
|
||||
public int? Edition { get; set; }
|
||||
public long? PreviousId { get; set; }
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
public virtual Book Previous { get; set; }
|
||||
public virtual Book Source { get; set; }
|
||||
public virtual Book Next { get; set; }
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
public virtual ICollection<Book> Derivates { get; set; }
|
||||
public virtual ICollection<CompaniesByBook> Companies { get; set; }
|
||||
public virtual ICollection<PeopleByBook> People { get; set; }
|
||||
public virtual ICollection<BooksByMachine> Machines { get; set; }
|
||||
public virtual ICollection<BooksByMachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<BookScan> Scans { get; set; }
|
||||
}
|
||||
@@ -25,12 +25,11 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class BookScan : DocumentScanBase
|
||||
{
|
||||
public class BookScan : DocumentScanBase
|
||||
{
|
||||
[Required]
|
||||
public virtual Book Book { get; set; }
|
||||
public long BookId { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Book Book { get; set; }
|
||||
public long BookId { get; set; }
|
||||
}
|
||||
@@ -23,14 +23,13 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class BooksByMachine : BaseModel<long>
|
||||
{
|
||||
public long BookId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
public class BooksByMachine : BaseModel<long>
|
||||
{
|
||||
public long BookId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
@@ -23,14 +23,13 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class BooksByMachineFamily : BaseModel<long>
|
||||
{
|
||||
public long BookId { get; set; }
|
||||
public int MachineFamilyId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
}
|
||||
public class BooksByMachineFamily : BaseModel<long>
|
||||
{
|
||||
public long BookId { get; set; }
|
||||
public int MachineFamilyId { get; set; }
|
||||
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
}
|
||||
@@ -26,41 +26,54 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class BrowserTest : BaseModel<int>
|
||||
{
|
||||
public class BrowserTest : BaseModel<int>
|
||||
{
|
||||
[DisplayName("User agent"), Required, StringLength(128)]
|
||||
public string UserAgent { get; set; }
|
||||
[Required, StringLength(64)]
|
||||
public string Browser { get; set; }
|
||||
[Required, StringLength(16)]
|
||||
public string Version { get; set; }
|
||||
[DisplayName("Operating system"), Required, StringLength(32)]
|
||||
public string Os { get; set; }
|
||||
[Required, StringLength(8)]
|
||||
public string Platform { get; set; }
|
||||
[DisplayName("GIF87"), DefaultValue(false)]
|
||||
public bool Gif87 { get; set; }
|
||||
[DisplayName("GIF89"), DefaultValue(false)]
|
||||
public bool Gif89 { get; set; }
|
||||
[DisplayName("JPEG"), DefaultValue(false)]
|
||||
public bool Jpeg { get; set; }
|
||||
[DisplayName("PNG"), DefaultValue(false)]
|
||||
public bool Png { get; set; }
|
||||
[DisplayName("Transparent PNG"), DefaultValue(false)]
|
||||
public bool Pngt { get; set; }
|
||||
[DisplayName("Animated GIF"), DefaultValue(false)]
|
||||
public bool Agif { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Table { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Colors { get; set; }
|
||||
[DisplayName("JavaScript"), DefaultValue(false)]
|
||||
public bool Js { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Frames { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Flash { get; set; }
|
||||
}
|
||||
[DisplayName("User agent")]
|
||||
[Required]
|
||||
[StringLength(128)]
|
||||
public string UserAgent { get; set; }
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string Browser { get; set; }
|
||||
[Required]
|
||||
[StringLength(16)]
|
||||
public string Version { get; set; }
|
||||
[DisplayName("Operating system")]
|
||||
[Required]
|
||||
[StringLength(32)]
|
||||
public string Os { get; set; }
|
||||
[Required]
|
||||
[StringLength(8)]
|
||||
public string Platform { get; set; }
|
||||
[DisplayName("GIF87")]
|
||||
[DefaultValue(false)]
|
||||
public bool Gif87 { get; set; }
|
||||
[DisplayName("GIF89")]
|
||||
[DefaultValue(false)]
|
||||
public bool Gif89 { get; set; }
|
||||
[DisplayName("JPEG")]
|
||||
[DefaultValue(false)]
|
||||
public bool Jpeg { get; set; }
|
||||
[DisplayName("PNG")]
|
||||
[DefaultValue(false)]
|
||||
public bool Png { get; set; }
|
||||
[DisplayName("Transparent PNG")]
|
||||
[DefaultValue(false)]
|
||||
public bool Pngt { get; set; }
|
||||
[DisplayName("Animated GIF")]
|
||||
[DefaultValue(false)]
|
||||
public bool Agif { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Table { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Colors { get; set; }
|
||||
[DisplayName("JavaScript")]
|
||||
[DefaultValue(false)]
|
||||
public bool Js { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Frames { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Flash { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompaniesByBook : BaseModel<long>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public long BookId { get; set; }
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual DocumentCompany Company { get; set; }
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
public class CompaniesByBook : BaseModel<long>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public long BookId { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
public virtual DocumentCompany Company { get; set; }
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompaniesByDocument : BaseModel<long>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public long DocumentId { get; set; }
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual DocumentCompany Company { get; set; }
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
public class CompaniesByDocument : BaseModel<long>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public long DocumentId { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
public virtual DocumentCompany Company { get; set; }
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompaniesByMagazine : BaseModel<long>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public long MagazineId { get; set; }
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual DocumentCompany Company { get; set; }
|
||||
public virtual Magazine Magazine { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
public class CompaniesByMagazine : BaseModel<long>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public long MagazineId { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
public virtual DocumentCompany Company { get; set; }
|
||||
public virtual Magazine Magazine { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
@@ -25,19 +25,18 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompaniesBySoftwareFamily : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
[Required]
|
||||
public virtual Company Company { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareFamily SoftwareFamily { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public string RoleId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public ulong SoftwareFamilyId { get; set; }
|
||||
}
|
||||
public class CompaniesBySoftwareFamily : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
[Required]
|
||||
public virtual Company Company { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareFamily SoftwareFamily { get; set; }
|
||||
|
||||
public string RoleId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public ulong SoftwareFamilyId { get; set; }
|
||||
}
|
||||
@@ -25,19 +25,18 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompaniesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Company Company { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public string RoleId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public ulong SoftwareVariantId { get; set; }
|
||||
}
|
||||
public class CompaniesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Company Company { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
|
||||
public string RoleId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public ulong SoftwareVariantId { get; set; }
|
||||
}
|
||||
@@ -25,19 +25,18 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompaniesBySoftwareVersion : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Company Company { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVersion SoftwareVersion { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public string RoleId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public ulong SoftwareVersionId { get; set; }
|
||||
}
|
||||
public class CompaniesBySoftwareVersion : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Company Company { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVersion SoftwareVersion { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
|
||||
public string RoleId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public ulong SoftwareVersionId { get; set; }
|
||||
}
|
||||
@@ -29,72 +29,75 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Company : BaseModel<int>
|
||||
{
|
||||
public class Company : BaseModel<int>
|
||||
public Company()
|
||||
{
|
||||
public Company()
|
||||
{
|
||||
Logos = new HashSet<CompanyLogo>();
|
||||
Gpus = new HashSet<Gpu>();
|
||||
InverseSoldToNavigation = new HashSet<Company>();
|
||||
MachineFamilies = new HashSet<MachineFamily>();
|
||||
Machines = new HashSet<Machine>();
|
||||
Processors = new HashSet<Processor>();
|
||||
SoundSynths = new HashSet<SoundSynth>();
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true), DataType(DataType.Date)]
|
||||
public DateTime? Founded { get; set; }
|
||||
[Url, StringLength(255)]
|
||||
public string Website { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Twitter { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Facebook { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Sold { get; set; }
|
||||
public int? SoldToId { get; set; }
|
||||
[StringLength(80)]
|
||||
public string Address { get; set; }
|
||||
[StringLength(80)]
|
||||
public string City { get; set; }
|
||||
[StringLength(80)]
|
||||
public string Province { get; set; }
|
||||
[StringLength(25), DisplayName("Postal code")]
|
||||
public string PostalCode { get; set; }
|
||||
public short? CountryId { get; set; }
|
||||
[Required]
|
||||
public CompanyStatus Status { get; set; }
|
||||
public int? DocumentCompanyId { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool FoundedMonthIsUnknown { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool FoundedDayIsUnknown { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool SoldMonthIsUnknown { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool SoldDayIsUnknown { get; set; }
|
||||
public string LegalName { get; set; }
|
||||
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
[DisplayName("Sold to")]
|
||||
public virtual Company SoldTo { get; set; }
|
||||
public virtual ICollection<CompanyDescription> Descriptions { get; set; }
|
||||
public virtual ICollection<CompanyLogo> Logos { get; set; }
|
||||
public virtual ICollection<Gpu> Gpus { get; set; }
|
||||
public virtual ICollection<Company> InverseSoldToNavigation { get; set; }
|
||||
public virtual ICollection<MachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
public virtual ICollection<Processor> Processors { get; set; }
|
||||
public virtual ICollection<SoundSynth> SoundSynths { get; set; }
|
||||
public virtual ICollection<PeopleByCompany> People { get; set; }
|
||||
public virtual CompanyLogo LastLogo => Logos?.OrderByDescending(l => l.Year).FirstOrDefault();
|
||||
public virtual DocumentCompany DocumentCompany { get; set; }
|
||||
public virtual ICollection<CompaniesBySoftwareFamily> SoftwareFamilies { get; set; }
|
||||
public virtual ICollection<CompaniesBySoftwareVersion> SoftwareVersions { get; set; }
|
||||
public virtual ICollection<CompaniesBySoftwareVariant> SoftwareVariants { get; set; }
|
||||
Logos = new HashSet<CompanyLogo>();
|
||||
Gpus = new HashSet<Gpu>();
|
||||
InverseSoldToNavigation = new HashSet<Company>();
|
||||
MachineFamilies = new HashSet<MachineFamily>();
|
||||
Machines = new HashSet<Machine>();
|
||||
Processors = new HashSet<Processor>();
|
||||
SoundSynths = new HashSet<SoundSynth>();
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Founded { get; set; }
|
||||
[Url]
|
||||
[StringLength(255)]
|
||||
public string Website { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Twitter { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Facebook { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Sold { get; set; }
|
||||
public int? SoldToId { get; set; }
|
||||
[StringLength(80)]
|
||||
public string Address { get; set; }
|
||||
[StringLength(80)]
|
||||
public string City { get; set; }
|
||||
[StringLength(80)]
|
||||
public string Province { get; set; }
|
||||
[StringLength(25)]
|
||||
[DisplayName("Postal code")]
|
||||
public string PostalCode { get; set; }
|
||||
public short? CountryId { get; set; }
|
||||
[Required]
|
||||
public CompanyStatus Status { get; set; }
|
||||
public int? DocumentCompanyId { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool FoundedMonthIsUnknown { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool FoundedDayIsUnknown { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool SoldMonthIsUnknown { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool SoldDayIsUnknown { get; set; }
|
||||
public string LegalName { get; set; }
|
||||
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
[DisplayName("Sold to")]
|
||||
public virtual Company SoldTo { get; set; }
|
||||
public virtual ICollection<CompanyDescription> Descriptions { get; set; }
|
||||
public virtual ICollection<CompanyLogo> Logos { get; set; }
|
||||
public virtual ICollection<Gpu> Gpus { get; set; }
|
||||
public virtual ICollection<Company> InverseSoldToNavigation { get; set; }
|
||||
public virtual ICollection<MachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
public virtual ICollection<Processor> Processors { get; set; }
|
||||
public virtual ICollection<SoundSynth> SoundSynths { get; set; }
|
||||
public virtual ICollection<PeopleByCompany> People { get; set; }
|
||||
public virtual CompanyLogo LastLogo => Logos?.OrderByDescending(l => l.Year).FirstOrDefault();
|
||||
public virtual DocumentCompany DocumentCompany { get; set; }
|
||||
public virtual ICollection<CompaniesBySoftwareFamily> SoftwareFamilies { get; set; }
|
||||
public virtual ICollection<CompaniesBySoftwareVersion> SoftwareVersions { get; set; }
|
||||
public virtual ICollection<CompaniesBySoftwareVariant> SoftwareVariants { get; set; }
|
||||
}
|
||||
@@ -26,16 +26,17 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompanyDescription : BaseModel<int>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
[MaxLength(262144, ErrorMessage = "Description is too long"), Required]
|
||||
public string Text { get; set; }
|
||||
[MaxLength(262144, ErrorMessage = "Description is too long"), DisplayName("HTML")]
|
||||
public string Html { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
}
|
||||
public class CompanyDescription : BaseModel<int>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
[MaxLength(262144, ErrorMessage = "Description is too long")]
|
||||
[Required]
|
||||
public string Text { get; set; }
|
||||
[MaxLength(262144, ErrorMessage = "Description is too long")]
|
||||
[DisplayName("HTML")]
|
||||
public string Html { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
}
|
||||
@@ -26,15 +26,14 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CompanyLogo : BaseModel<int>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
[Range(1000, 3000)]
|
||||
public int? Year { get; set; }
|
||||
public Guid Guid { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
}
|
||||
public class CompanyLogo : BaseModel<int>
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
[Range(1000, 3000)]
|
||||
public int? Year { get; set; }
|
||||
public Guid Guid { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
}
|
||||
@@ -25,14 +25,13 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class CurrencyInflation : BaseModel<int>
|
||||
{
|
||||
public class CurrencyInflation : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public virtual Iso4217 Currency { get; set; }
|
||||
public uint Year { get; set; }
|
||||
public float Inflation { get; set; }
|
||||
public string CurrencyCode { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Iso4217 Currency { get; set; }
|
||||
public uint Year { get; set; }
|
||||
public float Inflation { get; set; }
|
||||
public string CurrencyCode { get; set; }
|
||||
}
|
||||
@@ -26,21 +26,20 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class CurrencyPegging : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public virtual Iso4217 Source { get; set; }
|
||||
[Required]
|
||||
public virtual Iso4217 Destination { get; set; }
|
||||
public float Ratio { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime Start { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? End { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public string SourceCode { get; set; }
|
||||
public string DestinationCode { get; set; }
|
||||
}
|
||||
public class CurrencyPegging : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public virtual Iso4217 Source { get; set; }
|
||||
[Required]
|
||||
public virtual Iso4217 Destination { get; set; }
|
||||
public float Ratio { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime Start { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? End { get; set; }
|
||||
|
||||
public string SourceCode { get; set; }
|
||||
public string DestinationCode { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Document : DocumentBase
|
||||
{
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ICollection<PeopleByDocument> People { get; set; }
|
||||
public virtual ICollection<CompaniesByDocument> Companies { get; set; }
|
||||
public virtual ICollection<DocumentsByMachine> Machines { get; set; }
|
||||
public virtual ICollection<DocumentsByMachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<DocumentScan> Scans { get; set; }
|
||||
}
|
||||
public class Document : DocumentBase
|
||||
{
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
|
||||
public virtual ICollection<PeopleByDocument> People { get; set; }
|
||||
public virtual ICollection<CompaniesByDocument> Companies { get; set; }
|
||||
public virtual ICollection<DocumentsByMachine> Machines { get; set; }
|
||||
public virtual ICollection<DocumentsByMachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<DocumentScan> Scans { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public abstract class DocumentBase : BaseModel<long>
|
||||
{
|
||||
public abstract class DocumentBase : BaseModel<long>
|
||||
{
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
public string NativeTitle { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Published { get; set; }
|
||||
public short? CountryId { get; set; }
|
||||
[MaxLength(262144, ErrorMessage = "Synopsis is too long")]
|
||||
public string Synopsis { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
public string NativeTitle { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Published { get; set; }
|
||||
public short? CountryId { get; set; }
|
||||
[MaxLength(262144, ErrorMessage = "Synopsis is too long")]
|
||||
public string Synopsis { get; set; }
|
||||
}
|
||||
@@ -27,18 +27,17 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class DocumentCompany : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[DisplayName("Linked company")]
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<CompaniesByDocument> Documents { get; set; }
|
||||
public virtual ICollection<CompaniesByBook> Books { get; set; }
|
||||
public virtual ICollection<CompaniesByMagazine> Magazines { get; set; }
|
||||
}
|
||||
public class DocumentCompany : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
|
||||
[DisplayName("Linked company")]
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<CompaniesByDocument> Documents { get; set; }
|
||||
public virtual ICollection<CompaniesByBook> Books { get; set; }
|
||||
public virtual ICollection<CompaniesByMagazine> Magazines { get; set; }
|
||||
}
|
||||
@@ -28,26 +28,26 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class DocumentPerson : BaseModel<int>
|
||||
{
|
||||
public class DocumentPerson : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Surname { get; set; }
|
||||
public int? PersonId { get; set; }
|
||||
public string Alias { get; set; }
|
||||
[DisplayName("Name to be displayed")]
|
||||
public string DisplayName { get; set; }
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Surname { get; set; }
|
||||
public int? PersonId { get; set; }
|
||||
public string Alias { get; set; }
|
||||
[DisplayName("Name to be displayed")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[NotMapped, DisplayName("Name")]
|
||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||
[NotMapped]
|
||||
[DisplayName("Name")]
|
||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||
|
||||
[DisplayName("Linked person")]
|
||||
public virtual Person Person { get; set; }
|
||||
public virtual ICollection<PeopleByDocument> Documents { get; set; }
|
||||
public virtual ICollection<PeopleByBook> Books { get; set; }
|
||||
public virtual ICollection<PeopleByMagazine> Magazines { get; set; }
|
||||
}
|
||||
[DisplayName("Linked person")]
|
||||
public virtual Person Person { get; set; }
|
||||
public virtual ICollection<PeopleByDocument> Documents { get; set; }
|
||||
public virtual ICollection<PeopleByBook> Books { get; set; }
|
||||
public virtual ICollection<PeopleByMagazine> Magazines { get; set; }
|
||||
}
|
||||
@@ -27,14 +27,15 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class DocumentRole
|
||||
{
|
||||
public class DocumentRole
|
||||
{
|
||||
[Column(TypeName = "char(3)"), Key, Required]
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Key]
|
||||
[Required]
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
@@ -25,12 +25,11 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class DocumentScan : DocumentScanBase
|
||||
{
|
||||
public class DocumentScan : DocumentScanBase
|
||||
{
|
||||
[Required]
|
||||
public virtual Document Document { get; set; }
|
||||
public long DocumentId { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Document Document { get; set; }
|
||||
public long DocumentId { get; set; }
|
||||
}
|
||||
@@ -23,11 +23,10 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public abstract class DocumentScanBase : BaseScan
|
||||
{
|
||||
public abstract class DocumentScanBase : BaseScan
|
||||
{
|
||||
public DocumentScanType Type { get; set; }
|
||||
public uint? Page { get; set; }
|
||||
}
|
||||
public DocumentScanType Type { get; set; }
|
||||
public uint? Page { get; set; }
|
||||
}
|
||||
@@ -23,14 +23,13 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class DocumentsByMachine : BaseModel<long>
|
||||
{
|
||||
public long DocumentId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
public class DocumentsByMachine : BaseModel<long>
|
||||
{
|
||||
public long DocumentId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
@@ -23,14 +23,13 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class DocumentsByMachineFamily : BaseModel<long>
|
||||
{
|
||||
public long DocumentId { get; set; }
|
||||
public int MachineFamilyId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
}
|
||||
public class DocumentsByMachineFamily : BaseModel<long>
|
||||
{
|
||||
public long DocumentId { get; set; }
|
||||
public int MachineFamilyId { get; set; }
|
||||
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
}
|
||||
@@ -27,23 +27,22 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Dump : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public string Dumper { get; set; }
|
||||
public string UserId { get; set; }
|
||||
public string DumpingGroup { get; set; }
|
||||
public DateTime? DumpDate { get; set; }
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
public virtual ICollection<DumpHardware> DumpHardware { get; set; }
|
||||
public ulong MediaId { get; set; }
|
||||
public ulong MediaDumpId { get; set; }
|
||||
}
|
||||
public class Dump : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public string Dumper { get; set; }
|
||||
public string UserId { get; set; }
|
||||
public string DumpingGroup { get; set; }
|
||||
public DateTime? DumpDate { get; set; }
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
public virtual ICollection<DumpHardware> DumpHardware { get; set; }
|
||||
public ulong MediaId { get; set; }
|
||||
public ulong MediaDumpId { get; set; }
|
||||
}
|
||||
@@ -26,29 +26,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class DumpHardware : BaseModel<ulong>
|
||||
{
|
||||
public class DumpHardware : BaseModel<ulong>
|
||||
{
|
||||
[StringLength(48)]
|
||||
public string Manufacturer { get; set; }
|
||||
[StringLength(48), Required]
|
||||
public string Model { get; set; }
|
||||
[StringLength(48)]
|
||||
public string Revision { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Firmware { get; set; }
|
||||
[StringLength(64)]
|
||||
public string Serial { get; set; }
|
||||
[StringLength(64), Required]
|
||||
public string SoftwareName { get; set; }
|
||||
[StringLength(32)]
|
||||
public string SoftwareVersion { get; set; }
|
||||
[StringLength(64)]
|
||||
public string SoftwareOperatingSystem { get; set; }
|
||||
[Required, Column(TypeName = "json")]
|
||||
public Extent[] Extents { get; set; }
|
||||
[Required]
|
||||
public virtual Dump Dump { get; set; }
|
||||
}
|
||||
[StringLength(48)]
|
||||
public string Manufacturer { get; set; }
|
||||
[StringLength(48)]
|
||||
[Required]
|
||||
public string Model { get; set; }
|
||||
[StringLength(48)]
|
||||
public string Revision { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Firmware { get; set; }
|
||||
[StringLength(64)]
|
||||
public string Serial { get; set; }
|
||||
[StringLength(64)]
|
||||
[Required]
|
||||
public string SoftwareName { get; set; }
|
||||
[StringLength(32)]
|
||||
public string SoftwareVersion { get; set; }
|
||||
[StringLength(64)]
|
||||
public string SoftwareOperatingSystem { get; set; }
|
||||
[Required]
|
||||
[Column(TypeName = "json")]
|
||||
public Extent[] Extents { get; set; }
|
||||
[Required]
|
||||
public virtual Dump Dump { get; set; }
|
||||
}
|
||||
@@ -23,13 +23,12 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
// Not for table
|
||||
public class Extent
|
||||
{
|
||||
// Not for table
|
||||
public class Extent
|
||||
{
|
||||
public long Start { get; set; }
|
||||
public long End { get; set; }
|
||||
public bool Error { get; set; }
|
||||
}
|
||||
public long Start { get; set; }
|
||||
public long End { get; set; }
|
||||
public bool Error { get; set; }
|
||||
}
|
||||
@@ -27,29 +27,28 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class DbFile : BaseModel<ulong>
|
||||
{
|
||||
public class DbFile : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
public string Mime { get; set; }
|
||||
public string Magic { get; set; }
|
||||
public string AccoustId { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Infected { get; set; }
|
||||
public string Malware { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Hack { get; set; }
|
||||
public string HackGroup { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
public string Mime { get; set; }
|
||||
public string Magic { get; set; }
|
||||
public string AccoustId { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Infected { get; set; }
|
||||
public string Malware { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Hack { get; set; }
|
||||
public string HackGroup { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class FileDataStream : BaseModel<ulong>
|
||||
{
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Required]
|
||||
public virtual DbFile File { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public ulong FileId { get; set; }
|
||||
}
|
||||
public class FileDataStream : BaseModel<ulong>
|
||||
{
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Required]
|
||||
public virtual DbFile File { get; set; }
|
||||
|
||||
public ulong FileId { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class FileDataStreamsByMediaFile : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual FileDataStream FileDataStream { get; set; }
|
||||
[Required]
|
||||
public virtual MediaFile MediaFile { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public ulong FileDataStreamId { get; set; }
|
||||
public ulong MediaFileId { get; set; }
|
||||
}
|
||||
public class FileDataStreamsByMediaFile : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual FileDataStream FileDataStream { get; set; }
|
||||
[Required]
|
||||
public virtual MediaFile MediaFile { get; set; }
|
||||
|
||||
public ulong FileDataStreamId { get; set; }
|
||||
public ulong MediaFileId { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class FileDataStreamsByStandaloneFile : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual FileDataStream FileDataStream { get; set; }
|
||||
[Required]
|
||||
public virtual StandaloneFile StandaloneFile { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public ulong FileDataStreamId { get; set; }
|
||||
public ulong StandaloneFileId { get; set; }
|
||||
}
|
||||
public class FileDataStreamsByStandaloneFile : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual FileDataStream FileDataStream { get; set; }
|
||||
[Required]
|
||||
public virtual StandaloneFile StandaloneFile { get; set; }
|
||||
|
||||
public ulong FileDataStreamId { get; set; }
|
||||
public ulong StandaloneFileId { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class FilesByFilesystem : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Filesystem Filesystem { get; set; }
|
||||
[Required]
|
||||
public virtual MediaFile File { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public ulong FilesystemId { get; set; }
|
||||
public ulong FileId { get; set; }
|
||||
}
|
||||
public class FilesByFilesystem : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Filesystem Filesystem { get; set; }
|
||||
[Required]
|
||||
public virtual MediaFile File { get; set; }
|
||||
|
||||
public ulong FilesystemId { get; set; }
|
||||
public ulong FileId { get; set; }
|
||||
}
|
||||
@@ -27,32 +27,31 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Filesystem : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public string Type { get; set; }
|
||||
public DateTime? CreationDate { get; set; }
|
||||
public DateTime? ModificationDate { get; set; }
|
||||
public DateTime? BackupDate { get; set; }
|
||||
public int ClusterSize { get; set; }
|
||||
public ulong Clusters { get; set; }
|
||||
public ulong? FilesCount { get; set; }
|
||||
public bool Bootable { get; set; }
|
||||
public string Serial { get; set; }
|
||||
public string Label { get; set; }
|
||||
public ulong? FreeClusters { get; set; }
|
||||
public DateTime? ExpirationDate { get; set; }
|
||||
public DateTime? EffectiveDate { get; set; }
|
||||
public string SystemIdentifier { get; set; }
|
||||
public string VolumeSetIdentifier { get; set; }
|
||||
public string PublisherIdentifier { get; set; }
|
||||
public string DataPreparerIdentifier { get; set; }
|
||||
public string ApplicationIdentifier { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ICollection<FilesystemsByLogicalPartition> Partitions { get; set; }
|
||||
public virtual ICollection<FilesystemsByMediaDumpFile> MediaDumpFileImages { get; set; }
|
||||
public virtual ICollection<FilesByFilesystem> Files { get; set; }
|
||||
}
|
||||
public class Filesystem : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public string Type { get; set; }
|
||||
public DateTime? CreationDate { get; set; }
|
||||
public DateTime? ModificationDate { get; set; }
|
||||
public DateTime? BackupDate { get; set; }
|
||||
public int ClusterSize { get; set; }
|
||||
public ulong Clusters { get; set; }
|
||||
public ulong? FilesCount { get; set; }
|
||||
public bool Bootable { get; set; }
|
||||
public string Serial { get; set; }
|
||||
public string Label { get; set; }
|
||||
public ulong? FreeClusters { get; set; }
|
||||
public DateTime? ExpirationDate { get; set; }
|
||||
public DateTime? EffectiveDate { get; set; }
|
||||
public string SystemIdentifier { get; set; }
|
||||
public string VolumeSetIdentifier { get; set; }
|
||||
public string PublisherIdentifier { get; set; }
|
||||
public string DataPreparerIdentifier { get; set; }
|
||||
public string ApplicationIdentifier { get; set; }
|
||||
|
||||
public virtual ICollection<FilesystemsByLogicalPartition> Partitions { get; set; }
|
||||
public virtual ICollection<FilesystemsByMediaDumpFile> MediaDumpFileImages { get; set; }
|
||||
public virtual ICollection<FilesByFilesystem> Files { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class FilesystemsByLogicalPartition : BaseModel<ulong>
|
||||
{
|
||||
public class FilesystemsByLogicalPartition : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Filesystem Filesystem { get; set; }
|
||||
[Required]
|
||||
public virtual LogicalPartition Partition { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Filesystem Filesystem { get; set; }
|
||||
[Required]
|
||||
public virtual LogicalPartition Partition { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class FilesystemsByMediaDumpFile : BaseModel<ulong>
|
||||
{
|
||||
public class FilesystemsByMediaDumpFile : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Filesystem Filesystem { get; set; }
|
||||
[Required]
|
||||
public virtual MediaDumpFileImage MediaDumpFileImage { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Filesystem Filesystem { get; set; }
|
||||
[Required]
|
||||
public virtual MediaDumpFileImage MediaDumpFileImage { get; set; }
|
||||
}
|
||||
@@ -23,13 +23,12 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Forbidden : BaseModel<int>
|
||||
{
|
||||
public class Forbidden : BaseModel<int>
|
||||
{
|
||||
public string Browser { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public string Referer { get; set; }
|
||||
}
|
||||
public string Browser { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public string Referer { get; set; }
|
||||
}
|
||||
@@ -28,37 +28,39 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Gpu : BaseModel<int>
|
||||
{
|
||||
public class Gpu : BaseModel<int>
|
||||
public Gpu()
|
||||
{
|
||||
public Gpu()
|
||||
{
|
||||
GpusByMachine = new HashSet<GpusByMachine>();
|
||||
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
|
||||
}
|
||||
|
||||
[Required, StringLength(128)]
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
[DisplayName("Model code"), StringLength(45)]
|
||||
public string ModelCode { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Package { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Process { get; set; }
|
||||
[DisplayName("Process (nm)")]
|
||||
public float? ProcessNm { get; set; }
|
||||
[DisplayName("Die size (mm²)")]
|
||||
public float? DieSize { get; set; }
|
||||
[Range(1, long.MaxValue)]
|
||||
public long? Transistors { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
|
||||
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
||||
public virtual ICollection<GpusBySoftwareVariant> Software { get; set; }
|
||||
GpusByMachine = new HashSet<GpusByMachine>();
|
||||
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
|
||||
}
|
||||
|
||||
[Required]
|
||||
[StringLength(128)]
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
[DisplayName("Model code")]
|
||||
[StringLength(45)]
|
||||
public string ModelCode { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Package { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Process { get; set; }
|
||||
[DisplayName("Process (nm)")]
|
||||
public float? ProcessNm { get; set; }
|
||||
[DisplayName("Die size (mm²)")]
|
||||
public float? DieSize { get; set; }
|
||||
[Range(1, long.MaxValue)]
|
||||
public long? Transistors { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
|
||||
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
||||
public virtual ICollection<GpusBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
@@ -25,15 +25,14 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class GpusByMachine : BaseModel<long>
|
||||
{
|
||||
public int GpuId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[DisplayName("GPU")]
|
||||
public virtual Gpu Gpu { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
public class GpusByMachine : BaseModel<long>
|
||||
{
|
||||
public int GpuId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
|
||||
[DisplayName("GPU")]
|
||||
public virtual Gpu Gpu { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
@@ -25,15 +25,14 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class GpusByOwnedMachine : BaseModel<long>
|
||||
{
|
||||
public int GpuId { get; set; }
|
||||
public long OwnedMachineId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[DisplayName("GPU")]
|
||||
public virtual Gpu Gpu { get; set; }
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
}
|
||||
public class GpusByOwnedMachine : BaseModel<long>
|
||||
{
|
||||
public int GpuId { get; set; }
|
||||
public long OwnedMachineId { get; set; }
|
||||
|
||||
[DisplayName("GPU")]
|
||||
public virtual Gpu Gpu { get; set; }
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
}
|
||||
@@ -25,15 +25,14 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class GpusBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
public class GpusBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Gpu Gpu { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
public bool? Minimum { get; set; }
|
||||
public bool? Recommended { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Gpu Gpu { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
public bool? Minimum { get; set; }
|
||||
public bool? Recommended { get; set; }
|
||||
}
|
||||
@@ -27,16 +27,17 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class InstructionSet : BaseModel<int>
|
||||
{
|
||||
public class InstructionSet : BaseModel<int>
|
||||
{
|
||||
public InstructionSet() => Processors = new HashSet<Processor>();
|
||||
public InstructionSet() => Processors = new HashSet<Processor>();
|
||||
|
||||
[Required, StringLength(45), Remote("VerifyUnique", "InstructionSets", "Admin")]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
[StringLength(45)]
|
||||
[Remote("VerifyUnique", "InstructionSets", "Admin")]
|
||||
public string Name { get; set; }
|
||||
|
||||
public virtual ICollection<Processor> Processors { get; set; }
|
||||
public virtual ICollection<InstructionSetsBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
public virtual ICollection<Processor> Processors { get; set; }
|
||||
public virtual ICollection<InstructionSetsBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
@@ -28,20 +28,18 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class InstructionSetExtension : BaseModel<int>
|
||||
{
|
||||
public class InstructionSetExtension : BaseModel<int>
|
||||
{
|
||||
public InstructionSetExtension() =>
|
||||
InstructionSetExtensionsByProcessor = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||
public InstructionSetExtension() =>
|
||||
InstructionSetExtensionsByProcessor = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||
|
||||
[DisplayName("Name"), Required, StringLength(45), Remote("VerifyUnique", "InstructionSetExtensions", "Admin")]
|
||||
public string Extension { get; set; }
|
||||
[DisplayName("Name")]
|
||||
[Required]
|
||||
[StringLength(45)]
|
||||
[Remote("VerifyUnique", "InstructionSetExtensions", "Admin")]
|
||||
public string Extension { get; set; }
|
||||
|
||||
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class InstructionSetExtensionsByProcessor : BaseModel<int>
|
||||
{
|
||||
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ExtensionId))]
|
||||
public int ProcessorId { get; set; }
|
||||
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ProcessorId))]
|
||||
public int ExtensionId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual InstructionSetExtension Extension { get; set; }
|
||||
public virtual Processor Processor { get; set; }
|
||||
}
|
||||
public class InstructionSetExtensionsByProcessor : BaseModel<int>
|
||||
{
|
||||
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ExtensionId))]
|
||||
public int ProcessorId { get; set; }
|
||||
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ProcessorId))]
|
||||
public int ExtensionId { get; set; }
|
||||
|
||||
public virtual InstructionSetExtension Extension { get; set; }
|
||||
public virtual Processor Processor { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class InstructionSetsBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
public class InstructionSetsBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual InstructionSet InstructionSet { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual InstructionSet InstructionSet { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
@@ -28,26 +28,26 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Iso31661Numeric
|
||||
{
|
||||
public class Iso31661Numeric
|
||||
{
|
||||
public Iso31661Numeric() => Companies = new HashSet<Company>();
|
||||
public Iso31661Numeric() => Companies = new HashSet<Company>();
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
|
||||
[Required]
|
||||
public short Id { get; set; }
|
||||
[Required, StringLength(64)]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public short Id { get; set; }
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string Name { get; set; }
|
||||
|
||||
public virtual ICollection<Company> Companies { get; set; }
|
||||
public virtual ICollection<Person> People { get; set; }
|
||||
public virtual ICollection<Document> Documents { get; set; }
|
||||
public virtual ICollection<Book> Books { get; set; }
|
||||
public virtual ICollection<Magazine> Magazines { get; set; }
|
||||
}
|
||||
public virtual ICollection<Company> Companies { get; set; }
|
||||
public virtual ICollection<Person> People { get; set; }
|
||||
public virtual ICollection<Document> Documents { get; set; }
|
||||
public virtual ICollection<Book> Books { get; set; }
|
||||
public virtual ICollection<Magazine> Magazines { get; set; }
|
||||
}
|
||||
@@ -27,23 +27,26 @@ using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Iso4217
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[StringLength(3), Required, Key]
|
||||
public string Code { get; set; }
|
||||
[Column(TypeName = "smallint(3)"), Required]
|
||||
public short Numeric { get; set; }
|
||||
public byte? MinorUnits { get; set; }
|
||||
[StringLength(150), Required]
|
||||
public string Name { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Withdrawn { get; set; }
|
||||
}
|
||||
public class Iso4217
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
|
||||
[StringLength(3)]
|
||||
[Required]
|
||||
[Key]
|
||||
public string Code { get; set; }
|
||||
[Column(TypeName = "smallint(3)")]
|
||||
[Required]
|
||||
public short Numeric { get; set; }
|
||||
public byte? MinorUnits { get; set; }
|
||||
[StringLength(150)]
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Withdrawn { get; set; }
|
||||
}
|
||||
@@ -28,33 +28,37 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
/// <summary>ISO-639 codes</summary>
|
||||
public class Iso639
|
||||
{
|
||||
/// <summary>ISO-639 codes</summary>
|
||||
public class Iso639
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime CreatedOn { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
|
||||
[Column(TypeName = "char(3)"), Key, Required]
|
||||
public string Id { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
public string Part2B { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
public string Part2T { get; set; }
|
||||
[Column(TypeName = "char(2)")]
|
||||
public string Part1 { get; set; }
|
||||
[Column(TypeName = "char(1)"), Required]
|
||||
public string Scope { get; set; }
|
||||
[Column(TypeName = "char(1)"), Required]
|
||||
public string Type { get; set; }
|
||||
[Column(TypeName = "varchar(150)"), Required]
|
||||
public string ReferenceName { get; set; }
|
||||
[Column(TypeName = "varchar(150)")]
|
||||
public string Comment { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Key]
|
||||
[Required]
|
||||
public string Id { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
public string Part2B { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
public string Part2T { get; set; }
|
||||
[Column(TypeName = "char(2)")]
|
||||
public string Part1 { get; set; }
|
||||
[Column(TypeName = "char(1)")]
|
||||
[Required]
|
||||
public string Scope { get; set; }
|
||||
[Column(TypeName = "char(1)")]
|
||||
[Required]
|
||||
public string Type { get; set; }
|
||||
[Column(TypeName = "varchar(150)")]
|
||||
[Required]
|
||||
public string ReferenceName { get; set; }
|
||||
[Column(TypeName = "varchar(150)")]
|
||||
public string Comment { get; set; }
|
||||
|
||||
public virtual ICollection<LanguagesBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
public virtual ICollection<LanguagesBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class LanguagesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
public class LanguagesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Iso639 Language { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Iso639 Language { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
@@ -28,24 +28,31 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class License : BaseModel<int>
|
||||
{
|
||||
public class License : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DisplayName("SPDX identifier")]
|
||||
public string SPDX { get; set; }
|
||||
[DisplayName("FSF approved"), Required, DefaultValue(false)]
|
||||
public bool FsfApproved { get; set; }
|
||||
[DisplayName("OSI approved"), Required, DefaultValue(false)]
|
||||
public bool OsiApproved { get; set; }
|
||||
[DisplayName("License text link"), StringLength(512), Url]
|
||||
public string Link { get; set; }
|
||||
[DisplayName("License text"), Column(TypeName = "longtext"), StringLength(131072),
|
||||
DataType(DataType.MultilineText)]
|
||||
public string Text { get; set; }
|
||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DisplayName("SPDX identifier")]
|
||||
public string SPDX { get; set; }
|
||||
[DisplayName("FSF approved")]
|
||||
[Required]
|
||||
[DefaultValue(false)]
|
||||
public bool FsfApproved { get; set; }
|
||||
[DisplayName("OSI approved")]
|
||||
[Required]
|
||||
[DefaultValue(false)]
|
||||
public bool OsiApproved { get; set; }
|
||||
[DisplayName("License text link")]
|
||||
[StringLength(512)]
|
||||
[Url]
|
||||
public string Link { get; set; }
|
||||
[DisplayName("License text")]
|
||||
[Column(TypeName = "longtext")]
|
||||
[StringLength(131072)]
|
||||
[DataType(DataType.MultilineText)]
|
||||
public string Text { get; set; }
|
||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
||||
}
|
||||
@@ -23,13 +23,12 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Log : BaseModel<int>
|
||||
{
|
||||
public class Log : BaseModel<int>
|
||||
{
|
||||
public string Browser { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Referer { get; set; }
|
||||
}
|
||||
public string Browser { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Referer { get; set; }
|
||||
}
|
||||
@@ -26,21 +26,20 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class LogicalPartition : BaseModel<ulong>
|
||||
{
|
||||
public uint Sequence { get; set; }
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Type { get; set; }
|
||||
public ulong FirstSector { get; set; }
|
||||
public ulong LastSector { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Scheme { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ICollection<FilesystemsByLogicalPartition> Filesystems { get; set; }
|
||||
public virtual ICollection<LogicalPartitionsByMedia> Media { get; set; }
|
||||
}
|
||||
public class LogicalPartition : BaseModel<ulong>
|
||||
{
|
||||
public uint Sequence { get; set; }
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Type { get; set; }
|
||||
public ulong FirstSector { get; set; }
|
||||
public ulong LastSector { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Scheme { get; set; }
|
||||
|
||||
public virtual ICollection<FilesystemsByLogicalPartition> Filesystems { get; set; }
|
||||
public virtual ICollection<LogicalPartitionsByMedia> Media { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class LogicalPartitionsByMedia : BaseModel<ulong>
|
||||
{
|
||||
public class LogicalPartitionsByMedia : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
[Required]
|
||||
public virtual LogicalPartition Partition { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
[Required]
|
||||
public virtual LogicalPartition Partition { get; set; }
|
||||
}
|
||||
@@ -27,43 +27,44 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Machine : BaseModel<int>
|
||||
{
|
||||
public class Machine : BaseModel<int>
|
||||
public Machine()
|
||||
{
|
||||
public Machine()
|
||||
{
|
||||
Gpus = new HashSet<GpusByMachine>();
|
||||
Memory = new HashSet<MemoryByMachine>();
|
||||
Processors = new HashSet<ProcessorsByMachine>();
|
||||
Sound = new HashSet<SoundByMachine>();
|
||||
Storage = new HashSet<StorageByMachine>();
|
||||
}
|
||||
|
||||
[Required]
|
||||
public int CompanyId { get; set; }
|
||||
[Required, StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public MachineType Type { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? FamilyId { get; set; }
|
||||
[StringLength(50)]
|
||||
public string Model { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual MachineFamily Family { get; set; }
|
||||
public virtual ICollection<GpusByMachine> Gpus { get; set; }
|
||||
public virtual ICollection<MemoryByMachine> Memory { get; set; }
|
||||
public virtual ICollection<ProcessorsByMachine> Processors { get; set; }
|
||||
public virtual ICollection<SoundByMachine> Sound { get; set; }
|
||||
public virtual ICollection<StorageByMachine> Storage { get; set; }
|
||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<ScreensByMachine> Screens { get; set; }
|
||||
public virtual ICollection<DocumentsByMachine> Documents { get; set; }
|
||||
public virtual ICollection<BooksByMachine> Books { get; set; }
|
||||
public virtual ICollection<MagazinesByMachine> Magazines { get; set; }
|
||||
public virtual ICollection<MachinesBySoftwareVariant> Software { get; set; }
|
||||
Gpus = new HashSet<GpusByMachine>();
|
||||
Memory = new HashSet<MemoryByMachine>();
|
||||
Processors = new HashSet<ProcessorsByMachine>();
|
||||
Sound = new HashSet<SoundByMachine>();
|
||||
Storage = new HashSet<StorageByMachine>();
|
||||
}
|
||||
|
||||
[Required]
|
||||
public int CompanyId { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public MachineType Type { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? FamilyId { get; set; }
|
||||
[StringLength(50)]
|
||||
public string Model { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual MachineFamily Family { get; set; }
|
||||
public virtual ICollection<GpusByMachine> Gpus { get; set; }
|
||||
public virtual ICollection<MemoryByMachine> Memory { get; set; }
|
||||
public virtual ICollection<ProcessorsByMachine> Processors { get; set; }
|
||||
public virtual ICollection<SoundByMachine> Sound { get; set; }
|
||||
public virtual ICollection<StorageByMachine> Storage { get; set; }
|
||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<ScreensByMachine> Screens { get; set; }
|
||||
public virtual ICollection<DocumentsByMachine> Documents { get; set; }
|
||||
public virtual ICollection<BooksByMachine> Books { get; set; }
|
||||
public virtual ICollection<MagazinesByMachine> Magazines { get; set; }
|
||||
public virtual ICollection<MachinesBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MachineFamiliesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
public class MachineFamiliesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
@@ -26,21 +26,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MachineFamily : BaseModel<int>
|
||||
{
|
||||
public class MachineFamily : BaseModel<int>
|
||||
{
|
||||
public MachineFamily() => Machines = new HashSet<Machine>();
|
||||
public MachineFamily() => Machines = new HashSet<Machine>();
|
||||
|
||||
public int CompanyId { get; set; }
|
||||
[Required, StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
public virtual ICollection<DocumentsByMachineFamily> Documents { get; set; }
|
||||
public virtual ICollection<BooksByMachineFamily> Books { get; set; }
|
||||
public virtual ICollection<MagazinesByMachineFamily> Magazines { get; set; }
|
||||
public virtual ICollection<MachineFamiliesBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
public virtual ICollection<DocumentsByMachineFamily> Documents { get; set; }
|
||||
public virtual ICollection<BooksByMachineFamily> Books { get; set; }
|
||||
public virtual ICollection<MagazinesByMachineFamily> Magazines { get; set; }
|
||||
public virtual ICollection<MachineFamiliesBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
@@ -25,15 +25,14 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MachinePhoto : BasePhoto
|
||||
{
|
||||
public class MachinePhoto : BasePhoto
|
||||
{
|
||||
[Url]
|
||||
public string Source { get; set; }
|
||||
[Url]
|
||||
public string Source { get; set; }
|
||||
|
||||
public virtual Machine Machine { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
|
||||
public int MachineId { get; set; }
|
||||
}
|
||||
public int MachineId { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MachinesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
public class MachinesBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Machine Machine { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Machine Machine { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
@@ -27,17 +27,17 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Magazine : DocumentBase
|
||||
{
|
||||
[StringLength(8, MinimumLength = 8)]
|
||||
public string Issn { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? FirstPublication { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
public virtual ICollection<MagazineIssue> Issues { get; set; }
|
||||
public virtual ICollection<CompaniesByMagazine> Companies { get; set; }
|
||||
}
|
||||
public class Magazine : DocumentBase
|
||||
{
|
||||
[StringLength(8, MinimumLength = 8)]
|
||||
public string Issn { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? FirstPublication { get; set; }
|
||||
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
public virtual ICollection<MagazineIssue> Issues { get; set; }
|
||||
public virtual ICollection<CompaniesByMagazine> Companies { get; set; }
|
||||
}
|
||||
@@ -27,27 +27,27 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MagazineIssue : BaseModel<long>
|
||||
{
|
||||
[Required]
|
||||
public long MagazineId { get; set; }
|
||||
[Required]
|
||||
public string Caption { get; set; }
|
||||
public string NativeCaption { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Published { get; set; }
|
||||
[StringLength(18)]
|
||||
public string ProductCode { get; set; }
|
||||
public short? Pages { get; set; }
|
||||
public uint? IssueNumber { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Magazine Magazine { get; set; }
|
||||
public virtual ICollection<PeopleByMagazine> People { get; set; }
|
||||
public virtual ICollection<MagazinesByMachine> Machines { get; set; }
|
||||
public virtual ICollection<MagazinesByMachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<Media> Coverdiscs { get; set; }
|
||||
public virtual ICollection<MagazineScan> Scans { get; set; }
|
||||
}
|
||||
public class MagazineIssue : BaseModel<long>
|
||||
{
|
||||
[Required]
|
||||
public long MagazineId { get; set; }
|
||||
[Required]
|
||||
public string Caption { get; set; }
|
||||
public string NativeCaption { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Published { get; set; }
|
||||
[StringLength(18)]
|
||||
public string ProductCode { get; set; }
|
||||
public short? Pages { get; set; }
|
||||
public uint? IssueNumber { get; set; }
|
||||
|
||||
public virtual Magazine Magazine { get; set; }
|
||||
public virtual ICollection<PeopleByMagazine> People { get; set; }
|
||||
public virtual ICollection<MagazinesByMachine> Machines { get; set; }
|
||||
public virtual ICollection<MagazinesByMachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<Media> Coverdiscs { get; set; }
|
||||
public virtual ICollection<MagazineScan> Scans { get; set; }
|
||||
}
|
||||
@@ -25,12 +25,11 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MagazineScan : DocumentScanBase
|
||||
{
|
||||
public class MagazineScan : DocumentScanBase
|
||||
{
|
||||
[Required]
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public long MagazineId { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public long MagazineId { get; set; }
|
||||
}
|
||||
@@ -23,14 +23,13 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MagazinesByMachine : BaseModel<long>
|
||||
{
|
||||
public long MagazineId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
public class MagazinesByMachine : BaseModel<long>
|
||||
{
|
||||
public long MagazineId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
@@ -23,14 +23,13 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MagazinesByMachineFamily : BaseModel<long>
|
||||
{
|
||||
public long MagazineId { get; set; }
|
||||
public int MachineFamilyId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
}
|
||||
public class MagazinesByMachineFamily : BaseModel<long>
|
||||
{
|
||||
public long MagazineId { get; set; }
|
||||
public int MachineFamilyId { get; set; }
|
||||
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public virtual MachineFamily MachineFamily { get; set; }
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,12 +25,11 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MarechaiDb
|
||||
{
|
||||
public class MarechaiDb
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Version { get; set; }
|
||||
public DateTimeOffset? Updated { get; set; }
|
||||
}
|
||||
public int Id { get; set; }
|
||||
public int Version { get; set; }
|
||||
public DateTimeOffset? Updated { get; set; }
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MasteringText : BaseModel<ulong>
|
||||
{
|
||||
public class MasteringText : BaseModel<ulong>
|
||||
{
|
||||
public MasteringTextType Type { get; set; }
|
||||
[Required]
|
||||
public string Text { get; set; }
|
||||
public short? Side { get; set; }
|
||||
public short? Layer { get; set; }
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
}
|
||||
public MasteringTextType Type { get; set; }
|
||||
[Required]
|
||||
public string Text { get; set; }
|
||||
public short? Side { get; set; }
|
||||
public short? Layer { get; set; }
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
}
|
||||
@@ -28,44 +28,43 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Aaru.CommonTypes;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Media : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
public ushort? Sequence { get; set; }
|
||||
public ushort? LastSequence { get; set; }
|
||||
public MediaType Type { get; set; }
|
||||
public int? WriteOffset { get; set; }
|
||||
public ushort? Sides { get; set; }
|
||||
public ushort? Layers { get; set; }
|
||||
public ushort? Sessions { get; set; }
|
||||
public ushort? Tracks { get; set; }
|
||||
public ulong Sectors { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
public string CopyProtection { get; set; }
|
||||
public string PartNumber { get; set; }
|
||||
public string SerialNumber { get; set; }
|
||||
public string Barcode { get; set; }
|
||||
public string CatalogueNumber { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string Revision { get; set; }
|
||||
public string Firmware { get; set; }
|
||||
public int? PhysicalBlockSize { get; set; }
|
||||
public int? LogicalBlockSize { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public VariableBlockSize[] BlockSizes { get; set; }
|
||||
public StorageInterface? StorageInterface { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public OpticalDiscTrack[] TableOfContents { get; set; }
|
||||
public virtual MagazineIssue MagazineIssue { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
|
||||
public virtual ICollection<MediaDump> MediaDumps { get; set; }
|
||||
public virtual ICollection<Dump> Dumps { get; set; }
|
||||
public virtual ICollection<MediaBySoftwareVariant> Software { get; set; }
|
||||
public virtual ICollection<MasteringText> MasteringTexts { get; set; }
|
||||
}
|
||||
public class Media : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
public ushort? Sequence { get; set; }
|
||||
public ushort? LastSequence { get; set; }
|
||||
public MediaType Type { get; set; }
|
||||
public int? WriteOffset { get; set; }
|
||||
public ushort? Sides { get; set; }
|
||||
public ushort? Layers { get; set; }
|
||||
public ushort? Sessions { get; set; }
|
||||
public ushort? Tracks { get; set; }
|
||||
public ulong Sectors { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
public string CopyProtection { get; set; }
|
||||
public string PartNumber { get; set; }
|
||||
public string SerialNumber { get; set; }
|
||||
public string Barcode { get; set; }
|
||||
public string CatalogueNumber { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string Revision { get; set; }
|
||||
public string Firmware { get; set; }
|
||||
public int? PhysicalBlockSize { get; set; }
|
||||
public int? LogicalBlockSize { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public VariableBlockSize[] BlockSizes { get; set; }
|
||||
public StorageInterface? StorageInterface { get; set; }
|
||||
[Column(TypeName = "json")]
|
||||
public OpticalDiscTrack[] TableOfContents { get; set; }
|
||||
public virtual MagazineIssue MagazineIssue { get; set; }
|
||||
|
||||
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
|
||||
public virtual ICollection<MediaDump> MediaDumps { get; set; }
|
||||
public virtual ICollection<Dump> Dumps { get; set; }
|
||||
public virtual ICollection<MediaBySoftwareVariant> Software { get; set; }
|
||||
public virtual ICollection<MasteringText> MasteringTexts { get; set; }
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MediaBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
public class MediaBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
}
|
||||
@@ -26,20 +26,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MediaDump : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
public string Format { get; set; }
|
||||
public DumpStatus Status { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ICollection<MediaDumpFileImage> Files { get; set; }
|
||||
public virtual MediaDumpImage Image { get; set; }
|
||||
public virtual MediaDumpSubchannelImage Subchannel { get; set; }
|
||||
public virtual ICollection<MediaDumpTrackImage> Tracks { get; set; }
|
||||
public virtual ICollection<Dump> Dumps { get; set; }
|
||||
public virtual ICollection<MediaTagDump> Tags { get; set; }
|
||||
}
|
||||
public class MediaDump : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual Media Media { get; set; }
|
||||
public string Format { get; set; }
|
||||
public DumpStatus Status { get; set; }
|
||||
|
||||
public virtual ICollection<MediaDumpFileImage> Files { get; set; }
|
||||
public virtual MediaDumpImage Image { get; set; }
|
||||
public virtual MediaDumpSubchannelImage Subchannel { get; set; }
|
||||
public virtual ICollection<MediaDumpTrackImage> Tracks { get; set; }
|
||||
public virtual ICollection<Dump> Dumps { get; set; }
|
||||
public virtual ICollection<MediaTagDump> Tags { get; set; }
|
||||
}
|
||||
@@ -27,25 +27,24 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MediaDumpFileImage : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public long FileSequence { get; set; }
|
||||
public short PartitionSequence { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual ICollection<FilesystemsByMediaDumpFile> Filesystems { get; set; }
|
||||
}
|
||||
public class MediaDumpFileImage : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public long FileSequence { get; set; }
|
||||
public short PartitionSequence { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
|
||||
public virtual ICollection<FilesystemsByMediaDumpFile> Filesystems { get; set; }
|
||||
}
|
||||
@@ -1,23 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MediaDumpImage : BaseModel<ulong>
|
||||
{
|
||||
public class MediaDumpImage : BaseModel<ulong>
|
||||
{
|
||||
public ulong MediaDumpId { get; set; }
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
public string AccoustId { get; set; }
|
||||
}
|
||||
public ulong MediaDumpId { get; set; }
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
public string AccoustId { get; set; }
|
||||
}
|
||||
@@ -25,26 +25,25 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MediaDumpSubchannelImage : BaseModel<ulong>
|
||||
{
|
||||
public short TrackSequence { get; set; }
|
||||
public SubchannelStatus Status { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
public ulong? MediaDumpId { get; set; }
|
||||
public ulong? TrackId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public virtual MediaDumpTrackImage Track { get; set; }
|
||||
}
|
||||
public class MediaDumpSubchannelImage : BaseModel<ulong>
|
||||
{
|
||||
public short TrackSequence { get; set; }
|
||||
public SubchannelStatus Status { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
public ulong? MediaDumpId { get; set; }
|
||||
public ulong? TrackId { get; set; }
|
||||
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public virtual MediaDumpTrackImage Track { get; set; }
|
||||
}
|
||||
@@ -25,24 +25,23 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MediaDumpTrackImage : BaseModel<ulong>
|
||||
{
|
||||
public short TrackSequence { get; set; }
|
||||
public string Format { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public virtual MediaDumpSubchannelImage Subchannel { get; set; }
|
||||
}
|
||||
public class MediaDumpTrackImage : BaseModel<ulong>
|
||||
{
|
||||
public short TrackSequence { get; set; }
|
||||
public string Format { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
[Column(TypeName = "binary(16)")]
|
||||
public string Md5 { get; set; }
|
||||
[Column(TypeName = "binary(20)")]
|
||||
public string Sha1 { get; set; }
|
||||
[Column(TypeName = "binary(32)")]
|
||||
public string Sha256 { get; set; }
|
||||
[Column(TypeName = "binary(64)")]
|
||||
public string Sha3 { get; set; }
|
||||
public string Spamsum { get; set; }
|
||||
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public virtual MediaDumpSubchannelImage Subchannel { get; set; }
|
||||
}
|
||||
@@ -25,10 +25,9 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MediaFile : BaseFile
|
||||
{
|
||||
public class MediaFile : BaseFile
|
||||
{
|
||||
public virtual ICollection<FileDataStreamsByMediaFile> DataStreams { get; set; }
|
||||
}
|
||||
public virtual ICollection<FileDataStreamsByMediaFile> DataStreams { get; set; }
|
||||
}
|
||||
@@ -1,16 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MediaTagDump : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public MediaTagType Type { get; set; }
|
||||
[Required]
|
||||
public virtual DbFile File { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public ulong FileId { get; set; }
|
||||
}
|
||||
public class MediaTagDump : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual MediaDump MediaDump { get; set; }
|
||||
public MediaTagType Type { get; set; }
|
||||
[Required]
|
||||
public virtual DbFile File { get; set; }
|
||||
|
||||
public ulong FileId { get; set; }
|
||||
}
|
||||
@@ -25,17 +25,16 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MemoryByMachine : BaseModel<long>
|
||||
{
|
||||
public int MachineId { get; set; }
|
||||
public MemoryType Type { get; set; }
|
||||
public MemoryUsage Usage { get; set; }
|
||||
public long? Size { get; set; }
|
||||
[DisplayName("Speed (Hz)")]
|
||||
public double? Speed { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
public class MemoryByMachine : BaseModel<long>
|
||||
{
|
||||
public int MachineId { get; set; }
|
||||
public MemoryType Type { get; set; }
|
||||
public MemoryUsage Usage { get; set; }
|
||||
public long? Size { get; set; }
|
||||
[DisplayName("Speed (Hz)")]
|
||||
public double? Speed { get; set; }
|
||||
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
@@ -25,17 +25,16 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class MemoryByOwnedMachine : BaseModel<long>
|
||||
{
|
||||
public long OwnedMachineId { get; set; }
|
||||
public MemoryType Type { get; set; }
|
||||
public MemoryUsage Usage { get; set; }
|
||||
public long Size { get; set; }
|
||||
[DisplayName("Speed (Hz)")]
|
||||
public double Speed { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
}
|
||||
public class MemoryByOwnedMachine : BaseModel<long>
|
||||
{
|
||||
public long OwnedMachineId { get; set; }
|
||||
public MemoryType Type { get; set; }
|
||||
public MemoryUsage Usage { get; set; }
|
||||
public long Size { get; set; }
|
||||
[DisplayName("Speed (Hz)")]
|
||||
public double Speed { get; set; }
|
||||
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
}
|
||||
@@ -23,11 +23,10 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class MoneyDonation : BaseModel<int>
|
||||
{
|
||||
public class MoneyDonation : BaseModel<int>
|
||||
{
|
||||
public string Donator { get; set; }
|
||||
public decimal Quantity { get; set; }
|
||||
}
|
||||
public string Donator { get; set; }
|
||||
public decimal Quantity { get; set; }
|
||||
}
|
||||
@@ -26,13 +26,12 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class News : BaseModel<int>
|
||||
{
|
||||
public class News : BaseModel<int>
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public NewsType Type { get; set; }
|
||||
[DisplayName("Affected ID")]
|
||||
public int AddedId { get; set; }
|
||||
}
|
||||
public DateTime Date { get; set; }
|
||||
public NewsType Type { get; set; }
|
||||
[DisplayName("Affected ID")]
|
||||
public int AddedId { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
using Aaru.CommonTypes.Enums;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
// Not for a table
|
||||
public class OpticalDiscTrack
|
||||
{
|
||||
// Not for a table
|
||||
public class OpticalDiscTrack
|
||||
{
|
||||
public int TrackNumber { get; set; }
|
||||
public int SessionNumber { get; set; }
|
||||
public long FirstSector { get; set; }
|
||||
public long LastSector { get; set; }
|
||||
public TrackType Type { get; set; }
|
||||
}
|
||||
public int TrackNumber { get; set; }
|
||||
public int SessionNumber { get; set; }
|
||||
public long FirstSector { get; set; }
|
||||
public long LastSector { get; set; }
|
||||
public TrackType Type { get; set; }
|
||||
}
|
||||
@@ -27,38 +27,41 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class OwnedMachine : BaseModel<long>
|
||||
{
|
||||
public class OwnedMachine : BaseModel<long>
|
||||
{
|
||||
[DisplayName("Acquisition date")]
|
||||
public DateTime AcquisitionDate { get; set; }
|
||||
[DisplayName("Date when sold, traded, or otherwise lost")]
|
||||
public DateTime? LostDate { get; set; }
|
||||
public StatusType Status { get; set; }
|
||||
[DisplayName("Last status check date")]
|
||||
public DateTime? LastStatusDate { get; set; }
|
||||
[DisplayName("Available for trade or sale"), DefaultValue(false)]
|
||||
public bool Trade { get; set; }
|
||||
[DisplayName("Has original boxes"), DefaultValue(false)]
|
||||
public bool Boxed { get; set; }
|
||||
[DisplayName("Has original manuals"), DefaultValue(false)]
|
||||
public bool Manuals { get; set; }
|
||||
[DisplayName("Serial number")]
|
||||
public string SerialNumber { get; set; }
|
||||
[DisplayName("Serial number visible to other users"), DefaultValue(false)]
|
||||
public bool SerialNumberVisible { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
public string UserId { get; set; }
|
||||
[DisplayName("Acquisition date")]
|
||||
public DateTime AcquisitionDate { get; set; }
|
||||
[DisplayName("Date when sold, traded, or otherwise lost")]
|
||||
public DateTime? LostDate { get; set; }
|
||||
public StatusType Status { get; set; }
|
||||
[DisplayName("Last status check date")]
|
||||
public DateTime? LastStatusDate { get; set; }
|
||||
[DisplayName("Available for trade or sale")]
|
||||
[DefaultValue(false)]
|
||||
public bool Trade { get; set; }
|
||||
[DisplayName("Has original boxes")]
|
||||
[DefaultValue(false)]
|
||||
public bool Boxed { get; set; }
|
||||
[DisplayName("Has original manuals")]
|
||||
[DefaultValue(false)]
|
||||
public bool Manuals { get; set; }
|
||||
[DisplayName("Serial number")]
|
||||
public string SerialNumber { get; set; }
|
||||
[DisplayName("Serial number visible to other users")]
|
||||
[DefaultValue(false)]
|
||||
public bool SerialNumberVisible { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
public string UserId { get; set; }
|
||||
|
||||
public virtual ICollection<GpusByOwnedMachine> Gpus { get; set; }
|
||||
public virtual ICollection<MemoryByOwnedMachine> Memory { get; set; }
|
||||
public virtual ICollection<ProcessorsByOwnedMachine> Processors { get; set; }
|
||||
public virtual ICollection<SoundByOwnedMachine> Sound { get; set; }
|
||||
public virtual ICollection<StorageByOwnedMachine> Storage { get; set; }
|
||||
public virtual ICollection<OwnedMachinePhoto> Photos { get; set; }
|
||||
public virtual ICollection<GpusByOwnedMachine> Gpus { get; set; }
|
||||
public virtual ICollection<MemoryByOwnedMachine> Memory { get; set; }
|
||||
public virtual ICollection<ProcessorsByOwnedMachine> Processors { get; set; }
|
||||
public virtual ICollection<SoundByOwnedMachine> Sound { get; set; }
|
||||
public virtual ICollection<StorageByOwnedMachine> Storage { get; set; }
|
||||
public virtual ICollection<OwnedMachinePhoto> Photos { get; set; }
|
||||
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
public virtual Machine Machine { get; set; }
|
||||
}
|
||||
@@ -23,11 +23,10 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class OwnedMachinePhoto : BasePhoto
|
||||
{
|
||||
public class OwnedMachinePhoto : BasePhoto
|
||||
{
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
public long OwnedMachineId { get; set; }
|
||||
}
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
public long OwnedMachineId { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleByBook : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public long BookId { get; set; }
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual DocumentPerson Person { get; set; }
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
public class PeopleByBook : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public long BookId { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
public virtual DocumentPerson Person { get; set; }
|
||||
public virtual Book Book { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
@@ -26,19 +26,18 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleByCompany : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public string Position { get; set; }
|
||||
public DateTime? Start { get; set; }
|
||||
public DateTime? End { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Ongoing { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Person Person { get; set; }
|
||||
public virtual Company Company { get; set; }
|
||||
}
|
||||
public class PeopleByCompany : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public string Position { get; set; }
|
||||
public DateTime? Start { get; set; }
|
||||
public DateTime? End { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool Ongoing { get; set; }
|
||||
|
||||
public virtual Person Person { get; set; }
|
||||
public virtual Company Company { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleByDocument : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public long DocumentId { get; set; }
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual DocumentPerson Person { get; set; }
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
public class PeopleByDocument : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public long DocumentId { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
public virtual DocumentPerson Person { get; set; }
|
||||
public virtual Document Document { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
@@ -26,17 +26,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleByMagazine : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public long MagazineId { get; set; }
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual DocumentPerson Person { get; set; }
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
public class PeopleByMagazine : BaseModel<long>
|
||||
{
|
||||
public int PersonId { get; set; }
|
||||
public long MagazineId { get; set; }
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
public virtual DocumentPerson Person { get; set; }
|
||||
public virtual MagazineIssue Magazine { get; set; }
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
}
|
||||
@@ -26,18 +26,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleBySoftwareFamily : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
[Required]
|
||||
public virtual Person Person { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareFamily SoftwareFamily { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
}
|
||||
public class PeopleBySoftwareFamily : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
[Required]
|
||||
public virtual Person Person { get; set; }
|
||||
[Required]
|
||||
public virtual SoftwareFamily SoftwareFamily { get; set; }
|
||||
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
}
|
||||
@@ -26,18 +26,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
[Required]
|
||||
public virtual Person Person { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
}
|
||||
public class PeopleBySoftwareVariant : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||
[Required]
|
||||
public virtual Person Person { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
}
|
||||
@@ -26,18 +26,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class PeopleBySoftwareVersion : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual SoftwareVersion SoftwareVersion { get; set; }
|
||||
[Required]
|
||||
public virtual Person Person { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
[Column(TypeName = "char(3)"), Required]
|
||||
public string RoleId { get; set; }
|
||||
}
|
||||
public class PeopleBySoftwareVersion : BaseModel<ulong>
|
||||
{
|
||||
[Required]
|
||||
public virtual SoftwareVersion SoftwareVersion { get; set; }
|
||||
[Required]
|
||||
public virtual Person Person { get; set; }
|
||||
[Required]
|
||||
public virtual DocumentRole Role { get; set; }
|
||||
|
||||
[Column(TypeName = "char(3)")]
|
||||
[Required]
|
||||
public string RoleId { get; set; }
|
||||
}
|
||||
@@ -30,38 +30,40 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class Person : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Surname { get; set; }
|
||||
[DisplayName("Country of birth")]
|
||||
public virtual Iso31661Numeric CountryOfBirth { get; set; }
|
||||
[DisplayName("Birth date"), DataType(DataType.Date)]
|
||||
public DateTime BirthDate { get; set; }
|
||||
[DisplayName("Date of death"), DataType(DataType.Date)]
|
||||
public DateTime? DeathDate { get; set; }
|
||||
[Url]
|
||||
public string Webpage { get; set; }
|
||||
[Remote("VerifyTwitter", "People", "Admin")]
|
||||
public string Twitter { get; set; }
|
||||
public string Facebook { get; set; }
|
||||
public Guid Photo { get; set; }
|
||||
public int? DocumentPersonId { get; set; }
|
||||
public string Alias { get; set; }
|
||||
[DisplayName("Name to be displayed")]
|
||||
public string DisplayName { get; set; }
|
||||
[NotMapped, DisplayName("Name")]
|
||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public short? CountryOfBirthId { get; set; }
|
||||
public virtual ICollection<PeopleByCompany> Companies { get; set; }
|
||||
public virtual DocumentPerson DocumentPerson { get; set; }
|
||||
public virtual ICollection<PeopleBySoftwareFamily> SoftwareFamilies { get; set; }
|
||||
public virtual ICollection<PeopleBySoftwareVersion> SoftwareVersions { get; set; }
|
||||
public virtual ICollection<PeopleBySoftwareVariant> SoftwareVariants { get; set; }
|
||||
}
|
||||
public class Person : BaseModel<int>
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Surname { get; set; }
|
||||
[DisplayName("Country of birth")]
|
||||
public virtual Iso31661Numeric CountryOfBirth { get; set; }
|
||||
[DisplayName("Birth date")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime BirthDate { get; set; }
|
||||
[DisplayName("Date of death")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? DeathDate { get; set; }
|
||||
[Url]
|
||||
public string Webpage { get; set; }
|
||||
[Remote("VerifyTwitter", "People", "Admin")]
|
||||
public string Twitter { get; set; }
|
||||
public string Facebook { get; set; }
|
||||
public Guid Photo { get; set; }
|
||||
public int? DocumentPersonId { get; set; }
|
||||
public string Alias { get; set; }
|
||||
[DisplayName("Name to be displayed")]
|
||||
public string DisplayName { get; set; }
|
||||
[NotMapped]
|
||||
[DisplayName("Name")]
|
||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||
|
||||
public short? CountryOfBirthId { get; set; }
|
||||
public virtual ICollection<PeopleByCompany> Companies { get; set; }
|
||||
public virtual DocumentPerson DocumentPerson { get; set; }
|
||||
public virtual ICollection<PeopleBySoftwareFamily> SoftwareFamilies { get; set; }
|
||||
public virtual ICollection<PeopleBySoftwareVersion> SoftwareVersions { get; set; }
|
||||
public virtual ICollection<PeopleBySoftwareVariant> SoftwareVariants { get; set; }
|
||||
}
|
||||
@@ -29,69 +29,71 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public class Processor : BaseModel<int>
|
||||
{
|
||||
public class Processor : BaseModel<int>
|
||||
public Processor()
|
||||
{
|
||||
public Processor()
|
||||
{
|
||||
InstructionSetExtensions = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||
ProcessorsByMachine = new HashSet<ProcessorsByMachine>();
|
||||
}
|
||||
|
||||
[Required, StringLength(50)]
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
[DisplayName("Model code"), StringLength(45)]
|
||||
public string ModelCode { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
[DisplayName("Instruction set")]
|
||||
public int? InstructionSetId { get; set; }
|
||||
[DisplayName("Nominal speed (MHz)")]
|
||||
public double? Speed { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Package { get; set; }
|
||||
[DisplayName("General Purpose Registers")]
|
||||
public int? Gprs { get; set; }
|
||||
[DisplayName("General Purporse Register size")]
|
||||
public int? GprSize { get; set; }
|
||||
[DisplayName("Floating Point Registers")]
|
||||
public int? Fprs { get; set; }
|
||||
[DisplayName("Floating Point Register Size")]
|
||||
public int? FprSize { get; set; }
|
||||
public int? Cores { get; set; }
|
||||
[DisplayName("Threads per core")]
|
||||
public int? ThreadsPerCore { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Process { get; set; }
|
||||
[DisplayName("Process (nm)")]
|
||||
public float? ProcessNm { get; set; }
|
||||
[DisplayName("Die size (mm²)")]
|
||||
public float? DieSize { get; set; }
|
||||
public long? Transistors { get; set; }
|
||||
[DisplayName("Data bus size")]
|
||||
public int? DataBus { get; set; }
|
||||
[DisplayName("Address bus size")]
|
||||
public int? AddrBus { get; set; }
|
||||
[DisplayName("SIMD registers")]
|
||||
public int? SimdRegisters { get; set; }
|
||||
[DisplayName("SIMD register size")]
|
||||
public int? SimdSize { get; set; }
|
||||
[DisplayName("L1 instruction cache (KiB)")]
|
||||
public float? L1Instruction { get; set; }
|
||||
[DisplayName("L1 data cache (KiB)")]
|
||||
public float? L1Data { get; set; }
|
||||
[DisplayName("L2 cache (KiB)")]
|
||||
public float? L2 { get; set; }
|
||||
[DisplayName("L3 cache (KiB)")]
|
||||
public float? L3 { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
[DisplayName("Instruction set")]
|
||||
public virtual InstructionSet InstructionSet { get; set; }
|
||||
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensions { get; set; }
|
||||
public virtual ICollection<ProcessorsByMachine> ProcessorsByMachine { get; set; }
|
||||
public virtual ICollection<ProcessorsBySoftwareVariant> Software { get; set; }
|
||||
InstructionSetExtensions = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||
ProcessorsByMachine = new HashSet<ProcessorsByMachine>();
|
||||
}
|
||||
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
[DisplayName("Model code")]
|
||||
[StringLength(45)]
|
||||
public string ModelCode { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
[DisplayName("Instruction set")]
|
||||
public int? InstructionSetId { get; set; }
|
||||
[DisplayName("Nominal speed (MHz)")]
|
||||
public double? Speed { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Package { get; set; }
|
||||
[DisplayName("General Purpose Registers")]
|
||||
public int? Gprs { get; set; }
|
||||
[DisplayName("General Purporse Register size")]
|
||||
public int? GprSize { get; set; }
|
||||
[DisplayName("Floating Point Registers")]
|
||||
public int? Fprs { get; set; }
|
||||
[DisplayName("Floating Point Register Size")]
|
||||
public int? FprSize { get; set; }
|
||||
public int? Cores { get; set; }
|
||||
[DisplayName("Threads per core")]
|
||||
public int? ThreadsPerCore { get; set; }
|
||||
[StringLength(45)]
|
||||
public string Process { get; set; }
|
||||
[DisplayName("Process (nm)")]
|
||||
public float? ProcessNm { get; set; }
|
||||
[DisplayName("Die size (mm²)")]
|
||||
public float? DieSize { get; set; }
|
||||
public long? Transistors { get; set; }
|
||||
[DisplayName("Data bus size")]
|
||||
public int? DataBus { get; set; }
|
||||
[DisplayName("Address bus size")]
|
||||
public int? AddrBus { get; set; }
|
||||
[DisplayName("SIMD registers")]
|
||||
public int? SimdRegisters { get; set; }
|
||||
[DisplayName("SIMD register size")]
|
||||
public int? SimdSize { get; set; }
|
||||
[DisplayName("L1 instruction cache (KiB)")]
|
||||
public float? L1Instruction { get; set; }
|
||||
[DisplayName("L1 data cache (KiB)")]
|
||||
public float? L1Data { get; set; }
|
||||
[DisplayName("L2 cache (KiB)")]
|
||||
public float? L2 { get; set; }
|
||||
[DisplayName("L3 cache (KiB)")]
|
||||
public float? L3 { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
[DisplayName("Instruction set")]
|
||||
public virtual InstructionSet InstructionSet { get; set; }
|
||||
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensions { get; set; }
|
||||
public virtual ICollection<ProcessorsByMachine> ProcessorsByMachine { get; set; }
|
||||
public virtual ICollection<ProcessorsBySoftwareVariant> Software { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class ProcessorsByMachine : BaseModel<long>
|
||||
{
|
||||
public int ProcessorId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
[DisplayName("Speed (MHz)")]
|
||||
public float? Speed { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual Machine Machine { get; set; }
|
||||
public virtual Processor Processor { get; set; }
|
||||
}
|
||||
public class ProcessorsByMachine : BaseModel<long>
|
||||
{
|
||||
public int ProcessorId { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
[DisplayName("Speed (MHz)")]
|
||||
public float? Speed { get; set; }
|
||||
|
||||
public virtual Machine Machine { get; set; }
|
||||
public virtual Processor Processor { get; set; }
|
||||
}
|
||||
@@ -25,16 +25,15 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Database.Models
|
||||
{
|
||||
public class ProcessorsByOwnedMachine : BaseModel<long>
|
||||
{
|
||||
public int ProcessorId { get; set; }
|
||||
public long OwnedMachineId { get; set; }
|
||||
[DisplayName("Speed (MHz)")]
|
||||
public float Speed { get; set; }
|
||||
namespace Marechai.Database.Models;
|
||||
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
public virtual Processor Processor { get; set; }
|
||||
}
|
||||
public class ProcessorsByOwnedMachine : BaseModel<long>
|
||||
{
|
||||
public int ProcessorId { get; set; }
|
||||
public long OwnedMachineId { get; set; }
|
||||
[DisplayName("Speed (MHz)")]
|
||||
public float Speed { get; set; }
|
||||
|
||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
||||
public virtual Processor Processor { get; set; }
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user