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:
@@ -1,27 +1,34 @@
|
|||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
## Commit signature
|
## Commit signature
|
||||||
|
|
||||||
For security reason we require all commits to be cryptographically signed.
|
For security reason we require all commits to be cryptographically signed.
|
||||||
This section explains how to setup the development environment for that purpose.
|
This section explains how to setup the development environment for that purpose.
|
||||||
|
|
||||||
### Visual Studio and Visual Studio Code for Windows
|
### Visual Studio and Visual Studio Code for Windows
|
||||||
You need to install Git for Windows. It is available as a component of Visual Studio, or separately in https://gitforwindows.org.
|
|
||||||
|
You need to install Git for Windows. It is available as a component of Visual Studio, or separately
|
||||||
|
in https://gitforwindows.org.
|
||||||
|
|
||||||
You also need to install Gpg4win from https://www.gpg4win.org. Ensure to select the Kleopatra component.
|
You also need to install Gpg4win from https://www.gpg4win.org. Ensure to select the Kleopatra component.
|
||||||
|
|
||||||
Once you have them installed, open Kleopatra and generate a new key pair, of OpenPGP type, following the instructions [here](https://www.gpg4win.org/doc/en/gpg4win-compendium_12.html).
|
Once you have them installed, open Kleopatra and generate a new key pair, of OpenPGP type, following the
|
||||||
|
instructions [here](https://www.gpg4win.org/doc/en/gpg4win-compendium_12.html).
|
||||||
Save aside the fingerprint, you'll need it later.
|
Save aside the fingerprint, you'll need it later.
|
||||||
|
|
||||||
Now go to environment variables (in the properties of your computer) and add this to the path:
|
Now go to environment variables (in the properties of your computer) and add this to the path:
|
||||||
`C:\Program Files\Git\usr\bin`
|
`C:\Program Files\Git\usr\bin`
|
||||||
|
|
||||||
Finally, open Git Bash, and write the following commands if you want all git commits to be signed:
|
Finally, open Git Bash, and write the following commands if you want all git commits to be signed:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git config --global commit.gpgsign true
|
git config --global commit.gpgsign true
|
||||||
git config --global user.signingkey <FINGERPRINT>
|
git config --global user.signingkey <FINGERPRINT>
|
||||||
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
||||||
```
|
```
|
||||||
|
|
||||||
or if you want the options to apply only for this project
|
or if you want the options to apply only for this project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /DRIVE/PATH_TO_PROJECT
|
cd /DRIVE/PATH_TO_PROJECT
|
||||||
git config commit.gpgsign true
|
git config commit.gpgsign true
|
||||||
@@ -29,8 +36,11 @@ git config user.signingkey FINGERPRINT
|
|||||||
git config gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
git config gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
||||||
```
|
```
|
||||||
|
|
||||||
replacing `FINGERPRINT` with the fingerprint you saved from the key generation, `DRIVE` with the drive letter and `PATH_TO_PROJECT` using `/` as path separator.
|
replacing `FINGERPRINT` with the fingerprint you saved from the key generation, `DRIVE` with the drive letter and
|
||||||
|
`PATH_TO_PROJECT` using `/` as path separator.
|
||||||
|
|
||||||
Once this is done, every time you commit in VS / VSCode, a message box titled `pinentry-qt` will ask for the passphrase you set up earlier and sign the commit with your key.
|
Once this is done, every time you commit in VS / VSCode, a message box titled `pinentry-qt` will ask for the passphrase
|
||||||
|
you set up earlier and sign the commit with your key.
|
||||||
|
|
||||||
For GitHub to recognize your signature you need to follow the steps [here](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account).
|
For GitHub to recognize your signature you need to follow the
|
||||||
|
steps [here](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account).
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -25,33 +25,32 @@
|
|||||||
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
|
||||||
namespace Marechai.Database
|
namespace Marechai.Database;
|
||||||
|
|
||||||
|
/// <summary>Interface to database</summary>
|
||||||
|
public interface IDbCore
|
||||||
{
|
{
|
||||||
/// <summary>Interface to database</summary>
|
/// <summary>Database operations</summary>
|
||||||
public interface IDbCore
|
Operations Operations { get; }
|
||||||
{
|
|
||||||
/// <summary>Database operations</summary>
|
|
||||||
Operations Operations { get; }
|
|
||||||
|
|
||||||
/// <summary>Last inserted row's ID</summary>
|
/// <summary>Last inserted row's ID</summary>
|
||||||
long LastInsertRowId { get; }
|
long LastInsertRowId { get; }
|
||||||
|
|
||||||
/// <summary>Opens an existing database</summary>
|
/// <summary>Opens an existing database</summary>
|
||||||
/// <param name="server">Server</param>
|
/// <param name="server">Server</param>
|
||||||
/// <param name="user">User</param>
|
/// <param name="user">User</param>
|
||||||
/// <param name="database">Database name</param>
|
/// <param name="database">Database name</param>
|
||||||
/// <param name="password">Password</param>
|
/// <param name="password">Password</param>
|
||||||
/// <param name="port">Port</param>
|
/// <param name="port">Port</param>
|
||||||
/// <returns><c>true</c> if database opened correctly, <c>false</c> otherwise</returns>
|
/// <returns><c>true</c> if database opened correctly, <c>false</c> otherwise</returns>
|
||||||
bool OpenDb(string server, string user, string database, string password, ushort port);
|
bool OpenDb(string server, string user, string database, string password, ushort port);
|
||||||
|
|
||||||
/// <summary>Closes the database</summary>
|
/// <summary>Closes the database</summary>
|
||||||
void CloseDb();
|
void CloseDb();
|
||||||
|
|
||||||
/// <summary>Gets a data adapter for the opened database</summary>
|
/// <summary>Gets a data adapter for the opened database</summary>
|
||||||
/// <returns>Data adapter</returns>
|
/// <returns>Data adapter</returns>
|
||||||
IDbDataAdapter GetNewDataAdapter();
|
IDbDataAdapter GetNewDataAdapter();
|
||||||
|
|
||||||
bool TableExists(string tableName);
|
bool TableExists(string tableName);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,15 +4,15 @@
|
|||||||
<RootNamespace>Marechai.Database</RootNamespace>
|
<RootNamespace>Marechai.Database</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aaru.CommonTypes" Version="5.2.99.3380-alpha" />
|
<PackageReference Include="Aaru.CommonTypes" Version="5.2.99.3380-alpha"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.11" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.11"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.11">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.11">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.11" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.11"/>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0"/>
|
||||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Json.Microsoft" Version="9.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Json.Microsoft" Version="9.0.0"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ namespace Marechai.Database.Migrations
|
|||||||
{
|
{
|
||||||
public partial class InitialMigration : Migration
|
public partial class InitialMigration : Migration
|
||||||
{
|
{
|
||||||
|
[SuppressMessage("Performance", "CA1861:Avoid constant arrays as arguments", Justification = "The method is called just once")]
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.CreateTable("admins", table => new
|
migrationBuilder.CreateTable("admins", table => new
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace Marechai.Database.Migrations
|
namespace Marechai.Database.Migrations
|
||||||
{
|
{
|
||||||
public partial class Licenses : Migration
|
public partial class Licenses : Migration
|
||||||
{
|
{
|
||||||
|
[SuppressMessage("Performance", "CA1861:Avoid constant arrays as arguments", Justification = "The method is called just once.")]
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.CreateTable("Licenses", table => new
|
migrationBuilder.CreateTable("Licenses", table => new
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace Marechai.Database.Migrations
|
namespace Marechai.Database.Migrations
|
||||||
{
|
{
|
||||||
public partial class AddDocumentRoles : Migration
|
public partial class AddDocumentRoles : Migration
|
||||||
{
|
{
|
||||||
|
[SuppressMessage("Performance", "CA1861:Avoid constant arrays as arguments", Justification = "The method is called just once.")]
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.CreateTable("DocumentRoles", table => new
|
migrationBuilder.CreateTable("DocumentRoles", table => new
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace Marechai.Database.Migrations
|
namespace Marechai.Database.Migrations
|
||||||
{
|
{
|
||||||
@@ -1275,6 +1276,7 @@ namespace Marechai.Database.Migrations
|
|||||||
migrationBuilder.DeleteData("Licenses", "Id", 363);
|
migrationBuilder.DeleteData("Licenses", "Id", 363);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("Performance", "CA1861:Avoid constant arrays as arguments", Justification = "The method is called just once.")]
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.InsertData("DocumentRoles", new[]
|
migrationBuilder.InsertData("DocumentRoles", new[]
|
||||||
|
|||||||
@@ -26,38 +26,37 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.AspNetCore.Identity;
|
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";
|
Description = name;
|
||||||
public const string ROLE_WRITER = "Writer";
|
Created = DateTime.UtcNow;
|
||||||
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; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Identity;
|
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<MachinePhoto> Photos { get; set; }
|
public virtual ICollection<OwnedMachine> OwnedMachines { get; set; }
|
||||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
public virtual ICollection<Dump> Dumps { get; set; }
|
||||||
public virtual ICollection<OwnedMachine> OwnedMachines { get; set; }
|
public virtual ICollection<BookScan> BookScans { get; set; }
|
||||||
public virtual ICollection<Dump> Dumps { get; set; }
|
public virtual ICollection<DocumentScan> DocumentScans { get; set; }
|
||||||
public virtual ICollection<BookScan> BookScans { get; set; }
|
public virtual ICollection<MagazineScan> MagazineScans { 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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
[Required]
|
public class Audit : BaseModel<long>
|
||||||
public virtual ApplicationUser User { get; set; }
|
{
|
||||||
}
|
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 System.ComponentModel.DataAnnotations;
|
||||||
using Aaru.CommonTypes.Structs;
|
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]
|
||||||
[StringLength(8192), Required]
|
public string Path { get; set; }
|
||||||
public string Path { get; set; }
|
[StringLength(255)]
|
||||||
[StringLength(255), Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required, DefaultValue('/')]
|
[Required]
|
||||||
public char PathSeparator { get; set; }
|
[DefaultValue('/')]
|
||||||
public bool IsDirectory { get; set; }
|
public char PathSeparator { get; set; }
|
||||||
public DateTime? CreationDate { get; set; }
|
public bool IsDirectory { get; set; }
|
||||||
public DateTime? AccessDate { get; set; }
|
public DateTime? CreationDate { get; set; }
|
||||||
public DateTime? StatusChangeDate { get; set; }
|
public DateTime? AccessDate { get; set; }
|
||||||
public DateTime? BackupDate { get; set; }
|
public DateTime? StatusChangeDate { get; set; }
|
||||||
public DateTime? LastWriteDate { get; set; }
|
public DateTime? BackupDate { get; set; }
|
||||||
public FileAttributes Attributes { get; set; }
|
public DateTime? LastWriteDate { get; set; }
|
||||||
public ushort? PosixMode { get; set; }
|
public FileAttributes Attributes { get; set; }
|
||||||
public uint? DeviceNumber { get; set; }
|
public ushort? PosixMode { get; set; }
|
||||||
public ulong? GroupId { get; set; }
|
public uint? DeviceNumber { get; set; }
|
||||||
public ulong? UserId { get; set; }
|
public ulong? GroupId { get; set; }
|
||||||
public ulong? Inode { get; set; }
|
public ulong? UserId { get; set; }
|
||||||
public ulong? Links { get; set; }
|
public ulong? Inode { get; set; }
|
||||||
}
|
public ulong? Links { get; set; }
|
||||||
}
|
}
|
||||||
@@ -26,15 +26,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public abstract class BaseModel<TKey>
|
|
||||||
{
|
|
||||||
public TKey Id { get; set; }
|
|
||||||
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
public abstract class BaseModel<TKey>
|
||||||
public DateTime CreatedOn { get; set; }
|
{
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
public TKey Id { get; set; }
|
||||||
public DateTime UpdatedOn { 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;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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; }
|
||||||
public double? Aperture { get; set; }
|
[DisplayName("Camera manufacturer")]
|
||||||
public string Author { get; set; }
|
public string CameraManufacturer { get; set; }
|
||||||
[DisplayName("Camera manufacturer")]
|
[DisplayName("Camera model")]
|
||||||
public string CameraManufacturer { get; set; }
|
public string CameraModel { get; set; }
|
||||||
[DisplayName("Camera model")]
|
[DisplayName("Color space")]
|
||||||
public string CameraModel { get; set; }
|
public ColorSpace? ColorSpace { get; set; }
|
||||||
[DisplayName("Color space")]
|
[DisplayName("User comments")]
|
||||||
public ColorSpace? ColorSpace { get; set; }
|
public string Comments { get; set; }
|
||||||
[DisplayName("User comments")]
|
public Contrast? Contrast { get; set; }
|
||||||
public string Comments { get; set; }
|
[DisplayName("Date and time of digitizing")]
|
||||||
public Contrast? Contrast { get; set; }
|
public DateTime? CreationDate { get; set; }
|
||||||
[DisplayName("Date and time of digitizing")]
|
[DisplayName("Digital zoom ratio")]
|
||||||
public DateTime? CreationDate { get; set; }
|
public double? DigitalZoomRatio { get; set; }
|
||||||
[DisplayName("Digital zoom ratio")]
|
[DisplayName("Exif version")]
|
||||||
public double? DigitalZoomRatio { get; set; }
|
public string ExifVersion { get; set; }
|
||||||
[DisplayName("Exif version")]
|
[DisplayName("Exposure time")]
|
||||||
public string ExifVersion { get; set; }
|
public double? ExposureTime { get; set; }
|
||||||
[DisplayName("Exposure time")]
|
[DisplayName("Exposure mode")]
|
||||||
public double? ExposureTime { get; set; }
|
public ExposureMode? ExposureMethod { get; set; }
|
||||||
[DisplayName("Exposure mode")]
|
[DisplayName("Exposure Program")]
|
||||||
public ExposureMode? ExposureMethod { get; set; }
|
public ExposureProgram? ExposureProgram { get; set; }
|
||||||
[DisplayName("Exposure Program")]
|
public Flash? Flash { get; set; }
|
||||||
public ExposureProgram? ExposureProgram { get; set; }
|
[DisplayName("F-number")]
|
||||||
public Flash? Flash { get; set; }
|
public double? Focal { get; set; }
|
||||||
[DisplayName("F-number")]
|
[DisplayName("Lens focal length")]
|
||||||
public double? Focal { get; set; }
|
public double? FocalLength { get; set; }
|
||||||
[DisplayName("Lens focal length")]
|
[DisplayName("Focal length in 35 mm film")]
|
||||||
public double? FocalLength { get; set; }
|
public double? FocalLengthEquivalent { get; set; }
|
||||||
[DisplayName("Focal length in 35 mm film")]
|
[DisplayName("Horizontal resolution")]
|
||||||
public double? FocalLengthEquivalent { get; set; }
|
public double? HorizontalResolution { get; set; }
|
||||||
[DisplayName("Horizontal resolution")]
|
[DisplayName("ISO speed rating")]
|
||||||
public double? HorizontalResolution { get; set; }
|
public ushort? IsoRating { get; set; }
|
||||||
[DisplayName("ISO speed rating")]
|
[DisplayName("Lens used")]
|
||||||
public ushort? IsoRating { get; set; }
|
public string Lens { get; set; }
|
||||||
[DisplayName("Lens used")]
|
[DisplayName("Light source")]
|
||||||
public string Lens { get; set; }
|
public LightSource? LightSource { get; set; }
|
||||||
[DisplayName("Light source")]
|
[DisplayName("Metering mode")]
|
||||||
public LightSource? LightSource { get; set; }
|
public MeteringMode? MeteringMode { get; set; }
|
||||||
[DisplayName("Metering mode")]
|
[DisplayName("Resolution unit")]
|
||||||
public MeteringMode? MeteringMode { get; set; }
|
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||||
[DisplayName("Resolution unit")]
|
public Orientation? Orientation { get; set; }
|
||||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
public Saturation? Saturation { get; set; }
|
||||||
public Orientation? Orientation { get; set; }
|
[DisplayName("Scene capture type")]
|
||||||
public Saturation? Saturation { get; set; }
|
public SceneCaptureType? SceneCaptureType { get; set; }
|
||||||
[DisplayName("Scene capture type")]
|
[DisplayName("Sensing method")]
|
||||||
public SceneCaptureType? SceneCaptureType { get; set; }
|
public SensingMethod? SensingMethod { get; set; }
|
||||||
[DisplayName("Sensing method")]
|
public Sharpness? Sharpness { get; set; }
|
||||||
public SensingMethod? SensingMethod { get; set; }
|
[DisplayName("Software used")]
|
||||||
public Sharpness? Sharpness { get; set; }
|
public string SoftwareUsed { get; set; }
|
||||||
[DisplayName("Software used")]
|
[DisplayName("Subject distance range")]
|
||||||
public string SoftwareUsed { get; set; }
|
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
||||||
[DisplayName("Subject distance range")]
|
[Timestamp]
|
||||||
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
public DateTime UploadDate { get; set; }
|
||||||
[Timestamp]
|
[DisplayName("Vertical resolution")]
|
||||||
public DateTime UploadDate { get; set; }
|
public double? VerticalResolution { get; set; }
|
||||||
[DisplayName("Vertical resolution")]
|
[DisplayName("White balance")]
|
||||||
public double? VerticalResolution { get; set; }
|
public WhiteBalance? WhiteBalance { get; set; }
|
||||||
[DisplayName("White balance")]
|
public string OriginalExtension { get; set; }
|
||||||
public WhiteBalance? WhiteBalance { get; set; }
|
|
||||||
public string OriginalExtension { get; set; }
|
|
||||||
|
|
||||||
public virtual ApplicationUser User { get; set; }
|
public virtual ApplicationUser User { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual License License { get; set; }
|
public virtual License License { get; set; }
|
||||||
|
|
||||||
public int LicenseId { get; set; }
|
public int LicenseId { get; set; }
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,37 +27,36 @@ using System;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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 string Author { get; set; }
|
public ColorSpace? ColorSpace { get; set; }
|
||||||
[DisplayName("Color space")]
|
[DisplayName("User comments")]
|
||||||
public ColorSpace? ColorSpace { get; set; }
|
public string Comments { get; set; }
|
||||||
[DisplayName("User comments")]
|
[DisplayName("Date and time of digitizing")]
|
||||||
public string Comments { get; set; }
|
public DateTime? CreationDate { get; set; }
|
||||||
[DisplayName("Date and time of digitizing")]
|
[DisplayName("Exif version")]
|
||||||
public DateTime? CreationDate { get; set; }
|
public string ExifVersion { get; set; }
|
||||||
[DisplayName("Exif version")]
|
[DisplayName("Horizontal resolution")]
|
||||||
public string ExifVersion { get; set; }
|
public double? HorizontalResolution { get; set; }
|
||||||
[DisplayName("Horizontal resolution")]
|
[DisplayName("Resolution unit")]
|
||||||
public double? HorizontalResolution { get; set; }
|
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||||
[DisplayName("Resolution unit")]
|
[DisplayName("Scanner manufacturer")]
|
||||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
public string ScannerManufacturer { get; set; }
|
||||||
[DisplayName("Scanner manufacturer")]
|
[DisplayName("Scanner model")]
|
||||||
public string ScannerManufacturer { get; set; }
|
public string ScannerModel { get; set; }
|
||||||
[DisplayName("Scanner model")]
|
[DisplayName("Software used")]
|
||||||
public string ScannerModel { get; set; }
|
public string SoftwareUsed { get; set; }
|
||||||
[DisplayName("Software used")]
|
[Timestamp]
|
||||||
public string SoftwareUsed { get; set; }
|
public DateTime UploadDate { get; set; }
|
||||||
[Timestamp]
|
[DisplayName("Vertical resolution")]
|
||||||
public DateTime UploadDate { get; set; }
|
public double? VerticalResolution { get; set; }
|
||||||
[DisplayName("Vertical resolution")]
|
public string OriginalExtension { get; set; }
|
||||||
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.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual Book Previous { get; set; }
|
public class Book : DocumentBase
|
||||||
public virtual Book Source { get; set; }
|
{
|
||||||
public virtual Book Next { get; set; }
|
[StringLength(13, MinimumLength = 10)]
|
||||||
public virtual Iso31661Numeric Country { get; set; }
|
public string Isbn { get; set; }
|
||||||
public virtual ICollection<Book> Derivates { get; set; }
|
public short? Pages { get; set; }
|
||||||
public virtual ICollection<CompaniesByBook> Companies { get; set; }
|
public int? Edition { get; set; }
|
||||||
public virtual ICollection<PeopleByBook> People { get; set; }
|
public long? PreviousId { get; set; }
|
||||||
public virtual ICollection<BooksByMachine> Machines { get; set; }
|
public long? SourceId { get; set; }
|
||||||
public virtual ICollection<BooksByMachineFamily> MachineFamilies { get; set; }
|
|
||||||
public virtual ICollection<BookScan> Scans { 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;
|
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; }
|
||||||
[Required]
|
public long BookId { get; set; }
|
||||||
public virtual Book Book { get; set; }
|
|
||||||
public long BookId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -23,14 +23,13 @@
|
|||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class BooksByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long BookId { get; set; }
|
|
||||||
public int MachineId { get; set; }
|
|
||||||
|
|
||||||
public virtual Book Book { get; set; }
|
public class BooksByMachine : BaseModel<long>
|
||||||
public virtual Machine Machine { get; set; }
|
{
|
||||||
}
|
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
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class BooksByMachineFamily : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long BookId { get; set; }
|
|
||||||
public int MachineFamilyId { get; set; }
|
|
||||||
|
|
||||||
public virtual Book Book { get; set; }
|
public class BooksByMachineFamily : BaseModel<long>
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
{
|
||||||
}
|
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;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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]
|
||||||
[DisplayName("User agent"), Required, StringLength(128)]
|
[StringLength(128)]
|
||||||
public string UserAgent { get; set; }
|
public string UserAgent { get; set; }
|
||||||
[Required, StringLength(64)]
|
[Required]
|
||||||
public string Browser { get; set; }
|
[StringLength(64)]
|
||||||
[Required, StringLength(16)]
|
public string Browser { get; set; }
|
||||||
public string Version { get; set; }
|
[Required]
|
||||||
[DisplayName("Operating system"), Required, StringLength(32)]
|
[StringLength(16)]
|
||||||
public string Os { get; set; }
|
public string Version { get; set; }
|
||||||
[Required, StringLength(8)]
|
[DisplayName("Operating system")]
|
||||||
public string Platform { get; set; }
|
[Required]
|
||||||
[DisplayName("GIF87"), DefaultValue(false)]
|
[StringLength(32)]
|
||||||
public bool Gif87 { get; set; }
|
public string Os { get; set; }
|
||||||
[DisplayName("GIF89"), DefaultValue(false)]
|
[Required]
|
||||||
public bool Gif89 { get; set; }
|
[StringLength(8)]
|
||||||
[DisplayName("JPEG"), DefaultValue(false)]
|
public string Platform { get; set; }
|
||||||
public bool Jpeg { get; set; }
|
[DisplayName("GIF87")]
|
||||||
[DisplayName("PNG"), DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Png { get; set; }
|
public bool Gif87 { get; set; }
|
||||||
[DisplayName("Transparent PNG"), DefaultValue(false)]
|
[DisplayName("GIF89")]
|
||||||
public bool Pngt { get; set; }
|
[DefaultValue(false)]
|
||||||
[DisplayName("Animated GIF"), DefaultValue(false)]
|
public bool Gif89 { get; set; }
|
||||||
public bool Agif { get; set; }
|
[DisplayName("JPEG")]
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Table { get; set; }
|
public bool Jpeg { get; set; }
|
||||||
[DefaultValue(false)]
|
[DisplayName("PNG")]
|
||||||
public bool Colors { get; set; }
|
[DefaultValue(false)]
|
||||||
[DisplayName("JavaScript"), DefaultValue(false)]
|
public bool Png { get; set; }
|
||||||
public bool Js { get; set; }
|
[DisplayName("Transparent PNG")]
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Frames { get; set; }
|
public bool Pngt { get; set; }
|
||||||
[DefaultValue(false)]
|
[DisplayName("Animated GIF")]
|
||||||
public bool Flash { get; set; }
|
[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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual DocumentCompany Company { get; set; }
|
public class CompaniesByBook : BaseModel<long>
|
||||||
public virtual Book Book { get; set; }
|
{
|
||||||
public virtual DocumentRole Role { get; set; }
|
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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual DocumentCompany Company { get; set; }
|
public class CompaniesByDocument : BaseModel<long>
|
||||||
public virtual Document Document { get; set; }
|
{
|
||||||
public virtual DocumentRole Role { get; set; }
|
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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual DocumentCompany Company { get; set; }
|
public class CompaniesByMagazine : BaseModel<long>
|
||||||
public virtual Magazine Magazine { get; set; }
|
{
|
||||||
public virtual DocumentRole Role { get; set; }
|
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;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public string RoleId { get; set; }
|
public class CompaniesBySoftwareFamily : BaseModel<ulong>
|
||||||
public int CompanyId { get; set; }
|
{
|
||||||
public ulong SoftwareFamilyId { get; set; }
|
[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;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public string RoleId { get; set; }
|
public class CompaniesBySoftwareVariant : BaseModel<ulong>
|
||||||
public int CompanyId { get; set; }
|
{
|
||||||
public ulong SoftwareVariantId { get; set; }
|
[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;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public string RoleId { get; set; }
|
public class CompaniesBySoftwareVersion : BaseModel<ulong>
|
||||||
public int CompanyId { get; set; }
|
{
|
||||||
public ulong SoftwareVersionId { get; set; }
|
[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.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
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>();
|
||||||
Logos = new HashSet<CompanyLogo>();
|
InverseSoldToNavigation = new HashSet<Company>();
|
||||||
Gpus = new HashSet<Gpu>();
|
MachineFamilies = new HashSet<MachineFamily>();
|
||||||
InverseSoldToNavigation = new HashSet<Company>();
|
Machines = new HashSet<Machine>();
|
||||||
MachineFamilies = new HashSet<MachineFamily>();
|
Processors = new HashSet<Processor>();
|
||||||
Machines = new HashSet<Machine>();
|
SoundSynths = new HashSet<SoundSynth>();
|
||||||
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; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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;
|
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; }
|
||||||
[Required]
|
public uint Year { get; set; }
|
||||||
public virtual Iso4217 Currency { get; set; }
|
public float Inflation { get; set; }
|
||||||
public uint Year { get; set; }
|
public string CurrencyCode { get; set; }
|
||||||
public float Inflation { get; set; }
|
|
||||||
public string CurrencyCode { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,21 +26,20 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public string SourceCode { get; set; }
|
public class CurrencyPegging : BaseModel<int>
|
||||||
public string DestinationCode { get; set; }
|
{
|
||||||
}
|
[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;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class Document : DocumentBase
|
|
||||||
{
|
|
||||||
public virtual Iso31661Numeric Country { get; set; }
|
|
||||||
|
|
||||||
public virtual ICollection<PeopleByDocument> People { get; set; }
|
public class Document : DocumentBase
|
||||||
public virtual ICollection<CompaniesByDocument> Companies { get; set; }
|
{
|
||||||
public virtual ICollection<DocumentsByMachine> Machines { get; set; }
|
public virtual Iso31661Numeric Country { get; set; }
|
||||||
public virtual ICollection<DocumentsByMachineFamily> MachineFamilies { get; set; }
|
|
||||||
public virtual ICollection<DocumentScan> Scans { 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;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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; }
|
||||||
[Required]
|
public string NativeTitle { get; set; }
|
||||||
public string Title { get; set; }
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
public string NativeTitle { get; set; }
|
[DataType(DataType.Date)]
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
public DateTime? Published { get; set; }
|
||||||
public DateTime? Published { get; set; }
|
public short? CountryId { get; set; }
|
||||||
public short? CountryId { get; set; }
|
[MaxLength(262144, ErrorMessage = "Synopsis is too long")]
|
||||||
[MaxLength(262144, ErrorMessage = "Synopsis is too long")]
|
public string Synopsis { get; set; }
|
||||||
public string Synopsis { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,18 +27,17 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class DocumentCompany : BaseModel<int>
|
|
||||||
{
|
|
||||||
[Required]
|
|
||||||
public string Name { get; set; }
|
|
||||||
public int? CompanyId { get; set; }
|
|
||||||
|
|
||||||
[DisplayName("Linked company")]
|
public class DocumentCompany : BaseModel<int>
|
||||||
public virtual Company Company { get; set; }
|
{
|
||||||
public virtual ICollection<CompaniesByDocument> Documents { get; set; }
|
[Required]
|
||||||
public virtual ICollection<CompaniesByBook> Books { get; set; }
|
public string Name { get; set; }
|
||||||
public virtual ICollection<CompaniesByMagazine> Magazines { 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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Surname { get; set; }
|
||||||
[Required]
|
public int? PersonId { get; set; }
|
||||||
public string Surname { get; set; }
|
public string Alias { get; set; }
|
||||||
public int? PersonId { get; set; }
|
[DisplayName("Name to be displayed")]
|
||||||
public string Alias { get; set; }
|
public string DisplayName { get; set; }
|
||||||
[DisplayName("Name to be displayed")]
|
|
||||||
public string DisplayName { get; set; }
|
|
||||||
|
|
||||||
[NotMapped, DisplayName("Name")]
|
[NotMapped]
|
||||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
[DisplayName("Name")]
|
||||||
|
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||||
|
|
||||||
[DisplayName("Linked person")]
|
[DisplayName("Linked person")]
|
||||||
public virtual Person Person { get; set; }
|
public virtual Person Person { get; set; }
|
||||||
public virtual ICollection<PeopleByDocument> Documents { get; set; }
|
public virtual ICollection<PeopleByDocument> Documents { get; set; }
|
||||||
public virtual ICollection<PeopleByBook> Books { get; set; }
|
public virtual ICollection<PeopleByBook> Books { get; set; }
|
||||||
public virtual ICollection<PeopleByMagazine> Magazines { get; set; }
|
public virtual ICollection<PeopleByMagazine> Magazines { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,14 +27,15 @@ using System.ComponentModel;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class DocumentRole
|
||||||
{
|
{
|
||||||
public class DocumentRole
|
[Column(TypeName = "char(3)")]
|
||||||
{
|
[Key]
|
||||||
[Column(TypeName = "char(3)"), Key, Required]
|
[Required]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,12 +25,11 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
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; }
|
||||||
[Required]
|
public long DocumentId { get; set; }
|
||||||
public virtual Document Document { get; set; }
|
|
||||||
public long DocumentId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -23,11 +23,10 @@
|
|||||||
// Copyright © 2003-2021 Natalia Portillo
|
// 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
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class DocumentsByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long DocumentId { get; set; }
|
|
||||||
public int MachineId { get; set; }
|
|
||||||
|
|
||||||
public virtual Document Document { get; set; }
|
public class DocumentsByMachine : BaseModel<long>
|
||||||
public virtual Machine Machine { get; set; }
|
{
|
||||||
}
|
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
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class DocumentsByMachineFamily : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long DocumentId { get; set; }
|
|
||||||
public int MachineFamilyId { get; set; }
|
|
||||||
|
|
||||||
public virtual Document Document { get; set; }
|
public class DocumentsByMachineFamily : BaseModel<long>
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
{
|
||||||
}
|
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.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual ApplicationUser User { get; set; }
|
public class Dump : BaseModel<ulong>
|
||||||
public virtual ICollection<DumpHardware> DumpHardware { get; set; }
|
{
|
||||||
public ulong MediaId { get; set; }
|
[Required]
|
||||||
public ulong MediaDumpId { get; set; }
|
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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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)]
|
[StringLength(48)]
|
||||||
public string Manufacturer { get; set; }
|
[Required]
|
||||||
[StringLength(48), Required]
|
public string Model { get; set; }
|
||||||
public string Model { get; set; }
|
[StringLength(48)]
|
||||||
[StringLength(48)]
|
public string Revision { get; set; }
|
||||||
public string Revision { get; set; }
|
[StringLength(32)]
|
||||||
[StringLength(32)]
|
public string Firmware { get; set; }
|
||||||
public string Firmware { get; set; }
|
[StringLength(64)]
|
||||||
[StringLength(64)]
|
public string Serial { get; set; }
|
||||||
public string Serial { get; set; }
|
[StringLength(64)]
|
||||||
[StringLength(64), Required]
|
[Required]
|
||||||
public string SoftwareName { get; set; }
|
public string SoftwareName { get; set; }
|
||||||
[StringLength(32)]
|
[StringLength(32)]
|
||||||
public string SoftwareVersion { get; set; }
|
public string SoftwareVersion { get; set; }
|
||||||
[StringLength(64)]
|
[StringLength(64)]
|
||||||
public string SoftwareOperatingSystem { get; set; }
|
public string SoftwareOperatingSystem { get; set; }
|
||||||
[Required, Column(TypeName = "json")]
|
[Required]
|
||||||
public Extent[] Extents { get; set; }
|
[Column(TypeName = "json")]
|
||||||
[Required]
|
public Extent[] Extents { get; set; }
|
||||||
public virtual Dump Dump { get; set; }
|
[Required]
|
||||||
}
|
public virtual Dump Dump { get; set; }
|
||||||
}
|
}
|
||||||
@@ -23,13 +23,12 @@
|
|||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
// Not for table
|
||||||
|
public class Extent
|
||||||
{
|
{
|
||||||
// Not for table
|
public long Start { get; set; }
|
||||||
public class Extent
|
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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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; }
|
||||||
[Required]
|
[Column(TypeName = "binary(16)")]
|
||||||
public ulong Size { get; set; }
|
public string Md5 { get; set; }
|
||||||
[Column(TypeName = "binary(16)")]
|
[Column(TypeName = "binary(20)")]
|
||||||
public string Md5 { get; set; }
|
public string Sha1 { get; set; }
|
||||||
[Column(TypeName = "binary(20)")]
|
[Column(TypeName = "binary(32)")]
|
||||||
public string Sha1 { get; set; }
|
public string Sha256 { get; set; }
|
||||||
[Column(TypeName = "binary(32)")]
|
[Column(TypeName = "binary(64)")]
|
||||||
public string Sha256 { get; set; }
|
public string Sha3 { get; set; }
|
||||||
[Column(TypeName = "binary(64)")]
|
public string Spamsum { get; set; }
|
||||||
public string Sha3 { get; set; }
|
public string Mime { get; set; }
|
||||||
public string Spamsum { get; set; }
|
public string Magic { get; set; }
|
||||||
public string Mime { get; set; }
|
public string AccoustId { get; set; }
|
||||||
public string Magic { get; set; }
|
[DefaultValue(false)]
|
||||||
public string AccoustId { get; set; }
|
public bool Infected { get; set; }
|
||||||
[DefaultValue(false)]
|
public string Malware { get; set; }
|
||||||
public bool Infected { get; set; }
|
[DefaultValue(false)]
|
||||||
public string Malware { get; set; }
|
public bool Hack { get; set; }
|
||||||
[DefaultValue(false)]
|
public string HackGroup { get; set; }
|
||||||
public bool Hack { get; set; }
|
|
||||||
public string HackGroup { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,16 +25,15 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
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 class FileDataStreamsByMediaFile : BaseModel<ulong>
|
||||||
public ulong MediaFileId { get; set; }
|
{
|
||||||
}
|
[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;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
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 class FileDataStreamsByStandaloneFile : BaseModel<ulong>
|
||||||
public ulong StandaloneFileId { get; set; }
|
{
|
||||||
}
|
[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;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
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 class FilesByFilesystem : BaseModel<ulong>
|
||||||
public ulong FileId { get; set; }
|
{
|
||||||
}
|
[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.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual ICollection<FilesystemsByLogicalPartition> Partitions { get; set; }
|
public class Filesystem : BaseModel<ulong>
|
||||||
public virtual ICollection<FilesystemsByMediaDumpFile> MediaDumpFileImages { get; set; }
|
{
|
||||||
public virtual ICollection<FilesByFilesystem> Files { get; set; }
|
[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;
|
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]
|
[Required]
|
||||||
public virtual Filesystem Filesystem { get; set; }
|
public virtual LogicalPartition Partition { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual LogicalPartition Partition { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,13 +25,12 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
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]
|
[Required]
|
||||||
public virtual Filesystem Filesystem { get; set; }
|
public virtual MediaDumpFileImage MediaDumpFileImage { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual MediaDumpFileImage MediaDumpFileImage { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -23,13 +23,12 @@
|
|||||||
// Copyright © 2003-2021 Natalia Portillo
|
// 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 Browser { get; set; }
|
public string Ip { get; set; }
|
||||||
public string Date { get; set; }
|
public string Referer { 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;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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>();
|
||||||
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; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class GpusByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int GpuId { get; set; }
|
|
||||||
public int MachineId { get; set; }
|
|
||||||
|
|
||||||
[DisplayName("GPU")]
|
public class GpusByMachine : BaseModel<long>
|
||||||
public virtual Gpu Gpu { get; set; }
|
{
|
||||||
public virtual Machine Machine { get; set; }
|
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;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class GpusByOwnedMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int GpuId { get; set; }
|
|
||||||
public long OwnedMachineId { get; set; }
|
|
||||||
|
|
||||||
[DisplayName("GPU")]
|
public class GpusByOwnedMachine : BaseModel<long>
|
||||||
public virtual Gpu Gpu { get; set; }
|
{
|
||||||
public virtual OwnedMachine OwnedMachine { get; set; }
|
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;
|
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]
|
[Required]
|
||||||
public virtual Gpu Gpu { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
[Required]
|
public bool? Minimum { get; set; }
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public bool? Recommended { 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 System.ComponentModel.DataAnnotations;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
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")]
|
[Required]
|
||||||
public string Name { get; set; }
|
[StringLength(45)]
|
||||||
|
[Remote("VerifyUnique", "InstructionSets", "Admin")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<Processor> Processors { get; set; }
|
public virtual ICollection<Processor> Processors { get; set; }
|
||||||
public virtual ICollection<InstructionSetsBySoftwareVariant> Software { get; set; }
|
public virtual ICollection<InstructionSetsBySoftwareVariant> Software { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,20 +28,18 @@ using System.ComponentModel;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
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")]
|
[DisplayName("Name")]
|
||||||
public string Extension { get; set; }
|
[Required]
|
||||||
|
[StringLength(45)]
|
||||||
|
[Remote("VerifyUnique", "InstructionSetExtensions", "Admin")]
|
||||||
|
public string Extension { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor
|
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor { get; set; }
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,16 +25,15 @@
|
|||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual InstructionSetExtension Extension { get; set; }
|
public class InstructionSetExtensionsByProcessor : BaseModel<int>
|
||||||
public virtual Processor Processor { get; set; }
|
{
|
||||||
}
|
[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;
|
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]
|
[Required]
|
||||||
public virtual InstructionSet InstructionSet { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { 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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public DateTime CreatedOn { get; set; }
|
public DateTime CreatedOn { get; set; }
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||||
public DateTime UpdatedOn { get; set; }
|
public DateTime UpdatedOn { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public short Id { get; set; }
|
public short Id { get; set; }
|
||||||
[Required, StringLength(64)]
|
[Required]
|
||||||
public string Name { get; set; }
|
[StringLength(64)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<Company> Companies { get; set; }
|
public virtual ICollection<Company> Companies { get; set; }
|
||||||
public virtual ICollection<Person> People { get; set; }
|
public virtual ICollection<Person> People { get; set; }
|
||||||
public virtual ICollection<Document> Documents { get; set; }
|
public virtual ICollection<Document> Documents { get; set; }
|
||||||
public virtual ICollection<Book> Books { get; set; }
|
public virtual ICollection<Book> Books { get; set; }
|
||||||
public virtual ICollection<Magazine> Magazines { get; set; }
|
public virtual ICollection<Magazine> Magazines { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,23 +27,26 @@ using System;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class Iso4217
|
|
||||||
{
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
public DateTime CreatedOn { get; set; }
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
|
||||||
public DateTime UpdatedOn { get; set; }
|
|
||||||
|
|
||||||
[StringLength(3), Required, Key]
|
public class Iso4217
|
||||||
public string Code { get; set; }
|
{
|
||||||
[Column(TypeName = "smallint(3)"), Required]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public short Numeric { get; set; }
|
public DateTime CreatedOn { get; set; }
|
||||||
public byte? MinorUnits { get; set; }
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||||
[StringLength(150), Required]
|
public DateTime UpdatedOn { get; set; }
|
||||||
public string Name { get; set; }
|
|
||||||
[DataType(DataType.Date)]
|
[StringLength(3)]
|
||||||
public DateTime? Withdrawn { get; set; }
|
[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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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>
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public class Iso639
|
public DateTime CreatedOn { get; set; }
|
||||||
{
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
public DateTime UpdatedOn { get; set; }
|
||||||
public DateTime CreatedOn { get; set; }
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
|
||||||
public DateTime UpdatedOn { get; set; }
|
|
||||||
|
|
||||||
[Column(TypeName = "char(3)"), Key, Required]
|
[Column(TypeName = "char(3)")]
|
||||||
public string Id { get; set; }
|
[Key]
|
||||||
[Column(TypeName = "char(3)")]
|
[Required]
|
||||||
public string Part2B { get; set; }
|
public string Id { get; set; }
|
||||||
[Column(TypeName = "char(3)")]
|
[Column(TypeName = "char(3)")]
|
||||||
public string Part2T { get; set; }
|
public string Part2B { get; set; }
|
||||||
[Column(TypeName = "char(2)")]
|
[Column(TypeName = "char(3)")]
|
||||||
public string Part1 { get; set; }
|
public string Part2T { get; set; }
|
||||||
[Column(TypeName = "char(1)"), Required]
|
[Column(TypeName = "char(2)")]
|
||||||
public string Scope { get; set; }
|
public string Part1 { get; set; }
|
||||||
[Column(TypeName = "char(1)"), Required]
|
[Column(TypeName = "char(1)")]
|
||||||
public string Type { get; set; }
|
[Required]
|
||||||
[Column(TypeName = "varchar(150)"), Required]
|
public string Scope { get; set; }
|
||||||
public string ReferenceName { get; set; }
|
[Column(TypeName = "char(1)")]
|
||||||
[Column(TypeName = "varchar(150)")]
|
[Required]
|
||||||
public string Comment { get; set; }
|
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;
|
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]
|
[Required]
|
||||||
public virtual Iso639 Language { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,24 +28,31 @@ using System.ComponentModel;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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; }
|
||||||
[Required]
|
[DisplayName("SPDX identifier")]
|
||||||
public string Name { get; set; }
|
public string SPDX { get; set; }
|
||||||
[DisplayName("SPDX identifier")]
|
[DisplayName("FSF approved")]
|
||||||
public string SPDX { get; set; }
|
[Required]
|
||||||
[DisplayName("FSF approved"), Required, DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool FsfApproved { get; set; }
|
public bool FsfApproved { get; set; }
|
||||||
[DisplayName("OSI approved"), Required, DefaultValue(false)]
|
[DisplayName("OSI approved")]
|
||||||
public bool OsiApproved { get; set; }
|
[Required]
|
||||||
[DisplayName("License text link"), StringLength(512), Url]
|
[DefaultValue(false)]
|
||||||
public string Link { get; set; }
|
public bool OsiApproved { get; set; }
|
||||||
[DisplayName("License text"), Column(TypeName = "longtext"), StringLength(131072),
|
[DisplayName("License text link")]
|
||||||
DataType(DataType.MultilineText)]
|
[StringLength(512)]
|
||||||
public string Text { get; set; }
|
[Url]
|
||||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
public string Link { get; set; }
|
||||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { 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
|
// 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 Browser { get; set; }
|
public string Date { get; set; }
|
||||||
public string Ip { get; set; }
|
public string Referer { get; set; }
|
||||||
public string Date { get; set; }
|
|
||||||
public string Referer { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,21 +26,20 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual ICollection<FilesystemsByLogicalPartition> Filesystems { get; set; }
|
public class LogicalPartition : BaseModel<ulong>
|
||||||
public virtual ICollection<LogicalPartitionsByMedia> Media { get; set; }
|
{
|
||||||
}
|
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;
|
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]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual LogicalPartition Partition { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual LogicalPartition Partition { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,43 +27,44 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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>();
|
||||||
Gpus = new HashSet<GpusByMachine>();
|
Processors = new HashSet<ProcessorsByMachine>();
|
||||||
Memory = new HashSet<MemoryByMachine>();
|
Sound = new HashSet<SoundByMachine>();
|
||||||
Processors = new HashSet<ProcessorsByMachine>();
|
Storage = new HashSet<StorageByMachine>();
|
||||||
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; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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;
|
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]
|
[Required]
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,21 +26,21 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
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; }
|
public int CompanyId { get; set; }
|
||||||
[Required, StringLength(255)]
|
[Required]
|
||||||
public string Name { get; set; }
|
[StringLength(255)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
public virtual Company Company { get; set; }
|
public virtual Company Company { get; set; }
|
||||||
public virtual ICollection<Machine> Machines { get; set; }
|
public virtual ICollection<Machine> Machines { get; set; }
|
||||||
public virtual ICollection<DocumentsByMachineFamily> Documents { get; set; }
|
public virtual ICollection<DocumentsByMachineFamily> Documents { get; set; }
|
||||||
public virtual ICollection<BooksByMachineFamily> Books { get; set; }
|
public virtual ICollection<BooksByMachineFamily> Books { get; set; }
|
||||||
public virtual ICollection<MagazinesByMachineFamily> Magazines { get; set; }
|
public virtual ICollection<MagazinesByMachineFamily> Magazines { get; set; }
|
||||||
public virtual ICollection<MachineFamiliesBySoftwareVariant> Software { get; set; }
|
public virtual ICollection<MachineFamiliesBySoftwareVariant> Software { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,15 +25,14 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
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;
|
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]
|
[Required]
|
||||||
public virtual Machine Machine { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,17 +27,17 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual Iso31661Numeric Country { get; set; }
|
public class Magazine : DocumentBase
|
||||||
public virtual ICollection<MagazineIssue> Issues { get; set; }
|
{
|
||||||
public virtual ICollection<CompaniesByMagazine> Companies { get; set; }
|
[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.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual Magazine Magazine { get; set; }
|
public class MagazineIssue : BaseModel<long>
|
||||||
public virtual ICollection<PeopleByMagazine> People { get; set; }
|
{
|
||||||
public virtual ICollection<MagazinesByMachine> Machines { get; set; }
|
[Required]
|
||||||
public virtual ICollection<MagazinesByMachineFamily> MachineFamilies { get; set; }
|
public long MagazineId { get; set; }
|
||||||
public virtual ICollection<Media> Coverdiscs { get; set; }
|
[Required]
|
||||||
public virtual ICollection<MagazineScan> Scans { get; set; }
|
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;
|
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; }
|
||||||
[Required]
|
public long MagazineId { get; set; }
|
||||||
public virtual MagazineIssue Magazine { get; set; }
|
|
||||||
public long MagazineId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -23,14 +23,13 @@
|
|||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class MagazinesByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long MagazineId { get; set; }
|
|
||||||
public int MachineId { get; set; }
|
|
||||||
|
|
||||||
public virtual MagazineIssue Magazine { get; set; }
|
public class MagazinesByMachine : BaseModel<long>
|
||||||
public virtual Machine Machine { get; set; }
|
{
|
||||||
}
|
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
|
// Copyright © 2003-2021 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
{
|
|
||||||
public class MagazinesByMachineFamily : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long MagazineId { get; set; }
|
|
||||||
public int MachineFamilyId { get; set; }
|
|
||||||
|
|
||||||
public virtual MagazineIssue Magazine { get; set; }
|
public class MagazinesByMachineFamily : BaseModel<long>
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
{
|
||||||
}
|
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;
|
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 int Id { get; set; }
|
public DateTimeOffset? Updated { get; set; }
|
||||||
public int Version { get; set; }
|
|
||||||
public DateTimeOffset? Updated { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
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 MasteringTextType Type { get; set; }
|
public string Text { get; set; }
|
||||||
[Required]
|
public short? Side { get; set; }
|
||||||
public string Text { get; set; }
|
public short? Layer { get; set; }
|
||||||
public short? Side { get; set; }
|
[Required]
|
||||||
public short? Layer { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual Media Media { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,44 +28,43 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Aaru.CommonTypes;
|
using Aaru.CommonTypes;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
|
public class Media : BaseModel<ulong>
|
||||||
public virtual ICollection<MediaDump> MediaDumps { get; set; }
|
{
|
||||||
public virtual ICollection<Dump> Dumps { get; set; }
|
[Required]
|
||||||
public virtual ICollection<MediaBySoftwareVariant> Software { get; set; }
|
public string Title { get; set; }
|
||||||
public virtual ICollection<MasteringText> MasteringTexts { 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;
|
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]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
[Required]
|
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,20 +26,19 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual ICollection<MediaDumpFileImage> Files { get; set; }
|
public class MediaDump : BaseModel<ulong>
|
||||||
public virtual MediaDumpImage Image { get; set; }
|
{
|
||||||
public virtual MediaDumpSubchannelImage Subchannel { get; set; }
|
[Required]
|
||||||
public virtual ICollection<MediaDumpTrackImage> Tracks { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
public virtual ICollection<Dump> Dumps { get; set; }
|
public string Format { get; set; }
|
||||||
public virtual ICollection<MediaTagDump> Tags { 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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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 ulong MediaDumpId { get; set; }
|
public virtual MediaDump MediaDump { get; set; }
|
||||||
[Required]
|
public ulong Size { get; set; }
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
[Column(TypeName = "binary(16)")]
|
||||||
public ulong Size { get; set; }
|
public string Md5 { get; set; }
|
||||||
[Column(TypeName = "binary(16)")]
|
[Column(TypeName = "binary(20)")]
|
||||||
public string Md5 { get; set; }
|
public string Sha1 { get; set; }
|
||||||
[Column(TypeName = "binary(20)")]
|
[Column(TypeName = "binary(32)")]
|
||||||
public string Sha1 { get; set; }
|
public string Sha256 { get; set; }
|
||||||
[Column(TypeName = "binary(32)")]
|
[Column(TypeName = "binary(64)")]
|
||||||
public string Sha256 { get; set; }
|
public string Sha3 { get; set; }
|
||||||
[Column(TypeName = "binary(64)")]
|
public string Spamsum { get; set; }
|
||||||
public string Sha3 { get; set; }
|
public string AccoustId { get; set; }
|
||||||
public string Spamsum { get; set; }
|
|
||||||
public string AccoustId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,26 +25,25 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public class MediaDumpSubchannelImage : BaseModel<ulong>
|
||||||
public virtual MediaDumpTrackImage Track { get; set; }
|
{
|
||||||
}
|
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;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public class MediaDumpTrackImage : BaseModel<ulong>
|
||||||
public virtual MediaDumpSubchannelImage Subchannel { get; set; }
|
{
|
||||||
}
|
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;
|
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 System.ComponentModel.DataAnnotations;
|
||||||
using Aaru.CommonTypes.Enums;
|
using Aaru.CommonTypes.Enums;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
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
|
// 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;
|
||||||
using System.ComponentModel;
|
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; }
|
||||||
public DateTime Date { get; set; }
|
[DisplayName("Affected ID")]
|
||||||
public NewsType Type { get; set; }
|
public int AddedId { get; set; }
|
||||||
[DisplayName("Affected ID")]
|
|
||||||
public int AddedId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
using Aaru.CommonTypes.Enums;
|
using Aaru.CommonTypes.Enums;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
// Not for a table
|
||||||
|
public class OpticalDiscTrack
|
||||||
{
|
{
|
||||||
// Not for a table
|
public int TrackNumber { get; set; }
|
||||||
public class OpticalDiscTrack
|
public int SessionNumber { get; set; }
|
||||||
{
|
public long FirstSector { get; set; }
|
||||||
public int TrackNumber { get; set; }
|
public long LastSector { get; set; }
|
||||||
public int SessionNumber { get; set; }
|
public TrackType Type { 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.Collections.Generic;
|
||||||
using System.ComponentModel;
|
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("Acquisition date")]
|
[DisplayName("Date when sold, traded, or otherwise lost")]
|
||||||
public DateTime AcquisitionDate { get; set; }
|
public DateTime? LostDate { get; set; }
|
||||||
[DisplayName("Date when sold, traded, or otherwise lost")]
|
public StatusType Status { get; set; }
|
||||||
public DateTime? LostDate { get; set; }
|
[DisplayName("Last status check date")]
|
||||||
public StatusType Status { get; set; }
|
public DateTime? LastStatusDate { get; set; }
|
||||||
[DisplayName("Last status check date")]
|
[DisplayName("Available for trade or sale")]
|
||||||
public DateTime? LastStatusDate { get; set; }
|
[DefaultValue(false)]
|
||||||
[DisplayName("Available for trade or sale"), DefaultValue(false)]
|
public bool Trade { get; set; }
|
||||||
public bool Trade { get; set; }
|
[DisplayName("Has original boxes")]
|
||||||
[DisplayName("Has original boxes"), DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Boxed { get; set; }
|
public bool Boxed { get; set; }
|
||||||
[DisplayName("Has original manuals"), DefaultValue(false)]
|
[DisplayName("Has original manuals")]
|
||||||
public bool Manuals { get; set; }
|
[DefaultValue(false)]
|
||||||
[DisplayName("Serial number")]
|
public bool Manuals { get; set; }
|
||||||
public string SerialNumber { get; set; }
|
[DisplayName("Serial number")]
|
||||||
[DisplayName("Serial number visible to other users"), DefaultValue(false)]
|
public string SerialNumber { get; set; }
|
||||||
public bool SerialNumberVisible { get; set; }
|
[DisplayName("Serial number visible to other users")]
|
||||||
public int MachineId { get; set; }
|
[DefaultValue(false)]
|
||||||
public string UserId { get; set; }
|
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<GpusByOwnedMachine> Gpus { get; set; }
|
||||||
public virtual ICollection<MemoryByOwnedMachine> Memory { get; set; }
|
public virtual ICollection<MemoryByOwnedMachine> Memory { get; set; }
|
||||||
public virtual ICollection<ProcessorsByOwnedMachine> Processors { get; set; }
|
public virtual ICollection<ProcessorsByOwnedMachine> Processors { get; set; }
|
||||||
public virtual ICollection<SoundByOwnedMachine> Sound { get; set; }
|
public virtual ICollection<SoundByOwnedMachine> Sound { get; set; }
|
||||||
public virtual ICollection<StorageByOwnedMachine> Storage { get; set; }
|
public virtual ICollection<StorageByOwnedMachine> Storage { get; set; }
|
||||||
public virtual ICollection<OwnedMachinePhoto> Photos { get; set; }
|
public virtual ICollection<OwnedMachinePhoto> Photos { get; set; }
|
||||||
|
|
||||||
public virtual ApplicationUser User { get; set; }
|
public virtual ApplicationUser User { get; set; }
|
||||||
public virtual Machine Machine { get; set; }
|
public virtual Machine Machine { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -23,11 +23,10 @@
|
|||||||
// Copyright © 2003-2021 Natalia Portillo
|
// 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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual DocumentPerson Person { get; set; }
|
public class PeopleByBook : BaseModel<long>
|
||||||
public virtual Book Book { get; set; }
|
{
|
||||||
public virtual DocumentRole Role { get; set; }
|
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;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual Person Person { get; set; }
|
public class PeopleByCompany : BaseModel<long>
|
||||||
public virtual Company Company { get; set; }
|
{
|
||||||
}
|
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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
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; }
|
|
||||||
|
|
||||||
public virtual DocumentPerson Person { get; set; }
|
public class PeopleByDocument : BaseModel<long>
|
||||||
public virtual Document Document { get; set; }
|
{
|
||||||
public virtual DocumentRole Role { get; set; }
|
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; }
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user