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).
|
||||||
@@ -29,26 +29,35 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace Marechai.Database
|
namespace Marechai.Database;
|
||||||
|
|
||||||
|
public enum NewsType
|
||||||
{
|
{
|
||||||
public enum NewsType
|
NewComputerInDb = 1,
|
||||||
{
|
NewConsoleInDb = 2,
|
||||||
NewComputerInDb = 1, NewConsoleInDb = 2, NewComputerInCollection = 3,
|
NewComputerInCollection = 3,
|
||||||
NewConsoleInCollection = 4, UpdatedComputerInDb = 5, UpdatedConsoleInDb = 6,
|
NewConsoleInCollection = 4,
|
||||||
UpdatedComputerInCollection = 7, UpdatedConsoleInCollection = 8, NewMoneyDonation = 9
|
UpdatedComputerInDb = 5,
|
||||||
}
|
UpdatedConsoleInDb = 6,
|
||||||
|
UpdatedComputerInCollection = 7,
|
||||||
|
UpdatedConsoleInCollection = 8,
|
||||||
|
NewMoneyDonation = 9
|
||||||
|
}
|
||||||
|
|
||||||
public enum StatusType
|
public enum StatusType
|
||||||
{
|
{
|
||||||
[Display(Name = "Unknown")]
|
[Display(Name = "Unknown")]
|
||||||
Unknown = 0, [Display(Name = "Tested good")]
|
Unknown = 0,
|
||||||
TestedGood = 1, [Display(Name = "Not tested")]
|
[Display(Name = "Tested good")]
|
||||||
NotTested = 2, [Display(Name = "Tested bad")]
|
TestedGood = 1,
|
||||||
|
[Display(Name = "Not tested")]
|
||||||
|
NotTested = 2,
|
||||||
|
[Display(Name = "Tested bad")]
|
||||||
TestedBad = 3
|
TestedBad = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum CompanyStatus
|
public enum CompanyStatus
|
||||||
{
|
{
|
||||||
/// <summary>Status is unknown or not set</summary>
|
/// <summary>Status is unknown or not set</summary>
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
/// <summary>Company is still existing</summary>
|
/// <summary>Company is still existing</summary>
|
||||||
@@ -63,20 +72,20 @@ namespace Marechai.Database
|
|||||||
Defunct = 5,
|
Defunct = 5,
|
||||||
/// <summary>Company renamed possibly with a change of intentions</summary>
|
/// <summary>Company renamed possibly with a change of intentions</summary>
|
||||||
Renamed = 6
|
Renamed = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum MachineType
|
public enum MachineType
|
||||||
{
|
{
|
||||||
/// <summary>Unknown machine type, should not happen</summary>
|
/// <summary>Unknown machine type, should not happen</summary>
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
/// <summary>Computer</summary>
|
/// <summary>Computer</summary>
|
||||||
Computer = 1,
|
Computer = 1,
|
||||||
/// <summary>Videogame console</summary>
|
/// <summary>Videogame console</summary>
|
||||||
Console = 2
|
Console = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum MemoryType
|
public enum MemoryType
|
||||||
{
|
{
|
||||||
/// <summary>Unknown memory type</summary>
|
/// <summary>Unknown memory type</summary>
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
/// <summary>Dynamic RAM</summary>
|
/// <summary>Dynamic RAM</summary>
|
||||||
@@ -145,10 +154,10 @@ namespace Marechai.Database
|
|||||||
Twistor = 32,
|
Twistor = 32,
|
||||||
/// <summary>Bubble memory</summary>
|
/// <summary>Bubble memory</summary>
|
||||||
Bubble = 33
|
Bubble = 33
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum MemoryUsage
|
public enum MemoryUsage
|
||||||
{
|
{
|
||||||
/// <summary>Unknown usage</summary>
|
/// <summary>Unknown usage</summary>
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -180,10 +189,10 @@ namespace Marechai.Database
|
|||||||
/// synthesizers
|
/// synthesizers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Unified = 10
|
Unified = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum StorageType
|
public enum StorageType
|
||||||
{
|
{
|
||||||
/// <summary>Contains an empty interface for user connection</summary>
|
/// <summary>Contains an empty interface for user connection</summary>
|
||||||
Empty = -1,
|
Empty = -1,
|
||||||
/// <summary>Unknown</summary>
|
/// <summary>Unknown</summary>
|
||||||
@@ -231,15 +240,22 @@ namespace Marechai.Database
|
|||||||
/// <summary>Pioneer LaserDisc</summary>
|
/// <summary>Pioneer LaserDisc</summary>
|
||||||
LD = 21,
|
LD = 21,
|
||||||
/// <summary>Pioneer LaserDisc data</summary>
|
/// <summary>Pioneer LaserDisc data</summary>
|
||||||
LDROM = 22, LDROM2 = 23, LVROM = 24, MegaLD = 254,
|
LDROM = 22,
|
||||||
|
LDROM2 = 23,
|
||||||
|
LVROM = 24,
|
||||||
|
MegaLD = 254,
|
||||||
/// <summary>Sony Hi-MD</summary>
|
/// <summary>Sony Hi-MD</summary>
|
||||||
HiMD = 26,
|
HiMD = 26,
|
||||||
/// <summary>Sony MiniDisc</summary>
|
/// <summary>Sony MiniDisc</summary>
|
||||||
MD = 27, MDData = 28, MDData2 = 29,
|
MD = 27,
|
||||||
|
MDData = 28,
|
||||||
|
MDData2 = 29,
|
||||||
/// <summary>5.25", Phase-Change, 1834348 sectors, 8192 bytes/sector, Ultra Density Optical, ECMA-350, ISO 17345</summary>
|
/// <summary>5.25", Phase-Change, 1834348 sectors, 8192 bytes/sector, Ultra Density Optical, ECMA-350, ISO 17345</summary>
|
||||||
UDO = 30,
|
UDO = 30,
|
||||||
/// <summary>5.25", Phase-Change, 3669724 sectors, 8192 bytes/sector, Ultra Density Optical 2, ECMA-380, ISO 11976</summary>
|
/// <summary>5.25", Phase-Change, 3669724 sectors, 8192 bytes/sector, Ultra Density Optical 2, ECMA-380, ISO 11976</summary>
|
||||||
UDO2 = 31, PlayStationMemoryCard = 32, PlayStationMemoryCard2 = 33,
|
UDO2 = 31,
|
||||||
|
PlayStationMemoryCard = 32,
|
||||||
|
PlayStationMemoryCard2 = 33,
|
||||||
/// <summary>Sony PlayStation game CD</summary>
|
/// <summary>Sony PlayStation game CD</summary>
|
||||||
PS1CD = 34,
|
PS1CD = 34,
|
||||||
/// <summary>Sony PlayStation 2 game CD</summary>
|
/// <summary>Sony PlayStation 2 game CD</summary>
|
||||||
@@ -267,7 +283,8 @@ namespace Marechai.Database
|
|||||||
/// <summary>Sega Saturn disc</summary>
|
/// <summary>Sega Saturn disc</summary>
|
||||||
SATURNCD = 46,
|
SATURNCD = 46,
|
||||||
/// <summary>Sega/Yamaha Gigabyte Disc</summary>
|
/// <summary>Sega/Yamaha Gigabyte Disc</summary>
|
||||||
GDROM = 47, SegaCard = 48,
|
GDROM = 47,
|
||||||
|
SegaCard = 48,
|
||||||
/// <summary>PC-Engine / TurboGrafx cartridge</summary>
|
/// <summary>PC-Engine / TurboGrafx cartridge</summary>
|
||||||
HuCard = 49,
|
HuCard = 49,
|
||||||
/// <summary>PC-Engine / TurboGrafx CD</summary>
|
/// <summary>PC-Engine / TurboGrafx CD</summary>
|
||||||
@@ -287,256 +304,455 @@ namespace Marechai.Database
|
|||||||
/// <summary>3.5" floppy</summary>
|
/// <summary>3.5" floppy</summary>
|
||||||
Microfloppy = 57,
|
Microfloppy = 57,
|
||||||
/// <summary>5.25", DS, ?D, ?? tracks, ?? spt, 512 bytes/sector, GCR, opposite side heads, aka Twiggy</summary>
|
/// <summary>5.25", DS, ?D, ?? tracks, ?? spt, 512 bytes/sector, GCR, opposite side heads, aka Twiggy</summary>
|
||||||
AppleFileWare = 58, Bernoulli = 59, Bernoulli2 = 60, Ditto = 61,
|
AppleFileWare = 58,
|
||||||
DittoMax = 62, Jaz = 63, Jaz2 = 64,
|
Bernoulli = 59,
|
||||||
PocketZip = 65, REV120 = 66, REV35 = 67,
|
Bernoulli2 = 60,
|
||||||
REV70 = 68, ZIP100 = 69, ZIP250 = 70,
|
Ditto = 61,
|
||||||
ZIP750 = 71, CompactCassette = 72, Data8 = 73,
|
DittoMax = 62,
|
||||||
MiniDV = 74, CFast = 75, CompactFlash = 76,
|
Jaz = 63,
|
||||||
CompactFlashType2 = 77, EZ135 = 78, EZ230 = 79,
|
Jaz2 = 64,
|
||||||
Quest = 80, SparQ = 81, SQ100 = 82,
|
PocketZip = 65,
|
||||||
SQ200 = 83, SQ300 = 84, SQ310 = 85,
|
REV120 = 66,
|
||||||
SQ327 = 86, SQ400 = 87, SQ800 = 88,
|
REV35 = 67,
|
||||||
SQ1500 = 89, SQ2000 = 90, SyJet = 91,
|
REV70 = 68,
|
||||||
FamicomGamePak = 92, GameBoyAdvanceGamePak = 93, GameBoyGamePak = 94,
|
ZIP100 = 69,
|
||||||
GOD = 95, N64DD = 96, N64GamePak = 97,
|
ZIP250 = 70,
|
||||||
NESGamePak = 98, Nintendo3DSGameCard = 99, NintendoDiskCard = 100,
|
ZIP750 = 71,
|
||||||
NintendoDSGameCard = 101, NintendoDSiGameCard = 102, SNESGamePak = 103,
|
CompactCassette = 72,
|
||||||
SNESGamePakUS = 104, WOD = 105, WUOD = 106,
|
Data8 = 73,
|
||||||
SwitchGameCard = 107, MemoryStick = 108, MemoryStickDuo = 109,
|
MiniDV = 74,
|
||||||
MemoryStickMicro = 110, MemoryStickPro = 111, MemoryStickProDuo = 112,
|
CFast = 75,
|
||||||
microSD = 113, miniSD = 114, SecureDigital = 115,
|
CompactFlash = 76,
|
||||||
MMC = 116, MMCmicro = 117, RSMMC = 118,
|
CompactFlashType2 = 77,
|
||||||
MMCplus = 118, MMCmobile = 119, eMMC = 120,
|
EZ135 = 78,
|
||||||
MO120 = 121, MO90 = 122, MO300 = 123,
|
EZ230 = 79,
|
||||||
MO356 = 124, CompactFloppy = 125, DemiDiskette = 126,
|
Quest = 80,
|
||||||
|
SparQ = 81,
|
||||||
|
SQ100 = 82,
|
||||||
|
SQ200 = 83,
|
||||||
|
SQ300 = 84,
|
||||||
|
SQ310 = 85,
|
||||||
|
SQ327 = 86,
|
||||||
|
SQ400 = 87,
|
||||||
|
SQ800 = 88,
|
||||||
|
SQ1500 = 89,
|
||||||
|
SQ2000 = 90,
|
||||||
|
SyJet = 91,
|
||||||
|
FamicomGamePak = 92,
|
||||||
|
GameBoyAdvanceGamePak = 93,
|
||||||
|
GameBoyGamePak = 94,
|
||||||
|
GOD = 95,
|
||||||
|
N64DD = 96,
|
||||||
|
N64GamePak = 97,
|
||||||
|
NESGamePak = 98,
|
||||||
|
Nintendo3DSGameCard = 99,
|
||||||
|
NintendoDiskCard = 100,
|
||||||
|
NintendoDSGameCard = 101,
|
||||||
|
NintendoDSiGameCard = 102,
|
||||||
|
SNESGamePak = 103,
|
||||||
|
SNESGamePakUS = 104,
|
||||||
|
WOD = 105,
|
||||||
|
WUOD = 106,
|
||||||
|
SwitchGameCard = 107,
|
||||||
|
MemoryStick = 108,
|
||||||
|
MemoryStickDuo = 109,
|
||||||
|
MemoryStickMicro = 110,
|
||||||
|
MemoryStickPro = 111,
|
||||||
|
MemoryStickProDuo = 112,
|
||||||
|
microSD = 113,
|
||||||
|
miniSD = 114,
|
||||||
|
SecureDigital = 115,
|
||||||
|
MMC = 116,
|
||||||
|
MMCmicro = 117,
|
||||||
|
RSMMC = 118,
|
||||||
|
MMCplus = 118,
|
||||||
|
MMCmobile = 119,
|
||||||
|
eMMC = 120,
|
||||||
|
MO120 = 121,
|
||||||
|
MO90 = 122,
|
||||||
|
MO300 = 123,
|
||||||
|
MO356 = 124,
|
||||||
|
CompactFloppy = 125,
|
||||||
|
DemiDiskette = 126,
|
||||||
/// <summary>3.5", 652 tracks, 2 sides, 512 bytes/sector, Floptical, ECMA-207, ISO 14169</summary>
|
/// <summary>3.5", 652 tracks, 2 sides, 512 bytes/sector, Floptical, ECMA-207, ISO 14169</summary>
|
||||||
Floptical = 127, HiFD = 128, QuickDisk = 129, UHD144 = 130,
|
Floptical = 127,
|
||||||
VideoFloppy = 131, Wafer = 132, ZXMicrodrive = 133,
|
HiFD = 128,
|
||||||
BeeCard = 134, Borsu = 135, DataStore = 136,
|
QuickDisk = 129,
|
||||||
MiniCard = 137, Orb = 138, Orb5 = 139,
|
UHD144 = 130,
|
||||||
SmartMedia = 140, xD = 141, XQD = 142,
|
VideoFloppy = 131,
|
||||||
DataPlay = 143, LS120 = 144, LS240 = 145,
|
Wafer = 132,
|
||||||
FD32MB = 146, RDX = 147, PunchedCard = 148
|
ZXMicrodrive = 133,
|
||||||
}
|
BeeCard = 134,
|
||||||
|
Borsu = 135,
|
||||||
public enum StorageInterface
|
DataStore = 136,
|
||||||
{
|
MiniCard = 137,
|
||||||
Unknown = 0, ACSI = 1, ATA = 2,
|
Orb = 138,
|
||||||
XTA = 3, ESDI = 4, SCSI = 5,
|
Orb5 = 139,
|
||||||
USB = 6, FireWire = 7, SASI = 8,
|
SmartMedia = 140,
|
||||||
ST506 = 9, IPI = 10, SMD = 11,
|
xD = 141,
|
||||||
SATA = 12, SSA = 13, DSSI = 14,
|
XQD = 142,
|
||||||
HIPPI = 15, SAS = 16, FC = 17,
|
DataPlay = 143,
|
||||||
PCIe = 18, M2 = 19, SataExpress = 20
|
LS120 = 144,
|
||||||
}
|
LS240 = 145,
|
||||||
|
FD32MB = 146,
|
||||||
public enum ColorSpace : ushort
|
RDX = 147,
|
||||||
{
|
PunchedCard = 148
|
||||||
[Display(Name = "sRGB")]
|
}
|
||||||
Srgb = 1, [Display(Name = "Adobe RGB")]
|
|
||||||
AdobeRgb = 2, [Display(Name = "Wide Gamut RGB")]
|
public enum StorageInterface
|
||||||
WideGamutRgb = 4093, [Display(Name = "ICC Profile")]
|
{
|
||||||
IccProfile = 65534, [Display(Name = "Uncalibrated")]
|
Unknown = 0,
|
||||||
Uncalibrated = 65535
|
ACSI = 1,
|
||||||
}
|
ATA = 2,
|
||||||
|
XTA = 3,
|
||||||
public enum Contrast : ushort
|
ESDI = 4,
|
||||||
{
|
SCSI = 5,
|
||||||
Normal = 0, Low = 1, High = 2
|
USB = 6,
|
||||||
}
|
FireWire = 7,
|
||||||
|
SASI = 8,
|
||||||
public enum ExposureMode : ushort
|
ST506 = 9,
|
||||||
{
|
IPI = 10,
|
||||||
Auto = 0, Manual = 1, [Display(Name = "Auto bracket")]
|
SMD = 11,
|
||||||
AutoBracket = 2
|
SATA = 12,
|
||||||
}
|
SSA = 13,
|
||||||
|
DSSI = 14,
|
||||||
public enum ExposureProgram : ushort
|
HIPPI = 15,
|
||||||
{
|
SAS = 16,
|
||||||
[Display(Name = "Not Defined")]
|
FC = 17,
|
||||||
Undefined = 0, [Display(Name = "Manual")]
|
PCIe = 18,
|
||||||
Manual = 1, [Display(Name = "Program AE")]
|
M2 = 19,
|
||||||
ProgramAe = 2, [Display(Name = "Aperture-priority AE")]
|
SataExpress = 20
|
||||||
ApAe = 3, [Display(Name = "Shutter speed priority AE")]
|
}
|
||||||
ShutterAe = 4, [Display(Name = "Creative (Slow speed)")]
|
|
||||||
Creative = 5, [Display(Name = "Action (High speed)")]
|
public enum ColorSpace : ushort
|
||||||
Action = 6, [Display(Name = "Portrait")]
|
{
|
||||||
Portrait = 7, [Display(Name = "Landscape")]
|
[Display(Name = "sRGB")]
|
||||||
Landscape = 8, [Display(Name = "Bulb")]
|
Srgb = 1,
|
||||||
Bulb = 9
|
[Display(Name = "Adobe RGB")]
|
||||||
}
|
AdobeRgb = 2,
|
||||||
|
[Display(Name = "Wide Gamut RGB")]
|
||||||
public enum Flash : ushort
|
WideGamutRgb = 4093,
|
||||||
{
|
[Display(Name = "ICC Profile")]
|
||||||
[Display(Name = "No Flash")]
|
IccProfile = 65534,
|
||||||
None = 0, [Display(Name = "Fired")]
|
[Display(Name = "Uncalibrated")]
|
||||||
Fired = 1, [Display(Name = "Fired, Return not detected")]
|
Uncalibrated = 65535
|
||||||
FiredNoReturn = 5, [Display(Name = "Fired, Return detected")]
|
}
|
||||||
FiredReturn = 7, [Display(Name = "On, Did not fire")]
|
|
||||||
OnDidNotFire = 8, [Display(Name = "On, Fired")]
|
public enum Contrast : ushort
|
||||||
OnFired = 9, [Display(Name = "On, Return not detected")]
|
{
|
||||||
OnNoReturn = 13, [Display(Name = "On, Return detected")]
|
Normal = 0,
|
||||||
OnReturn = 15, [Display(Name = "Off, Did not fire")]
|
Low = 1,
|
||||||
OffDidNotFire = 16, [Display(Name = "Off, Did not fire, Return not detected")]
|
High = 2
|
||||||
OffDidNotFireNoReturn = 20, [Display(Name = "Auto, Did not fire")]
|
}
|
||||||
AutoDidNotFire = 24, [Display(Name = "Auto, Fired")]
|
|
||||||
AutoFired = 25, [Display(Name = "Auto, Fired, Return not detected")]
|
public enum ExposureMode : ushort
|
||||||
AutoFiredNoReturn = 29, [Display(Name = "Auto, Fired, Return detected")]
|
{
|
||||||
AutoFiredReturn = 31, [Display(Name = "No flash function")]
|
Auto = 0,
|
||||||
NoFlash = 32, [Display(Name = "Off, No flash function")]
|
Manual = 1,
|
||||||
OffNoFlash = 48, [Display(Name = "Fired, Red-eye reduction")]
|
[Display(Name = "Auto bracket")]
|
||||||
FiredRedEye = 65, [Display(Name = "Fired, Red-eye reduction, Return not detected")]
|
AutoBracket = 2
|
||||||
FiredRedEyeNoReturn = 69, [Display(Name = "Fired, Red-eye reduction, Return detected")]
|
}
|
||||||
FiredRedEyeReturn = 71, [Display(Name = "On, Red-eye reduction")]
|
|
||||||
OnRedEye = 73, [Display(Name = "On, Red-eye reduction, Return not detected")]
|
public enum ExposureProgram : ushort
|
||||||
OnRedEyeNoReturn = 77, [Display(Name = "On, Red-eye reduction, Return detected")]
|
{
|
||||||
OnRedEyeReturn = 79, [Display(Name = "Off, Red-eye reduction")]
|
[Display(Name = "Not Defined")]
|
||||||
OffRedEye = 80, [Display(Name = "Auto, Did not fire, Red-eye reduction")]
|
Undefined = 0,
|
||||||
AutoNotFireRedEye = 88, [Display(Name = "Auto, Fired, Red-eye reduction")]
|
[Display(Name = "Manual")]
|
||||||
AutoFiredRedEye = 89, [Display(Name = "Auto, Fired, Red-eye reduction, Return not detected")]
|
Manual = 1,
|
||||||
AutoFiredRedEyeNoReturn = 93, [Display(Name = "Auto, Fired, Red-eye reduction, Return detected")]
|
[Display(Name = "Program AE")]
|
||||||
AutoFiredRedEyeReturn = 95
|
ProgramAe = 2,
|
||||||
}
|
[Display(Name = "Aperture-priority AE")]
|
||||||
|
ApAe = 3,
|
||||||
public enum LightSource : ushort
|
[Display(Name = "Shutter speed priority AE")]
|
||||||
{
|
ShutterAe = 4,
|
||||||
[Display(Name = "Unknown")]
|
[Display(Name = "Creative (Slow speed)")]
|
||||||
Unknown = 0, [Display(Name = "Daylight")]
|
Creative = 5,
|
||||||
Daylight = 1, [Display(Name = "Fluorescent")]
|
[Display(Name = "Action (High speed)")]
|
||||||
Fluorescent = 2, [Display(Name = "Tungsten (Incandescent)")]
|
Action = 6,
|
||||||
Incandescent = 3, [Display(Name = "Flash")]
|
[Display(Name = "Portrait")]
|
||||||
Flash = 4, [Display(Name = "Fine Weather")]
|
Portrait = 7,
|
||||||
FineWeather = 9, [Display(Name = "Cloudy")]
|
[Display(Name = "Landscape")]
|
||||||
Cloudy = 10, [Display(Name = "Shade")]
|
Landscape = 8,
|
||||||
Shade = 11, [Display(Name = "Daylight Fluorescent")]
|
[Display(Name = "Bulb")]
|
||||||
DaylightFluorescent = 12, [Display(Name = "Day White Fluorescent")]
|
Bulb = 9
|
||||||
DayWhiteFluorescent = 13, [Display(Name = "Cool White Fluorescent")]
|
}
|
||||||
CoolWhiteFluorescent = 14, [Display(Name = "White Fluorescent")]
|
|
||||||
WhiteFluorescent = 15, [Display(Name = "Warm White Fluorescent")]
|
public enum Flash : ushort
|
||||||
WarmWhiteFluorescent = 16, [Display(Name = "Standard Light A")]
|
{
|
||||||
StandardLightA = 17, [Display(Name = "Standard Light B")]
|
[Display(Name = "No Flash")]
|
||||||
StandardLightB = 18, [Display(Name = "Standard Light C")]
|
None = 0,
|
||||||
StandardLightC = 19, [Display(Name = "D55")]
|
[Display(Name = "Fired")]
|
||||||
D55 = 20, [Display(Name = "D65")]
|
Fired = 1,
|
||||||
D65 = 21, [Display(Name = "D75")]
|
[Display(Name = "Fired, Return not detected")]
|
||||||
D75 = 22, [Display(Name = "D50")]
|
FiredNoReturn = 5,
|
||||||
D50 = 23, [Display(Name = "ISO Studio Tungsten")]
|
[Display(Name = "Fired, Return detected")]
|
||||||
ISOStudioTungsten = 24, [Display(Name = "Other")]
|
FiredReturn = 7,
|
||||||
Other = 255
|
[Display(Name = "On, Did not fire")]
|
||||||
}
|
OnDidNotFire = 8,
|
||||||
|
[Display(Name = "On, Fired")]
|
||||||
public enum MeteringMode : ushort
|
OnFired = 9,
|
||||||
{
|
[Display(Name = "On, Return not detected")]
|
||||||
[Display(Name = "Unknown")]
|
OnNoReturn = 13,
|
||||||
Unknown = 0, [Display(Name = "Average")]
|
[Display(Name = "On, Return detected")]
|
||||||
Average = 1, [Display(Name = "Center-weighted average")]
|
OnReturn = 15,
|
||||||
CenterWeightedAverage = 2, [Display(Name = "Spot")]
|
[Display(Name = "Off, Did not fire")]
|
||||||
Spot = 3, [Display(Name = "Multi-spot")]
|
OffDidNotFire = 16,
|
||||||
MultiSpot = 4, [Display(Name = "Multi-segment")]
|
[Display(Name = "Off, Did not fire, Return not detected")]
|
||||||
MultiSegment = 5, [Display(Name = "Partial")]
|
OffDidNotFireNoReturn = 20,
|
||||||
Partial = 6, [Display(Name = "Other")]
|
[Display(Name = "Auto, Did not fire")]
|
||||||
Other = 255
|
AutoDidNotFire = 24,
|
||||||
}
|
[Display(Name = "Auto, Fired")]
|
||||||
|
AutoFired = 25,
|
||||||
public enum Orientation : ushort
|
[Display(Name = "Auto, Fired, Return not detected")]
|
||||||
{
|
AutoFiredNoReturn = 29,
|
||||||
[Display(Name = "Horizontal (normal)")]
|
[Display(Name = "Auto, Fired, Return detected")]
|
||||||
Horizontal = 1, [Display(Name = "Mirror horizontal")]
|
AutoFiredReturn = 31,
|
||||||
MirrorHorizontal = 2, [Display(Name = "Rotate 180")]
|
[Display(Name = "No flash function")]
|
||||||
Rotate180 = 3, [Display(Name = "Mirror vertical")]
|
NoFlash = 32,
|
||||||
MirrorVertical = 4, [Display(Name = "Mirror horizontal and rotate 270 CW")]
|
[Display(Name = "Off, No flash function")]
|
||||||
MirrorHorizontalAndRotate270CW = 5, [Display(Name = "Rotate 90 CW")]
|
OffNoFlash = 48,
|
||||||
Rotate90CW = 6, [Display(Name = "Mirror horizontal and rotate 90 CW")]
|
[Display(Name = "Fired, Red-eye reduction")]
|
||||||
MirrorHorizontalAndRotate90CW = 7, [Display(Name = "Rotate 270 CW")]
|
FiredRedEye = 65,
|
||||||
Rotate270CW = 8
|
[Display(Name = "Fired, Red-eye reduction, Return not detected")]
|
||||||
}
|
FiredRedEyeNoReturn = 69,
|
||||||
|
[Display(Name = "Fired, Red-eye reduction, Return detected")]
|
||||||
public enum ResolutionUnit : ushort
|
FiredRedEyeReturn = 71,
|
||||||
{
|
[Display(Name = "On, Red-eye reduction")]
|
||||||
None = 1, Inches = 2, Centimeters = 3
|
OnRedEye = 73,
|
||||||
}
|
[Display(Name = "On, Red-eye reduction, Return not detected")]
|
||||||
|
OnRedEyeNoReturn = 77,
|
||||||
public enum Saturation : ushort
|
[Display(Name = "On, Red-eye reduction, Return detected")]
|
||||||
{
|
OnRedEyeReturn = 79,
|
||||||
Normal = 0, Low = 1, High = 2
|
[Display(Name = "Off, Red-eye reduction")]
|
||||||
}
|
OffRedEye = 80,
|
||||||
|
[Display(Name = "Auto, Did not fire, Red-eye reduction")]
|
||||||
public enum SceneCaptureType : ushort
|
AutoNotFireRedEye = 88,
|
||||||
{
|
[Display(Name = "Auto, Fired, Red-eye reduction")]
|
||||||
Standard = 0, Landscape = 1, Portrait = 2,
|
AutoFiredRedEye = 89,
|
||||||
Night = 3
|
[Display(Name = "Auto, Fired, Red-eye reduction, Return not detected")]
|
||||||
}
|
AutoFiredRedEyeNoReturn = 93,
|
||||||
|
[Display(Name = "Auto, Fired, Red-eye reduction, Return detected")]
|
||||||
public enum SensingMethod : ushort
|
AutoFiredRedEyeReturn = 95
|
||||||
{
|
}
|
||||||
[Display(Name = "Not defined")]
|
|
||||||
Undefined = 1, [Display(Name = "One-chip color area")]
|
public enum LightSource : ushort
|
||||||
OneChipColorArea = 2, [Display(Name = "Two-chip color area")]
|
{
|
||||||
TwoChipColorArea = 3, [Display(Name = "Three-chip color area")]
|
[Display(Name = "Unknown")]
|
||||||
ThreeChipColorArea = 4, [Display(Name = "Color sequential area")]
|
Unknown = 0,
|
||||||
ColorSequentialArea = 5, [Display(Name = "Trilinear")]
|
[Display(Name = "Daylight")]
|
||||||
Trilinear = 7, [Display(Name = "Color sequential linear")]
|
Daylight = 1,
|
||||||
ColorSequentialLinear = 8
|
[Display(Name = "Fluorescent")]
|
||||||
}
|
Fluorescent = 2,
|
||||||
|
[Display(Name = "Tungsten (Incandescent)")]
|
||||||
public enum SubjectDistanceRange : ushort
|
Incandescent = 3,
|
||||||
{
|
[Display(Name = "Flash")]
|
||||||
Unknown = 0, Macro = 1, Close = 2,
|
Flash = 4,
|
||||||
Distant = 3
|
[Display(Name = "Fine Weather")]
|
||||||
}
|
FineWeather = 9,
|
||||||
|
[Display(Name = "Cloudy")]
|
||||||
public enum WhiteBalance : ushort
|
Cloudy = 10,
|
||||||
{
|
[Display(Name = "Shade")]
|
||||||
Auto = 0, Manual = 1
|
Shade = 11,
|
||||||
}
|
[Display(Name = "Daylight Fluorescent")]
|
||||||
|
DaylightFluorescent = 12,
|
||||||
public enum Sharpness : ushort
|
[Display(Name = "Day White Fluorescent")]
|
||||||
{
|
DayWhiteFluorescent = 13,
|
||||||
Normal = 0, Low = 1, High = 2
|
[Display(Name = "Cool White Fluorescent")]
|
||||||
}
|
CoolWhiteFluorescent = 14,
|
||||||
|
[Display(Name = "White Fluorescent")]
|
||||||
public enum AuditType : byte
|
WhiteFluorescent = 15,
|
||||||
{
|
[Display(Name = "Warm White Fluorescent")]
|
||||||
None = 0, Created = 1, Updated = 2,
|
WarmWhiteFluorescent = 16,
|
||||||
Deleted = 3
|
[Display(Name = "Standard Light A")]
|
||||||
}
|
StandardLightA = 17,
|
||||||
|
[Display(Name = "Standard Light B")]
|
||||||
[Flags]
|
StandardLightB = 18,
|
||||||
public enum DumpStatus : ulong
|
[Display(Name = "Standard Light C")]
|
||||||
{
|
StandardLightC = 19,
|
||||||
Unknown = 0, Cracked = 1 << 0, Fixed = 1 << 1,
|
[Display(Name = "D55")]
|
||||||
Hacked = 1 << 2, Modified = 1 << 3, Pirated = 1 << 4,
|
D55 = 20,
|
||||||
Trained = 1 << 5, Translated = 1 << 6, Overdumped = 1 << 7,
|
[Display(Name = "D65")]
|
||||||
Underdumped = 1 << 8, Infected = 1 << 9, Damaged = 1 << 10,
|
D65 = 21,
|
||||||
Verified = 1 << 11, MissingData = 1 << 12, MissingNonRequiredData = 1 << 13,
|
[Display(Name = "D75")]
|
||||||
MissingEssentialData = 1 << 14, DamagedSubchannel = 1 << 15
|
D75 = 22,
|
||||||
}
|
[Display(Name = "D50")]
|
||||||
|
D50 = 23,
|
||||||
[Flags]
|
[Display(Name = "ISO Studio Tungsten")]
|
||||||
public enum SubchannelStatus : byte
|
ISOStudioTungsten = 24,
|
||||||
{
|
[Display(Name = "Other")]
|
||||||
None = 0, P = 1 << 0, Q = 1 << 1,
|
Other = 255
|
||||||
R = 1 << 2, S = 1 << 3, T = 1 << 4,
|
}
|
||||||
U = 1 << 5, V = 1 << 6, W = 1 << 7
|
|
||||||
}
|
public enum MeteringMode : ushort
|
||||||
|
{
|
||||||
public enum DistributionMode : uint
|
[Display(Name = "Unknown")]
|
||||||
{
|
Unknown = 0,
|
||||||
Unknown = 0, Retail = 1, Bundle = 2,
|
[Display(Name = "Average")]
|
||||||
Oem = 3
|
Average = 1,
|
||||||
}
|
[Display(Name = "Center-weighted average")]
|
||||||
|
CenterWeightedAverage = 2,
|
||||||
public enum MasteringTextType : byte
|
[Display(Name = "Spot")]
|
||||||
{
|
Spot = 3,
|
||||||
Unknown = 0, LotNumber = 1, MasteringSid = 2,
|
[Display(Name = "Multi-spot")]
|
||||||
MouldSid = 3, MasteringCode = 4, Barcode = 5,
|
MultiSpot = 4,
|
||||||
Toolstamp = 6
|
[Display(Name = "Multi-segment")]
|
||||||
}
|
MultiSegment = 5,
|
||||||
|
[Display(Name = "Partial")]
|
||||||
public enum DocumentScanType : uint
|
Partial = 6,
|
||||||
{
|
[Display(Name = "Other")]
|
||||||
Page = 0, Cover = 1, BackCover = 2,
|
Other = 255
|
||||||
TableOfContents = 3, Index = 4, CopyrightPage = 5
|
}
|
||||||
}
|
|
||||||
|
public enum Orientation : ushort
|
||||||
|
{
|
||||||
|
[Display(Name = "Horizontal (normal)")]
|
||||||
|
Horizontal = 1,
|
||||||
|
[Display(Name = "Mirror horizontal")]
|
||||||
|
MirrorHorizontal = 2,
|
||||||
|
[Display(Name = "Rotate 180")]
|
||||||
|
Rotate180 = 3,
|
||||||
|
[Display(Name = "Mirror vertical")]
|
||||||
|
MirrorVertical = 4,
|
||||||
|
[Display(Name = "Mirror horizontal and rotate 270 CW")]
|
||||||
|
MirrorHorizontalAndRotate270CW = 5,
|
||||||
|
[Display(Name = "Rotate 90 CW")]
|
||||||
|
Rotate90CW = 6,
|
||||||
|
[Display(Name = "Mirror horizontal and rotate 90 CW")]
|
||||||
|
MirrorHorizontalAndRotate90CW = 7,
|
||||||
|
[Display(Name = "Rotate 270 CW")]
|
||||||
|
Rotate270CW = 8
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ResolutionUnit : ushort
|
||||||
|
{
|
||||||
|
None = 1,
|
||||||
|
Inches = 2,
|
||||||
|
Centimeters = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Saturation : ushort
|
||||||
|
{
|
||||||
|
Normal = 0,
|
||||||
|
Low = 1,
|
||||||
|
High = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SceneCaptureType : ushort
|
||||||
|
{
|
||||||
|
Standard = 0,
|
||||||
|
Landscape = 1,
|
||||||
|
Portrait = 2,
|
||||||
|
Night = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SensingMethod : ushort
|
||||||
|
{
|
||||||
|
[Display(Name = "Not defined")]
|
||||||
|
Undefined = 1,
|
||||||
|
[Display(Name = "One-chip color area")]
|
||||||
|
OneChipColorArea = 2,
|
||||||
|
[Display(Name = "Two-chip color area")]
|
||||||
|
TwoChipColorArea = 3,
|
||||||
|
[Display(Name = "Three-chip color area")]
|
||||||
|
ThreeChipColorArea = 4,
|
||||||
|
[Display(Name = "Color sequential area")]
|
||||||
|
ColorSequentialArea = 5,
|
||||||
|
[Display(Name = "Trilinear")]
|
||||||
|
Trilinear = 7,
|
||||||
|
[Display(Name = "Color sequential linear")]
|
||||||
|
ColorSequentialLinear = 8
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SubjectDistanceRange : ushort
|
||||||
|
{
|
||||||
|
Unknown = 0,
|
||||||
|
Macro = 1,
|
||||||
|
Close = 2,
|
||||||
|
Distant = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum WhiteBalance : ushort
|
||||||
|
{
|
||||||
|
Auto = 0,
|
||||||
|
Manual = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Sharpness : ushort
|
||||||
|
{
|
||||||
|
Normal = 0,
|
||||||
|
Low = 1,
|
||||||
|
High = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuditType : byte
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Created = 1,
|
||||||
|
Updated = 2,
|
||||||
|
Deleted = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum DumpStatus : ulong
|
||||||
|
{
|
||||||
|
Unknown = 0,
|
||||||
|
Cracked = 1 << 0,
|
||||||
|
Fixed = 1 << 1,
|
||||||
|
Hacked = 1 << 2,
|
||||||
|
Modified = 1 << 3,
|
||||||
|
Pirated = 1 << 4,
|
||||||
|
Trained = 1 << 5,
|
||||||
|
Translated = 1 << 6,
|
||||||
|
Overdumped = 1 << 7,
|
||||||
|
Underdumped = 1 << 8,
|
||||||
|
Infected = 1 << 9,
|
||||||
|
Damaged = 1 << 10,
|
||||||
|
Verified = 1 << 11,
|
||||||
|
MissingData = 1 << 12,
|
||||||
|
MissingNonRequiredData = 1 << 13,
|
||||||
|
MissingEssentialData = 1 << 14,
|
||||||
|
DamagedSubchannel = 1 << 15
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum SubchannelStatus : byte
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
P = 1 << 0,
|
||||||
|
Q = 1 << 1,
|
||||||
|
R = 1 << 2,
|
||||||
|
S = 1 << 3,
|
||||||
|
T = 1 << 4,
|
||||||
|
U = 1 << 5,
|
||||||
|
V = 1 << 6,
|
||||||
|
W = 1 << 7
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum DistributionMode : uint
|
||||||
|
{
|
||||||
|
Unknown = 0,
|
||||||
|
Retail = 1,
|
||||||
|
Bundle = 2,
|
||||||
|
Oem = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum MasteringTextType : byte
|
||||||
|
{
|
||||||
|
Unknown = 0,
|
||||||
|
LotNumber = 1,
|
||||||
|
MasteringSid = 2,
|
||||||
|
MouldSid = 3,
|
||||||
|
MasteringCode = 4,
|
||||||
|
Barcode = 5,
|
||||||
|
Toolstamp = 6
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum DocumentScanType : uint
|
||||||
|
{
|
||||||
|
Page = 0,
|
||||||
|
Cover = 1,
|
||||||
|
BackCover = 2,
|
||||||
|
TableOfContents = 3,
|
||||||
|
Index = 4,
|
||||||
|
CopyrightPage = 5
|
||||||
}
|
}
|
||||||
@@ -25,11 +25,11 @@
|
|||||||
|
|
||||||
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>
|
|
||||||
public interface IDbCore
|
|
||||||
{
|
|
||||||
/// <summary>Database operations</summary>
|
/// <summary>Database operations</summary>
|
||||||
Operations Operations { get; }
|
Operations Operations { get; }
|
||||||
|
|
||||||
@@ -53,5 +53,4 @@ namespace Marechai.Database
|
|||||||
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,22 +26,22 @@
|
|||||||
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 ROLE_UBERADMIN = "UberAdmin";
|
public const string RoleProofreader = "Proofreader";
|
||||||
public const string ROLE_WRITER = "Writer";
|
public const string RoleTranslator = "Translator";
|
||||||
public const string ROLE_PROOFREADER = "Proofreader";
|
public const string RoleSuperTranslator = "SuperTranslator";
|
||||||
public const string ROLE_TRANSLATOR = "Translator";
|
public const string RoleCollaborator = "Collaborator";
|
||||||
public const string ROLE_SUPERTRANSLATOR = "SuperTranslator";
|
public const string RoleCurator = "Curator";
|
||||||
public const string ROLE_COLLABORATOR = "Collaborator";
|
public const string RolePhysicalCurator = "PhysicalCurator";
|
||||||
public const string ROLE_CURATOR = "Curator";
|
public const string RoleTechnician = "Technician";
|
||||||
public const string ROLE_PHYSICALCURATOR = "PhysicalCurator";
|
public const string RoleSuperTechnician = "SuperTechnician";
|
||||||
public const string ROLE_TECHNICIAN = "Technician";
|
public const string RoleAdmin = "Administrator";
|
||||||
public const string ROLE_SUPERTECHNICIAN = "SuperTechnician";
|
public const string RoleNone = "NormalUser";
|
||||||
public const string ROLE_ADMIN = "Administrator";
|
|
||||||
public const string ROLE_NONE = "NormalUser";
|
|
||||||
|
|
||||||
public ApplicationRole() => Created = DateTime.UtcNow;
|
public ApplicationRole() => Created = DateTime.UtcNow;
|
||||||
|
|
||||||
@@ -59,5 +59,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
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<MachinePhoto> Photos { get; set; }
|
||||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { get; set; }
|
||||||
public virtual ICollection<OwnedMachine> OwnedMachines { get; set; }
|
public virtual ICollection<OwnedMachine> OwnedMachines { get; set; }
|
||||||
@@ -37,5 +37,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<BookScan> BookScans { get; set; }
|
public virtual ICollection<BookScan> BookScans { get; set; }
|
||||||
public virtual ICollection<DocumentScan> DocumentScans { get; set; }
|
public virtual ICollection<DocumentScan> DocumentScans { get; set; }
|
||||||
public virtual ICollection<MagazineScan> MagazineScans { get; set; }
|
public virtual ICollection<MagazineScan> MagazineScans { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@ 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 class Audit : BaseModel<long>
|
|
||||||
{
|
|
||||||
public AuditType Type { get; set; }
|
public AuditType Type { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
@@ -21,5 +21,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual ApplicationUser User { get; set; }
|
public virtual ApplicationUser User { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,15 +28,18 @@ 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), Required]
|
[StringLength(255)]
|
||||||
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required, DefaultValue('/')]
|
[Required]
|
||||||
|
[DefaultValue('/')]
|
||||||
public char PathSeparator { get; set; }
|
public char PathSeparator { get; set; }
|
||||||
public bool IsDirectory { get; set; }
|
public bool IsDirectory { get; set; }
|
||||||
public DateTime? CreationDate { get; set; }
|
public DateTime? CreationDate { get; set; }
|
||||||
@@ -51,5 +54,4 @@ namespace Marechai.Database.Models
|
|||||||
public ulong? UserId { get; set; }
|
public ulong? UserId { get; set; }
|
||||||
public ulong? Inode { get; set; }
|
public ulong? Inode { get; set; }
|
||||||
public ulong? Links { 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 abstract class BaseModel<TKey>
|
|
||||||
{
|
|
||||||
public TKey Id { get; set; }
|
public TKey Id { get; set; }
|
||||||
|
|
||||||
[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; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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 double? Aperture { get; set; }
|
||||||
public string Author { get; set; }
|
public string Author { get; set; }
|
||||||
[DisplayName("Camera manufacturer")]
|
[DisplayName("Camera manufacturer")]
|
||||||
@@ -98,5 +98,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public int LicenseId { get; set; }
|
public int LicenseId { get; set; }
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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; }
|
public string Author { get; set; }
|
||||||
[DisplayName("Color space")]
|
[DisplayName("Color space")]
|
||||||
public ColorSpace? ColorSpace { get; set; }
|
public ColorSpace? ColorSpace { get; set; }
|
||||||
@@ -59,5 +59,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ApplicationUser User { get; set; }
|
public virtual ApplicationUser User { get; set; }
|
||||||
|
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
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
|
||||||
{
|
{
|
||||||
public class Book : DocumentBase
|
|
||||||
{
|
|
||||||
[StringLength(13, MinimumLength = 10)]
|
[StringLength(13, MinimumLength = 10)]
|
||||||
public string Isbn { get; set; }
|
public string Isbn { get; set; }
|
||||||
public short? Pages { get; set; }
|
public short? Pages { get; set; }
|
||||||
@@ -47,5 +47,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<BooksByMachine> Machines { get; set; }
|
public virtual ICollection<BooksByMachine> Machines { get; set; }
|
||||||
public virtual ICollection<BooksByMachineFamily> MachineFamilies { get; set; }
|
public virtual ICollection<BooksByMachineFamily> MachineFamilies { get; set; }
|
||||||
public virtual ICollection<BookScan> Scans { 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]
|
[Required]
|
||||||
public virtual Book Book { get; set; }
|
public virtual Book Book { get; set; }
|
||||||
public long BookId { 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 class BooksByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long BookId { get; set; }
|
public long BookId { get; set; }
|
||||||
public int MachineId { get; set; }
|
public int MachineId { get; set; }
|
||||||
|
|
||||||
public virtual Book Book { get; set; }
|
public virtual Book Book { get; set; }
|
||||||
public virtual Machine Machine { 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 class BooksByMachineFamily : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long BookId { get; set; }
|
public long BookId { get; set; }
|
||||||
public int MachineFamilyId { get; set; }
|
public int MachineFamilyId { get; set; }
|
||||||
|
|
||||||
public virtual Book Book { get; set; }
|
public virtual Book Book { get; set; }
|
||||||
public virtual MachineFamily MachineFamily { 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]
|
||||||
|
[StringLength(64)]
|
||||||
public string Browser { get; set; }
|
public string Browser { get; set; }
|
||||||
[Required, StringLength(16)]
|
[Required]
|
||||||
|
[StringLength(16)]
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
[DisplayName("Operating system"), Required, StringLength(32)]
|
[DisplayName("Operating system")]
|
||||||
|
[Required]
|
||||||
|
[StringLength(32)]
|
||||||
public string Os { get; set; }
|
public string Os { get; set; }
|
||||||
[Required, StringLength(8)]
|
[Required]
|
||||||
|
[StringLength(8)]
|
||||||
public string Platform { get; set; }
|
public string Platform { get; set; }
|
||||||
[DisplayName("GIF87"), DefaultValue(false)]
|
[DisplayName("GIF87")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Gif87 { get; set; }
|
public bool Gif87 { get; set; }
|
||||||
[DisplayName("GIF89"), DefaultValue(false)]
|
[DisplayName("GIF89")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Gif89 { get; set; }
|
public bool Gif89 { get; set; }
|
||||||
[DisplayName("JPEG"), DefaultValue(false)]
|
[DisplayName("JPEG")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Jpeg { get; set; }
|
public bool Jpeg { get; set; }
|
||||||
[DisplayName("PNG"), DefaultValue(false)]
|
[DisplayName("PNG")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Png { get; set; }
|
public bool Png { get; set; }
|
||||||
[DisplayName("Transparent PNG"), DefaultValue(false)]
|
[DisplayName("Transparent PNG")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Pngt { get; set; }
|
public bool Pngt { get; set; }
|
||||||
[DisplayName("Animated GIF"), DefaultValue(false)]
|
[DisplayName("Animated GIF")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Agif { get; set; }
|
public bool Agif { get; set; }
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Table { get; set; }
|
public bool Table { get; set; }
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Colors { get; set; }
|
public bool Colors { get; set; }
|
||||||
[DisplayName("JavaScript"), DefaultValue(false)]
|
[DisplayName("JavaScript")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Js { get; set; }
|
public bool Js { get; set; }
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Frames { get; set; }
|
public bool Frames { get; set; }
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Flash { get; set; }
|
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 class CompaniesByBook : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public long BookId { get; set; }
|
public long BookId { get; set; }
|
||||||
[Column(TypeName = "char(3)"), Required]
|
[Column(TypeName = "char(3)")]
|
||||||
|
[Required]
|
||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
public virtual DocumentCompany Company { get; set; }
|
public virtual DocumentCompany Company { get; set; }
|
||||||
public virtual Book Book { get; set; }
|
public virtual Book Book { get; set; }
|
||||||
public virtual DocumentRole Role { 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 class CompaniesByDocument : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public long DocumentId { get; set; }
|
public long DocumentId { get; set; }
|
||||||
[Column(TypeName = "char(3)"), Required]
|
[Column(TypeName = "char(3)")]
|
||||||
|
[Required]
|
||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
public virtual DocumentCompany Company { get; set; }
|
public virtual DocumentCompany Company { get; set; }
|
||||||
public virtual Document Document { get; set; }
|
public virtual Document Document { get; set; }
|
||||||
public virtual DocumentRole Role { 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 class CompaniesByMagazine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public long MagazineId { get; set; }
|
public long MagazineId { get; set; }
|
||||||
[Column(TypeName = "char(3)"), Required]
|
[Column(TypeName = "char(3)")]
|
||||||
|
[Required]
|
||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
public virtual DocumentCompany Company { get; set; }
|
public virtual DocumentCompany Company { get; set; }
|
||||||
public virtual Magazine Magazine { get; set; }
|
public virtual Magazine Magazine { get; set; }
|
||||||
public virtual DocumentRole Role { get; set; }
|
public virtual DocumentRole Role { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class CompaniesBySoftwareFamily : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class CompaniesBySoftwareFamily : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual DocumentRole Role { get; set; }
|
public virtual DocumentRole Role { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -39,5 +39,4 @@ namespace Marechai.Database.Models
|
|||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public ulong SoftwareFamilyId { get; set; }
|
public ulong SoftwareFamilyId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class CompaniesBySoftwareVariant : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class CompaniesBySoftwareVariant : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Company Company { get; set; }
|
public virtual Company Company { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -39,5 +39,4 @@ namespace Marechai.Database.Models
|
|||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public ulong SoftwareVariantId { get; set; }
|
public ulong SoftwareVariantId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class CompaniesBySoftwareVersion : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class CompaniesBySoftwareVersion : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Company Company { get; set; }
|
public virtual Company Company { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -39,5 +39,4 @@ namespace Marechai.Database.Models
|
|||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public ulong SoftwareVersionId { get; set; }
|
public ulong SoftwareVersionId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -29,10 +29,10 @@ 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>();
|
Logos = new HashSet<CompanyLogo>();
|
||||||
@@ -46,15 +46,18 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true), DataType(DataType.Date)]
|
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Founded { get; set; }
|
public DateTime? Founded { get; set; }
|
||||||
[Url, StringLength(255)]
|
[Url]
|
||||||
|
[StringLength(255)]
|
||||||
public string Website { get; set; }
|
public string Website { get; set; }
|
||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string Twitter { get; set; }
|
public string Twitter { get; set; }
|
||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string Facebook { get; set; }
|
public string Facebook { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Sold { get; set; }
|
public DateTime? Sold { get; set; }
|
||||||
public int? SoldToId { get; set; }
|
public int? SoldToId { get; set; }
|
||||||
[StringLength(80)]
|
[StringLength(80)]
|
||||||
@@ -63,7 +66,8 @@ namespace Marechai.Database.Models
|
|||||||
public string City { get; set; }
|
public string City { get; set; }
|
||||||
[StringLength(80)]
|
[StringLength(80)]
|
||||||
public string Province { get; set; }
|
public string Province { get; set; }
|
||||||
[StringLength(25), DisplayName("Postal code")]
|
[StringLength(25)]
|
||||||
|
[DisplayName("Postal code")]
|
||||||
public string PostalCode { get; set; }
|
public string PostalCode { get; set; }
|
||||||
public short? CountryId { get; set; }
|
public short? CountryId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -96,5 +100,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<CompaniesBySoftwareFamily> SoftwareFamilies { get; set; }
|
public virtual ICollection<CompaniesBySoftwareFamily> SoftwareFamilies { get; set; }
|
||||||
public virtual ICollection<CompaniesBySoftwareVersion> SoftwareVersions { get; set; }
|
public virtual ICollection<CompaniesBySoftwareVersion> SoftwareVersions { get; set; }
|
||||||
public virtual ICollection<CompaniesBySoftwareVariant> SoftwareVariants { 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 class CompanyDescription : BaseModel<int>
|
|
||||||
{
|
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
[MaxLength(262144, ErrorMessage = "Description is too long"), Required]
|
[MaxLength(262144, ErrorMessage = "Description is too long")]
|
||||||
|
[Required]
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
[MaxLength(262144, ErrorMessage = "Description is too long"), DisplayName("HTML")]
|
[MaxLength(262144, ErrorMessage = "Description is too long")]
|
||||||
|
[DisplayName("HTML")]
|
||||||
public string Html { get; set; }
|
public string Html { get; set; }
|
||||||
|
|
||||||
public virtual Company Company { 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 class CompanyLogo : BaseModel<int>
|
|
||||||
{
|
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
[Range(1000, 3000)]
|
[Range(1000, 3000)]
|
||||||
public int? Year { get; set; }
|
public int? Year { get; set; }
|
||||||
public Guid Guid { get; set; }
|
public Guid Guid { get; set; }
|
||||||
|
|
||||||
public virtual Company Company { 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]
|
[Required]
|
||||||
public virtual Iso4217 Currency { get; set; }
|
public virtual Iso4217 Currency { get; set; }
|
||||||
public uint Year { get; set; }
|
public uint Year { get; set; }
|
||||||
public float Inflation { get; set; }
|
public float Inflation { get; set; }
|
||||||
public string CurrencyCode { get; set; }
|
public string CurrencyCode { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
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>
|
||||||
{
|
{
|
||||||
public class CurrencyPegging : BaseModel<int>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Iso4217 Source { get; set; }
|
public virtual Iso4217 Source { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -42,5 +42,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public string SourceCode { get; set; }
|
public string SourceCode { get; set; }
|
||||||
public string DestinationCode { get; set; }
|
public string DestinationCode { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class Document : DocumentBase
|
||||||
{
|
{
|
||||||
public class Document : DocumentBase
|
|
||||||
{
|
|
||||||
public virtual Iso31661Numeric Country { get; set; }
|
public virtual Iso31661Numeric Country { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<PeopleByDocument> People { get; set; }
|
public virtual ICollection<PeopleByDocument> People { get; set; }
|
||||||
@@ -36,5 +36,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<DocumentsByMachine> Machines { get; set; }
|
public virtual ICollection<DocumentsByMachine> Machines { get; set; }
|
||||||
public virtual ICollection<DocumentsByMachineFamily> MachineFamilies { get; set; }
|
public virtual ICollection<DocumentsByMachineFamily> MachineFamilies { get; set; }
|
||||||
public virtual ICollection<DocumentScan> Scans { 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]
|
[Required]
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string NativeTitle { get; set; }
|
public string NativeTitle { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), 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,10 +27,10 @@ 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>
|
||||||
{
|
{
|
||||||
public class DocumentCompany : BaseModel<int>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int? CompanyId { get; set; }
|
public int? CompanyId { get; set; }
|
||||||
@@ -40,5 +40,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<CompaniesByDocument> Documents { get; set; }
|
public virtual ICollection<CompaniesByDocument> Documents { get; set; }
|
||||||
public virtual ICollection<CompaniesByBook> Books { get; set; }
|
public virtual ICollection<CompaniesByBook> Books { get; set; }
|
||||||
public virtual ICollection<CompaniesByMagazine> Magazines { get; set; }
|
public virtual ICollection<CompaniesByMagazine> Magazines { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,10 +28,10 @@ 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]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -41,7 +41,8 @@ namespace Marechai.Database.Models
|
|||||||
[DisplayName("Name to be displayed")]
|
[DisplayName("Name to be displayed")]
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
|
|
||||||
[NotMapped, DisplayName("Name")]
|
[NotMapped]
|
||||||
|
[DisplayName("Name")]
|
||||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||||
|
|
||||||
[DisplayName("Linked person")]
|
[DisplayName("Linked person")]
|
||||||
@@ -49,5 +50,4 @@ namespace Marechai.Database.Models
|
|||||||
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]
|
[Required]
|
||||||
public virtual Document Document { get; set; }
|
public virtual Document Document { get; set; }
|
||||||
public long DocumentId { 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 DocumentScanType Type { get; set; }
|
||||||
public uint? Page { 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 class DocumentsByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long DocumentId { get; set; }
|
public long DocumentId { get; set; }
|
||||||
public int MachineId { get; set; }
|
public int MachineId { get; set; }
|
||||||
|
|
||||||
public virtual Document Document { get; set; }
|
public virtual Document Document { get; set; }
|
||||||
public virtual Machine Machine { 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 class DocumentsByMachineFamily : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long DocumentId { get; set; }
|
public long DocumentId { get; set; }
|
||||||
public int MachineFamilyId { get; set; }
|
public int MachineFamilyId { get; set; }
|
||||||
|
|
||||||
public virtual Document Document { get; set; }
|
public virtual Document Document { get; set; }
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
public virtual MachineFamily MachineFamily { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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>
|
||||||
{
|
{
|
||||||
public class Dump : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Dumper { get; set; }
|
public string Dumper { get; set; }
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
@@ -45,5 +45,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<DumpHardware> DumpHardware { get; set; }
|
public virtual ICollection<DumpHardware> DumpHardware { get; set; }
|
||||||
public ulong MediaId { get; set; }
|
public ulong MediaId { get; set; }
|
||||||
public ulong MediaDumpId { get; set; }
|
public ulong MediaDumpId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,13 +26,14 @@
|
|||||||
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)]
|
[StringLength(48)]
|
||||||
public string Manufacturer { get; set; }
|
public string Manufacturer { get; set; }
|
||||||
[StringLength(48), 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; }
|
||||||
@@ -40,15 +41,16 @@ namespace Marechai.Database.Models
|
|||||||
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), Required]
|
[StringLength(64)]
|
||||||
|
[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]
|
||||||
|
[Column(TypeName = "json")]
|
||||||
public Extent[] Extents { get; set; }
|
public Extent[] Extents { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Dump Dump { get; set; }
|
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 class Extent
|
|
||||||
{
|
|
||||||
public long Start { get; set; }
|
public long Start { get; set; }
|
||||||
public long End { get; set; }
|
public long End { get; set; }
|
||||||
public bool Error { get; set; }
|
public bool Error { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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]
|
[Required]
|
||||||
public ulong Size { get; set; }
|
public ulong Size { get; set; }
|
||||||
[Column(TypeName = "binary(16)")]
|
[Column(TypeName = "binary(16)")]
|
||||||
@@ -51,5 +51,4 @@ namespace Marechai.Database.Models
|
|||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Hack { get; set; }
|
public bool Hack { get; set; }
|
||||||
public string HackGroup { get; set; }
|
public string HackGroup { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class FileDataStream : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class FileDataStream : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[StringLength(255)]
|
[StringLength(255)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public ulong Size { get; set; }
|
public ulong Size { get; set; }
|
||||||
@@ -36,5 +36,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual DbFile File { get; set; }
|
public virtual DbFile File { get; set; }
|
||||||
|
|
||||||
public ulong FileId { get; set; }
|
public ulong FileId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class FileDataStreamsByMediaFile : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class FileDataStreamsByMediaFile : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual FileDataStream FileDataStream { get; set; }
|
public virtual FileDataStream FileDataStream { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -36,5 +36,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public ulong FileDataStreamId { get; set; }
|
public ulong FileDataStreamId { get; set; }
|
||||||
public ulong MediaFileId { get; set; }
|
public ulong MediaFileId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class FileDataStreamsByStandaloneFile : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class FileDataStreamsByStandaloneFile : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual FileDataStream FileDataStream { get; set; }
|
public virtual FileDataStream FileDataStream { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -36,5 +36,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public ulong FileDataStreamId { get; set; }
|
public ulong FileDataStreamId { get; set; }
|
||||||
public ulong StandaloneFileId { get; set; }
|
public ulong StandaloneFileId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class FilesByFilesystem : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class FilesByFilesystem : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Filesystem Filesystem { get; set; }
|
public virtual Filesystem Filesystem { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -36,5 +36,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public ulong FilesystemId { get; set; }
|
public ulong FilesystemId { get; set; }
|
||||||
public ulong FileId { get; set; }
|
public ulong FileId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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>
|
||||||
{
|
{
|
||||||
public class Filesystem : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public DateTime? CreationDate { get; set; }
|
public DateTime? CreationDate { get; set; }
|
||||||
@@ -54,5 +54,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<FilesystemsByLogicalPartition> Partitions { get; set; }
|
public virtual ICollection<FilesystemsByLogicalPartition> Partitions { get; set; }
|
||||||
public virtual ICollection<FilesystemsByMediaDumpFile> MediaDumpFileImages { get; set; }
|
public virtual ICollection<FilesystemsByMediaDumpFile> MediaDumpFileImages { get; set; }
|
||||||
public virtual ICollection<FilesByFilesystem> Files { 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]
|
[Required]
|
||||||
public virtual Filesystem Filesystem { get; set; }
|
public virtual Filesystem Filesystem { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual LogicalPartition Partition { get; set; }
|
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]
|
[Required]
|
||||||
public virtual Filesystem Filesystem { get; set; }
|
public virtual Filesystem Filesystem { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual MediaDumpFileImage MediaDumpFileImage { get; set; }
|
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 Browser { get; set; }
|
||||||
public string Date { get; set; }
|
public string Date { get; set; }
|
||||||
public string Ip { get; set; }
|
public string Ip { get; set; }
|
||||||
public string Referer { get; set; }
|
public string Referer { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,22 +28,25 @@ 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>();
|
GpusByMachine = new HashSet<GpusByMachine>();
|
||||||
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
|
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Required, StringLength(128)]
|
[Required]
|
||||||
|
[StringLength(128)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int? CompanyId { get; set; }
|
public int? CompanyId { get; set; }
|
||||||
[DisplayName("Model code"), StringLength(45)]
|
[DisplayName("Model code")]
|
||||||
|
[StringLength(45)]
|
||||||
public string ModelCode { get; set; }
|
public string ModelCode { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Introduced { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string Package { get; set; }
|
public string Package { get; set; }
|
||||||
@@ -60,5 +63,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
|
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
|
||||||
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
||||||
public virtual ICollection<GpusBySoftwareVariant> Software { 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 class GpusByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int GpuId { get; set; }
|
public int GpuId { get; set; }
|
||||||
public int MachineId { get; set; }
|
public int MachineId { get; set; }
|
||||||
|
|
||||||
[DisplayName("GPU")]
|
[DisplayName("GPU")]
|
||||||
public virtual Gpu Gpu { get; set; }
|
public virtual Gpu Gpu { get; set; }
|
||||||
public virtual Machine Machine { 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 class GpusByOwnedMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int GpuId { get; set; }
|
public int GpuId { get; set; }
|
||||||
public long OwnedMachineId { get; set; }
|
public long OwnedMachineId { get; set; }
|
||||||
|
|
||||||
[DisplayName("GPU")]
|
[DisplayName("GPU")]
|
||||||
public virtual Gpu Gpu { get; set; }
|
public virtual Gpu Gpu { get; set; }
|
||||||
public virtual OwnedMachine OwnedMachine { 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]
|
[Required]
|
||||||
public virtual Gpu Gpu { get; set; }
|
public virtual Gpu Gpu { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
public bool? Minimum { get; set; }
|
public bool? Minimum { get; set; }
|
||||||
public bool? Recommended { 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]
|
||||||
|
[StringLength(45)]
|
||||||
|
[Remote("VerifyUnique", "InstructionSets", "Admin")]
|
||||||
public string Name { get; set; }
|
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() =>
|
public InstructionSetExtension() =>
|
||||||
InstructionSetExtensionsByProcessor = new HashSet<InstructionSetExtensionsByProcessor>();
|
InstructionSetExtensionsByProcessor = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||||
|
|
||||||
[DisplayName("Name"), Required, StringLength(45), Remote("VerifyUnique", "InstructionSetExtensions", "Admin")]
|
[DisplayName("Name")]
|
||||||
|
[Required]
|
||||||
|
[StringLength(45)]
|
||||||
|
[Remote("VerifyUnique", "InstructionSetExtensions", "Admin")]
|
||||||
public string Extension { get; set; }
|
public string Extension { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor
|
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor { get; set; }
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class InstructionSetExtensionsByProcessor : BaseModel<int>
|
||||||
{
|
{
|
||||||
public class InstructionSetExtensionsByProcessor : BaseModel<int>
|
|
||||||
{
|
|
||||||
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ExtensionId))]
|
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ExtensionId))]
|
||||||
public int ProcessorId { get; set; }
|
public int ProcessorId { get; set; }
|
||||||
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ProcessorId))]
|
[Remote("VerifyUnique", "InstructionSetExtensionsByProcessor", "Admin", AdditionalFields = nameof(ProcessorId))]
|
||||||
@@ -36,5 +36,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public virtual InstructionSetExtension Extension { get; set; }
|
public virtual InstructionSetExtension Extension { get; set; }
|
||||||
public virtual Processor Processor { 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]
|
[Required]
|
||||||
public virtual InstructionSet InstructionSet { get; set; }
|
public virtual InstructionSet InstructionSet { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,10 +28,10 @@ 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)]
|
||||||
@@ -41,7 +41,8 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public short Id { get; set; }
|
public short Id { get; set; }
|
||||||
[Required, StringLength(64)]
|
[Required]
|
||||||
|
[StringLength(64)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<Company> Companies { get; set; }
|
public virtual ICollection<Company> Companies { get; set; }
|
||||||
@@ -49,5 +50,4 @@ namespace Marechai.Database.Models
|
|||||||
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
|
||||||
{
|
{
|
||||||
public class Iso4217
|
|
||||||
{
|
|
||||||
[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; }
|
||||||
|
|
||||||
[StringLength(3), Required, Key]
|
[StringLength(3)]
|
||||||
|
[Required]
|
||||||
|
[Key]
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
[Column(TypeName = "smallint(3)"), Required]
|
[Column(TypeName = "smallint(3)")]
|
||||||
|
[Required]
|
||||||
public short Numeric { get; set; }
|
public short Numeric { get; set; }
|
||||||
public byte? MinorUnits { get; set; }
|
public byte? MinorUnits { get; set; }
|
||||||
[StringLength(150), Required]
|
[StringLength(150)]
|
||||||
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[DataType(DataType.Date)]
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Withdrawn { get; set; }
|
public DateTime? Withdrawn { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,17 +28,19 @@ 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>
|
|
||||||
public class Iso639
|
|
||||||
{
|
|
||||||
[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; }
|
||||||
|
|
||||||
[Column(TypeName = "char(3)"), Key, Required]
|
[Column(TypeName = "char(3)")]
|
||||||
|
[Key]
|
||||||
|
[Required]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
[Column(TypeName = "char(3)")]
|
[Column(TypeName = "char(3)")]
|
||||||
public string Part2B { get; set; }
|
public string Part2B { get; set; }
|
||||||
@@ -46,15 +48,17 @@ namespace Marechai.Database.Models
|
|||||||
public string Part2T { get; set; }
|
public string Part2T { get; set; }
|
||||||
[Column(TypeName = "char(2)")]
|
[Column(TypeName = "char(2)")]
|
||||||
public string Part1 { get; set; }
|
public string Part1 { get; set; }
|
||||||
[Column(TypeName = "char(1)"), Required]
|
[Column(TypeName = "char(1)")]
|
||||||
|
[Required]
|
||||||
public string Scope { get; set; }
|
public string Scope { get; set; }
|
||||||
[Column(TypeName = "char(1)"), Required]
|
[Column(TypeName = "char(1)")]
|
||||||
|
[Required]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
[Column(TypeName = "varchar(150)"), Required]
|
[Column(TypeName = "varchar(150)")]
|
||||||
|
[Required]
|
||||||
public string ReferenceName { get; set; }
|
public string ReferenceName { get; set; }
|
||||||
[Column(TypeName = "varchar(150)")]
|
[Column(TypeName = "varchar(150)")]
|
||||||
public string Comment { get; set; }
|
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]
|
[Required]
|
||||||
public virtual Iso639 Language { get; set; }
|
public virtual Iso639 Language { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
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]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[DisplayName("SPDX identifier")]
|
[DisplayName("SPDX identifier")]
|
||||||
public string SPDX { get; set; }
|
public string SPDX { get; set; }
|
||||||
[DisplayName("FSF approved"), Required, DefaultValue(false)]
|
[DisplayName("FSF approved")]
|
||||||
|
[Required]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool FsfApproved { get; set; }
|
public bool FsfApproved { get; set; }
|
||||||
[DisplayName("OSI approved"), Required, DefaultValue(false)]
|
[DisplayName("OSI approved")]
|
||||||
|
[Required]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool OsiApproved { get; set; }
|
public bool OsiApproved { get; set; }
|
||||||
[DisplayName("License text link"), StringLength(512), Url]
|
[DisplayName("License text link")]
|
||||||
|
[StringLength(512)]
|
||||||
|
[Url]
|
||||||
public string Link { get; set; }
|
public string Link { get; set; }
|
||||||
[DisplayName("License text"), Column(TypeName = "longtext"), StringLength(131072),
|
[DisplayName("License text")]
|
||||||
DataType(DataType.MultilineText)]
|
[Column(TypeName = "longtext")]
|
||||||
|
[StringLength(131072)]
|
||||||
|
[DataType(DataType.MultilineText)]
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
public virtual ICollection<MachinePhoto> Photos { get; set; }
|
||||||
public virtual ICollection<OwnedMachinePhoto> OwnedMachinePhotos { 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 Browser { get; set; }
|
||||||
public string Ip { get; set; }
|
public string Ip { get; set; }
|
||||||
public string Date { get; set; }
|
public string Date { get; set; }
|
||||||
public string Referer { get; set; }
|
public string Referer { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
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 class LogicalPartition : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
public uint Sequence { get; set; }
|
public uint Sequence { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -42,5 +42,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public virtual ICollection<FilesystemsByLogicalPartition> Filesystems { get; set; }
|
public virtual ICollection<FilesystemsByLogicalPartition> Filesystems { get; set; }
|
||||||
public virtual ICollection<LogicalPartitionsByMedia> Media { 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]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual LogicalPartition Partition { get; set; }
|
public virtual LogicalPartition Partition { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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>();
|
Gpus = new HashSet<GpusByMachine>();
|
||||||
@@ -42,11 +42,13 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
[Required, StringLength(255)]
|
[Required]
|
||||||
|
[StringLength(255)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public MachineType Type { get; set; }
|
public MachineType Type { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Introduced { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
public int? FamilyId { get; set; }
|
public int? FamilyId { get; set; }
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
@@ -65,5 +67,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<BooksByMachine> Books { get; set; }
|
public virtual ICollection<BooksByMachine> Books { get; set; }
|
||||||
public virtual ICollection<MagazinesByMachine> Magazines { get; set; }
|
public virtual ICollection<MagazinesByMachine> Magazines { get; set; }
|
||||||
public virtual ICollection<MachinesBySoftwareVariant> Software { 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]
|
[Required]
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
public virtual MachineFamily MachineFamily { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,14 +26,15 @@
|
|||||||
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]
|
||||||
|
[StringLength(255)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public virtual Company Company { get; set; }
|
public virtual Company Company { get; set; }
|
||||||
@@ -42,5 +43,4 @@ namespace Marechai.Database.Models
|
|||||||
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]
|
[Url]
|
||||||
public string Source { get; set; }
|
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]
|
[Required]
|
||||||
public virtual Machine Machine { get; set; }
|
public virtual Machine Machine { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
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
|
||||||
{
|
{
|
||||||
public class Magazine : DocumentBase
|
|
||||||
{
|
|
||||||
[StringLength(8, MinimumLength = 8)]
|
[StringLength(8, MinimumLength = 8)]
|
||||||
public string Issn { get; set; }
|
public string Issn { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? FirstPublication { get; set; }
|
public DateTime? FirstPublication { get; set; }
|
||||||
|
|
||||||
public virtual Iso31661Numeric Country { get; set; }
|
public virtual Iso31661Numeric Country { get; set; }
|
||||||
public virtual ICollection<MagazineIssue> Issues { get; set; }
|
public virtual ICollection<MagazineIssue> Issues { get; set; }
|
||||||
public virtual ICollection<CompaniesByMagazine> Companies { get; set; }
|
public virtual ICollection<CompaniesByMagazine> Companies { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,16 +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 MagazineIssue : BaseModel<long>
|
||||||
{
|
{
|
||||||
public class MagazineIssue : BaseModel<long>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public long MagazineId { get; set; }
|
public long MagazineId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string Caption { get; set; }
|
public string Caption { get; set; }
|
||||||
public string NativeCaption { get; set; }
|
public string NativeCaption { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Published { get; set; }
|
public DateTime? Published { get; set; }
|
||||||
[StringLength(18)]
|
[StringLength(18)]
|
||||||
public string ProductCode { get; set; }
|
public string ProductCode { get; set; }
|
||||||
@@ -49,5 +50,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<MagazinesByMachineFamily> MachineFamilies { get; set; }
|
public virtual ICollection<MagazinesByMachineFamily> MachineFamilies { get; set; }
|
||||||
public virtual ICollection<Media> Coverdiscs { get; set; }
|
public virtual ICollection<Media> Coverdiscs { get; set; }
|
||||||
public virtual ICollection<MagazineScan> Scans { 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]
|
[Required]
|
||||||
public virtual MagazineIssue Magazine { get; set; }
|
public virtual MagazineIssue Magazine { get; set; }
|
||||||
public long MagazineId { 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 class MagazinesByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long MagazineId { get; set; }
|
public long MagazineId { get; set; }
|
||||||
public int MachineId { get; set; }
|
public int MachineId { get; set; }
|
||||||
|
|
||||||
public virtual MagazineIssue Magazine { get; set; }
|
public virtual MagazineIssue Magazine { get; set; }
|
||||||
public virtual Machine Machine { 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 class MagazinesByMachineFamily : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long MagazineId { get; set; }
|
public long MagazineId { get; set; }
|
||||||
public int MachineFamilyId { get; set; }
|
public int MachineFamilyId { get; set; }
|
||||||
|
|
||||||
public virtual MagazineIssue Magazine { get; set; }
|
public virtual MagazineIssue Magazine { get; set; }
|
||||||
public virtual MachineFamily MachineFamily { get; set; }
|
public virtual MachineFamily MachineFamily { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -33,11 +33,11 @@ using Microsoft.EntityFrameworkCore.ChangeTracking;
|
|||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class MarechaiContext : IdentityDbContext<ApplicationUser, ApplicationRole, string>
|
||||||
{
|
{
|
||||||
public class MarechaiContext : IdentityDbContext<ApplicationUser, ApplicationRole, string>
|
readonly ValueConverter<string, byte[]> _hexToBytesConverter =
|
||||||
{
|
|
||||||
readonly ValueConverter<string, byte[]> hexToBytesConverter =
|
|
||||||
new(v => HexStringToBytesConverter.StringToHex(v), v => HexStringToBytesConverter.HexToString(v));
|
new(v => HexStringToBytesConverter.StringToHex(v), v => HexStringToBytesConverter.HexToString(v));
|
||||||
|
|
||||||
public MarechaiContext() {}
|
public MarechaiContext() {}
|
||||||
@@ -136,28 +136,26 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
if(optionsBuilder.IsConfigured)
|
if(optionsBuilder.IsConfigured) return;
|
||||||
return;
|
|
||||||
|
|
||||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
|
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
|
||||||
IConfigurationRoot configuration = builder.Build();
|
IConfigurationRoot configuration = builder.Build();
|
||||||
|
|
||||||
optionsBuilder.
|
optionsBuilder
|
||||||
UseMySql(configuration.GetConnectionString("DefaultConnection"),
|
.UseMySql(configuration.GetConnectionString("DefaultConnection"),
|
||||||
new MariaDbServerVersion(new Version(10, 5, 0)), b => b.UseMicrosoftJson()).
|
new MariaDbServerVersion(new Version(10, 5, 0)),
|
||||||
UseLazyLoadingProxies();
|
b => b.UseMicrosoftJson())
|
||||||
|
.UseLazyLoadingProxies();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> SaveChangesWithUserAsync(string userId)
|
public async Task<int> SaveChangesWithUserAsync(string userId)
|
||||||
{
|
{
|
||||||
ChangeTracker.DetectChanges();
|
ChangeTracker.DetectChanges();
|
||||||
List<Audit> audits = new();
|
List<Audit> audits = [];
|
||||||
|
|
||||||
foreach(EntityEntry entry in ChangeTracker.Entries())
|
foreach(EntityEntry entry in ChangeTracker.Entries())
|
||||||
{
|
{
|
||||||
if(entry.Entity is Audit ||
|
if(entry.Entity is Audit || entry.State == EntityState.Detached || entry.State == EntityState.Unchanged)
|
||||||
entry.State == EntityState.Detached ||
|
|
||||||
entry.State == EntityState.Unchanged)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var audit = new Audit();
|
var audit = new Audit();
|
||||||
@@ -167,7 +165,7 @@ namespace Marechai.Database.Models
|
|||||||
Dictionary<string, object> keys = new();
|
Dictionary<string, object> keys = new();
|
||||||
Dictionary<string, object> olds = new();
|
Dictionary<string, object> olds = new();
|
||||||
Dictionary<string, object> news = new();
|
Dictionary<string, object> news = new();
|
||||||
List<string> columns = new();
|
List<string> columns = [];
|
||||||
|
|
||||||
foreach(PropertyEntry property in entry.Properties)
|
foreach(PropertyEntry property in entry.Properties)
|
||||||
{
|
{
|
||||||
@@ -207,17 +205,13 @@ namespace Marechai.Database.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(keys.Count > 0)
|
if(keys.Count > 0) audit.Keys = keys;
|
||||||
audit.Keys = keys;
|
|
||||||
|
|
||||||
if(olds.Count > 0)
|
if(olds.Count > 0) audit.OldValues = olds;
|
||||||
audit.OldValues = olds;
|
|
||||||
|
|
||||||
if(news.Count > 0)
|
if(news.Count > 0) audit.NewValues = news;
|
||||||
audit.NewValues = news;
|
|
||||||
|
|
||||||
if(columns.Count > 0)
|
if(columns.Count > 0) audit.AffectedColumns = columns;
|
||||||
audit.AffectedColumns = columns;
|
|
||||||
|
|
||||||
audits.Add(audit);
|
audits.Add(audit);
|
||||||
}
|
}
|
||||||
@@ -249,11 +243,15 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.HasIndex(e => e.Edition);
|
entity.HasIndex(e => e.Edition);
|
||||||
|
|
||||||
entity.HasOne(d => d.Previous).WithOne(d => d.Next).HasForeignKey<Book>(d => d.PreviousId).
|
entity.HasOne(d => d.Previous)
|
||||||
OnDelete(DeleteBehavior.ClientSetNull);
|
.WithOne(d => d.Next)
|
||||||
|
.HasForeignKey<Book>(d => d.PreviousId)
|
||||||
|
.OnDelete(DeleteBehavior.ClientSetNull);
|
||||||
|
|
||||||
entity.HasOne(d => d.Source).WithMany(d => d.Derivates).HasForeignKey(d => d.SourceId).
|
entity.HasOne(d => d.Source)
|
||||||
OnDelete(DeleteBehavior.ClientSetNull);
|
.WithMany(d => d.Derivates)
|
||||||
|
.HasForeignKey(d => d.SourceId)
|
||||||
|
.OnDelete(DeleteBehavior.ClientSetNull);
|
||||||
|
|
||||||
entity.HasOne(d => d.Country).WithMany(p => p.Books).HasForeignKey(d => d.CountryId);
|
entity.HasOne(d => d.Country).WithMany(p => p.Books).HasForeignKey(d => d.CountryId);
|
||||||
});
|
});
|
||||||
@@ -296,51 +294,63 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Agif).HasColumnName("agif").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Agif).HasColumnName("agif").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("varchar(64)").
|
entity.Property(e => e.Browser)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Colors)
|
||||||
HasDefaultValueSql("'0'");
|
.HasColumnName("colors")
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.Flash).HasColumnName("flash").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Flash).HasColumnName("flash").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Frames).HasColumnName("frames").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Frames)
|
||||||
HasDefaultValueSql("'0'");
|
.HasColumnName("frames")
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.Gif87).HasColumnName("gif87").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Gif87).HasColumnName("gif87").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Gif89).HasColumnName("gif89").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Gif89).HasColumnName("gif89").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Jpeg).HasColumnName("jpeg").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Jpeg).HasColumnName("jpeg").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Js).HasColumnName("js").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
entity.Property(e => e.Js).HasColumnName("js").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.Os).IsRequired().HasColumnName("os").HasColumnType("varchar(32)").
|
entity.Property(e => e.Os)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("os")
|
||||||
|
.HasColumnType("varchar(32)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Platform).IsRequired().HasColumnName("platform").HasColumnType("varchar(8)").
|
entity.Property(e => e.Platform)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("platform")
|
||||||
|
.HasColumnType("varchar(8)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Png).HasColumnName("png").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
entity.Property(e => e.Png).HasColumnName("png").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.Pngt).HasColumnName("pngt").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Pngt).HasColumnName("pngt").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Table).HasColumnName("table").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Table).HasColumnName("table").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.UserAgent).IsRequired().HasColumnName("user_agent").
|
entity.Property(e => e.UserAgent)
|
||||||
HasColumnType("varchar(128)").HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("user_agent")
|
||||||
|
.HasColumnType("varchar(128)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Version).IsRequired().HasColumnName("version").HasColumnType("varchar(16)").
|
entity.Property(e => e.Version)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("version")
|
||||||
|
.HasColumnType("varchar(16)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<MarechaiDb>(entity =>
|
modelBuilder.Entity<MarechaiDb>(entity =>
|
||||||
@@ -349,8 +359,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Updated).HasColumnName("updated").HasColumnType("datetime").
|
entity.Property(e => e.Updated)
|
||||||
HasDefaultValueSql("CURRENT_TIMESTAMP");
|
.HasColumnName("updated")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
entity.Property(e => e.Version).HasColumnName("version").HasColumnType("int(11)");
|
entity.Property(e => e.Version).HasColumnName("version").HasColumnType("int(11)");
|
||||||
});
|
});
|
||||||
@@ -436,8 +448,11 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Founded).HasColumnName("founded").HasColumnType("datetime");
|
entity.Property(e => e.Founded).HasColumnName("founded").HasColumnType("datetime");
|
||||||
|
|
||||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(128)").
|
entity.Property(e => e.Name)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("name")
|
||||||
|
.HasColumnType("varchar(128)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.PostalCode).HasColumnName("postal_code").HasColumnType("varchar(25)");
|
entity.Property(e => e.PostalCode).HasColumnName("postal_code").HasColumnType("varchar(25)");
|
||||||
|
|
||||||
@@ -453,14 +468,20 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Website).HasColumnName("website").HasColumnType("varchar(255)");
|
entity.Property(e => e.Website).HasColumnName("website").HasColumnType("varchar(255)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Country).WithMany(p => p.Companies).HasForeignKey(d => d.CountryId).
|
entity.HasOne(d => d.Country)
|
||||||
HasConstraintName("fk_companies_country");
|
.WithMany(p => p.Companies)
|
||||||
|
.HasForeignKey(d => d.CountryId)
|
||||||
|
.HasConstraintName("fk_companies_country");
|
||||||
|
|
||||||
entity.HasOne(d => d.SoldTo).WithMany(p => p.InverseSoldToNavigation).HasForeignKey(d => d.SoldToId).
|
entity.HasOne(d => d.SoldTo)
|
||||||
HasConstraintName("fk_companies_sold_to");
|
.WithMany(p => p.InverseSoldToNavigation)
|
||||||
|
.HasForeignKey(d => d.SoldToId)
|
||||||
|
.HasConstraintName("fk_companies_sold_to");
|
||||||
|
|
||||||
entity.HasOne(d => d.DocumentCompany).WithOne(p => p.Company).
|
entity.HasOne(d => d.DocumentCompany)
|
||||||
HasForeignKey<DocumentCompany>(d => d.CompanyId).OnDelete(DeleteBehavior.SetNull);
|
.WithOne(p => p.Company)
|
||||||
|
.HasForeignKey<DocumentCompany>(d => d.CompanyId)
|
||||||
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<CompanyDescription>().HasIndex(e => e.Text).IsFullText();
|
modelBuilder.Entity<CompanyDescription>().HasIndex(e => e.Text).IsFullText();
|
||||||
@@ -490,8 +511,11 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Year).HasColumnName("year").HasColumnType("int(4)");
|
entity.Property(e => e.Year).HasColumnName("year").HasColumnType("int(4)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Company).WithMany(p => p.Logos).HasForeignKey(d => d.CompanyId).
|
entity.HasOne(d => d.Company)
|
||||||
OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("fk_company_logos_company1");
|
.WithMany(p => p.Logos)
|
||||||
|
.HasForeignKey(d => d.CompanyId)
|
||||||
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||||
|
.HasConstraintName("fk_company_logos_company1");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<Document>(entity =>
|
modelBuilder.Entity<Document>(entity =>
|
||||||
@@ -528,8 +552,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.HasIndex(e => e.DisplayName);
|
entity.HasIndex(e => e.DisplayName);
|
||||||
|
|
||||||
entity.HasOne(d => d.Person).WithOne(p => p.DocumentPerson).
|
entity.HasOne(d => d.Person)
|
||||||
HasForeignKey<Person>(d => d.DocumentPersonId).OnDelete(DeleteBehavior.SetNull);
|
.WithOne(p => p.DocumentPerson)
|
||||||
|
.HasForeignKey<Person>(d => d.DocumentPersonId)
|
||||||
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<DocumentRole>(entity =>
|
modelBuilder.Entity<DocumentRole>(entity =>
|
||||||
@@ -579,17 +605,29 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("char(128)").
|
entity.Property(e => e.Browser)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.HasColumnType("char(128)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)").
|
entity.Property(e => e.Date)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("date")
|
||||||
|
.HasColumnType("char(20)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Ip).IsRequired().HasColumnName("ip").HasColumnType("char(16)").
|
entity.Property(e => e.Ip)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("ip")
|
||||||
|
.HasColumnType("char(16)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Referer).IsRequired().HasColumnName("referer").HasColumnType("char(255)").
|
entity.Property(e => e.Referer)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("referer")
|
||||||
|
.HasColumnType("char(255)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<Gpu>(entity =>
|
modelBuilder.Entity<Gpu>(entity =>
|
||||||
@@ -624,8 +662,11 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
||||||
|
|
||||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(128)").
|
entity.Property(e => e.Name)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("name")
|
||||||
|
.HasColumnType("char(128)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)");
|
entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)");
|
||||||
|
|
||||||
@@ -635,8 +676,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)");
|
entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Company).WithMany(p => p.Gpus).HasForeignKey(d => d.CompanyId).
|
entity.HasOne(d => d.Company)
|
||||||
HasConstraintName("fk_gpus_company");
|
.WithMany(p => p.Gpus)
|
||||||
|
.HasForeignKey(d => d.CompanyId)
|
||||||
|
.HasConstraintName("fk_gpus_company");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<GpusByMachine>(entity =>
|
modelBuilder.Entity<GpusByMachine>(entity =>
|
||||||
@@ -653,11 +696,15 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.MachineId).HasColumnName("machine").HasColumnType("int(11)");
|
entity.Property(e => e.MachineId).HasColumnName("machine").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Gpu).WithMany(p => p.GpusByMachine).HasForeignKey(d => d.GpuId).
|
entity.HasOne(d => d.Gpu)
|
||||||
HasConstraintName("fk_gpus_by_machine_gpu");
|
.WithMany(p => p.GpusByMachine)
|
||||||
|
.HasForeignKey(d => d.GpuId)
|
||||||
|
.HasConstraintName("fk_gpus_by_machine_gpu");
|
||||||
|
|
||||||
entity.HasOne(d => d.Machine).WithMany(p => p.Gpus).HasForeignKey(d => d.MachineId).
|
entity.HasOne(d => d.Machine)
|
||||||
HasConstraintName("fk_gpus_by_machine_machine");
|
.WithMany(p => p.Gpus)
|
||||||
|
.HasForeignKey(d => d.MachineId)
|
||||||
|
.HasConstraintName("fk_gpus_by_machine_machine");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<GpusByOwnedMachine>(entity =>
|
modelBuilder.Entity<GpusByOwnedMachine>(entity =>
|
||||||
@@ -699,13 +746,17 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.ExtensionId).HasColumnName("extension_id").HasColumnType("int(11)");
|
entity.Property(e => e.ExtensionId).HasColumnName("extension_id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Extension).WithMany(p => p.InstructionSetExtensionsByProcessor).
|
entity.HasOne(d => d.Extension)
|
||||||
HasForeignKey(d => d.ExtensionId).OnDelete(DeleteBehavior.ClientSetNull).
|
.WithMany(p => p.InstructionSetExtensionsByProcessor)
|
||||||
HasConstraintName("fk_extension_extension_id");
|
.HasForeignKey(d => d.ExtensionId)
|
||||||
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||||
|
.HasConstraintName("fk_extension_extension_id");
|
||||||
|
|
||||||
entity.HasOne(d => d.Processor).WithMany(p => p.InstructionSetExtensions).
|
entity.HasOne(d => d.Processor)
|
||||||
HasForeignKey(d => d.ProcessorId).OnDelete(DeleteBehavior.ClientSetNull).
|
.WithMany(p => p.InstructionSetExtensions)
|
||||||
HasConstraintName("fk_extension_processor_id");
|
.HasForeignKey(d => d.ProcessorId)
|
||||||
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||||
|
.HasConstraintName("fk_extension_processor_id");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<InstructionSet>(entity =>
|
modelBuilder.Entity<InstructionSet>(entity =>
|
||||||
@@ -765,17 +816,29 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("char(128)").
|
entity.Property(e => e.Browser)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.HasColumnType("char(128)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)").
|
entity.Property(e => e.Date)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("date")
|
||||||
|
.HasColumnType("char(20)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Ip).IsRequired().HasColumnName("ip").HasColumnType("char(16)").
|
entity.Property(e => e.Ip)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("ip")
|
||||||
|
.HasColumnType("char(16)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Referer).IsRequired().HasColumnName("referer").HasColumnType("char(255)").
|
entity.Property(e => e.Referer)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("referer")
|
||||||
|
.HasColumnType("char(255)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<MachineFamily>(entity =>
|
modelBuilder.Entity<MachineFamily>(entity =>
|
||||||
@@ -792,8 +855,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(255)");
|
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(255)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Company).WithMany(p => p.MachineFamilies).HasForeignKey(d => d.CompanyId).
|
entity.HasOne(d => d.Company)
|
||||||
HasConstraintName("fk_machine_families_company");
|
.WithMany(p => p.MachineFamilies)
|
||||||
|
.HasForeignKey(d => d.CompanyId)
|
||||||
|
.HasConstraintName("fk_machine_families_company");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<Machine>(entity =>
|
modelBuilder.Entity<Machine>(entity =>
|
||||||
@@ -814,8 +879,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.CompanyId).HasColumnName("company").HasColumnType("int(11)").
|
entity.Property(e => e.CompanyId)
|
||||||
HasDefaultValueSql("'0'");
|
.HasColumnName("company")
|
||||||
|
.HasColumnType("int(11)")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.FamilyId).HasColumnName("family").HasColumnType("int(11)");
|
entity.Property(e => e.FamilyId).HasColumnName("family").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -827,11 +894,16 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.HasOne(d => d.Company).WithMany(p => p.Machines).HasForeignKey(d => d.CompanyId).
|
entity.HasOne(d => d.Company)
|
||||||
OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("fk_machines_company");
|
.WithMany(p => p.Machines)
|
||||||
|
.HasForeignKey(d => d.CompanyId)
|
||||||
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||||
|
.HasConstraintName("fk_machines_company");
|
||||||
|
|
||||||
entity.HasOne(d => d.Family).WithMany(p => p.Machines).HasForeignKey(d => d.FamilyId).
|
entity.HasOne(d => d.Family)
|
||||||
HasConstraintName("fk_machines_family");
|
.WithMany(p => p.Machines)
|
||||||
|
.HasForeignKey(d => d.FamilyId)
|
||||||
|
.HasConstraintName("fk_machines_family");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<OwnedMachine>(entity =>
|
modelBuilder.Entity<OwnedMachine>(entity =>
|
||||||
@@ -1091,8 +1163,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Usage).HasColumnName("usage").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
entity.Property(e => e.Usage).HasColumnName("usage").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.HasOne(d => d.Machine).WithMany(p => p.Memory).HasForeignKey(d => d.MachineId).
|
entity.HasOne(d => d.Machine)
|
||||||
HasConstraintName("fk_memory_by_machine_machine");
|
.WithMany(p => p.Memory)
|
||||||
|
.HasForeignKey(d => d.MachineId)
|
||||||
|
.HasConstraintName("fk_memory_by_machine_machine");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<MemoryByOwnedMachine>(entity =>
|
modelBuilder.Entity<MemoryByOwnedMachine>(entity =>
|
||||||
@@ -1120,11 +1194,16 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Donator).IsRequired().HasColumnName("donator").HasColumnType("char(128)").
|
entity.Property(e => e.Donator)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("donator")
|
||||||
|
.HasColumnType("char(128)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Quantity).HasColumnName("quantity").HasColumnType("decimal(11,2)").
|
entity.Property(e => e.Quantity)
|
||||||
HasDefaultValueSql("'0.00'");
|
.HasColumnName("quantity")
|
||||||
|
.HasColumnType("decimal(11,2)")
|
||||||
|
.HasDefaultValueSql("'0.00'");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<News>(entity =>
|
modelBuilder.Entity<News>(entity =>
|
||||||
@@ -1139,8 +1218,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.AddedId).HasColumnName("added_id").HasColumnType("int(11)").
|
entity.Property(e => e.AddedId)
|
||||||
HasDefaultValueSql("'0'");
|
.HasColumnName("added_id")
|
||||||
|
.HasColumnType("int(11)")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("datetime");
|
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("datetime");
|
||||||
|
|
||||||
@@ -1223,8 +1304,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.HasOne(d => d.CountryOfBirth).WithMany(p => p.People).HasForeignKey(d => d.CountryOfBirthId);
|
entity.HasOne(d => d.CountryOfBirth).WithMany(p => p.People).HasForeignKey(d => d.CountryOfBirthId);
|
||||||
|
|
||||||
entity.HasOne(d => d.DocumentPerson).WithOne(p => p.Person).
|
entity.HasOne(d => d.DocumentPerson)
|
||||||
HasForeignKey<DocumentPerson>(d => d.PersonId).OnDelete(DeleteBehavior.SetNull);
|
.WithOne(p => p.Person)
|
||||||
|
.HasForeignKey<DocumentPerson>(d => d.PersonId)
|
||||||
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<Processor>(entity =>
|
modelBuilder.Entity<Processor>(entity =>
|
||||||
@@ -1311,8 +1394,11 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
||||||
|
|
||||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(50)").
|
entity.Property(e => e.Name)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("name")
|
||||||
|
.HasColumnType("char(50)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)");
|
entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)");
|
||||||
|
|
||||||
@@ -1330,11 +1416,15 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)");
|
entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Company).WithMany(p => p.Processors).HasForeignKey(d => d.CompanyId).
|
entity.HasOne(d => d.Company)
|
||||||
HasConstraintName("fk_processors_company");
|
.WithMany(p => p.Processors)
|
||||||
|
.HasForeignKey(d => d.CompanyId)
|
||||||
|
.HasConstraintName("fk_processors_company");
|
||||||
|
|
||||||
entity.HasOne(d => d.InstructionSet).WithMany(p => p.Processors).HasForeignKey(d => d.InstructionSetId).
|
entity.HasOne(d => d.InstructionSet)
|
||||||
HasConstraintName("fk_processors_instruction_set");
|
.WithMany(p => p.Processors)
|
||||||
|
.HasForeignKey(d => d.InstructionSetId)
|
||||||
|
.HasConstraintName("fk_processors_instruction_set");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<ProcessorsByMachine>(entity =>
|
modelBuilder.Entity<ProcessorsByMachine>(entity =>
|
||||||
@@ -1355,11 +1445,15 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Speed).HasColumnName("speed");
|
entity.Property(e => e.Speed).HasColumnName("speed");
|
||||||
|
|
||||||
entity.HasOne(d => d.Machine).WithMany(p => p.Processors).HasForeignKey(d => d.MachineId).
|
entity.HasOne(d => d.Machine)
|
||||||
HasConstraintName("fk_processors_by_machine_machine");
|
.WithMany(p => p.Processors)
|
||||||
|
.HasForeignKey(d => d.MachineId)
|
||||||
|
.HasConstraintName("fk_processors_by_machine_machine");
|
||||||
|
|
||||||
entity.HasOne(d => d.Processor).WithMany(p => p.ProcessorsByMachine).HasForeignKey(d => d.ProcessorId).
|
entity.HasOne(d => d.Processor)
|
||||||
HasConstraintName("fk_processors_by_machine_processor");
|
.WithMany(p => p.ProcessorsByMachine)
|
||||||
|
.HasForeignKey(d => d.ProcessorId)
|
||||||
|
.HasConstraintName("fk_processors_by_machine_processor");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<ProcessorsByOwnedMachine>(entity =>
|
modelBuilder.Entity<ProcessorsByOwnedMachine>(entity =>
|
||||||
@@ -1389,14 +1483,16 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
e.Width,
|
e.Width,
|
||||||
e.Height
|
e.Height
|
||||||
}).HasDatabaseName("idx_resolutions_resolution");
|
})
|
||||||
|
.HasDatabaseName("idx_resolutions_resolution");
|
||||||
|
|
||||||
entity.HasIndex(e => new
|
entity.HasIndex(e => new
|
||||||
{
|
{
|
||||||
e.Width,
|
e.Width,
|
||||||
e.Height,
|
e.Height,
|
||||||
e.Colors
|
e.Colors
|
||||||
}).HasDatabaseName("idx_resolutions_resolution_with_color");
|
})
|
||||||
|
.HasDatabaseName("idx_resolutions_resolution_with_color");
|
||||||
|
|
||||||
entity.HasIndex(e => new
|
entity.HasIndex(e => new
|
||||||
{
|
{
|
||||||
@@ -1404,17 +1500,16 @@ namespace Marechai.Database.Models
|
|||||||
e.Height,
|
e.Height,
|
||||||
e.Colors,
|
e.Colors,
|
||||||
e.Palette
|
e.Palette
|
||||||
}).HasDatabaseName("idx_resolutions_resolution_with_color_and_palette");
|
})
|
||||||
|
.HasDatabaseName("idx_resolutions_resolution_with_color_and_palette");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Chars).HasColumnName("chars").HasColumnType("tinyint(1)").
|
entity.Property(e => e.Chars).HasColumnName("chars").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("bigint(20)");
|
entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
entity.Property(e => e.Height).HasColumnName("height").HasColumnType("int(11)").
|
entity.Property(e => e.Height).HasColumnName("height").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||||
HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
entity.Property(e => e.Palette).HasColumnName("palette").HasColumnType("bigint(20)");
|
entity.Property(e => e.Palette).HasColumnName("palette").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
@@ -1435,11 +1530,15 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.ResolutionId).HasColumnName("resolution").HasColumnType("int(11)");
|
entity.Property(e => e.ResolutionId).HasColumnName("resolution").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Gpu).WithMany(p => p.ResolutionsByGpu).HasForeignKey(d => d.GpuId).
|
entity.HasOne(d => d.Gpu)
|
||||||
HasConstraintName("fk_resolutions_by_gpu_gpu");
|
.WithMany(p => p.ResolutionsByGpu)
|
||||||
|
.HasForeignKey(d => d.GpuId)
|
||||||
|
.HasConstraintName("fk_resolutions_by_gpu_gpu");
|
||||||
|
|
||||||
entity.HasOne(d => d.Resolution).WithMany(p => p.ResolutionsByGpu).HasForeignKey(d => d.ResolutionId).
|
entity.HasOne(d => d.Resolution)
|
||||||
HasConstraintName("fk_resolutions_by_gpu_resolution");
|
.WithMany(p => p.ResolutionsByGpu)
|
||||||
|
.HasForeignKey(d => d.ResolutionId)
|
||||||
|
.HasConstraintName("fk_resolutions_by_gpu_resolution");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<ResolutionsByScreen>(entity =>
|
modelBuilder.Entity<ResolutionsByScreen>(entity =>
|
||||||
@@ -1485,11 +1584,15 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.SoundSynthId).HasColumnName("sound_synth").HasColumnType("int(11)");
|
entity.Property(e => e.SoundSynthId).HasColumnName("sound_synth").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Machine).WithMany(p => p.Sound).HasForeignKey(d => d.MachineId).
|
entity.HasOne(d => d.Machine)
|
||||||
HasConstraintName("fk_sound_by_machine_machine");
|
.WithMany(p => p.Sound)
|
||||||
|
.HasForeignKey(d => d.MachineId)
|
||||||
|
.HasConstraintName("fk_sound_by_machine_machine");
|
||||||
|
|
||||||
entity.HasOne(d => d.SoundSynth).WithMany(p => p.SoundByMachine).HasForeignKey(d => d.SoundSynthId).
|
entity.HasOne(d => d.SoundSynth)
|
||||||
HasConstraintName("fk_sound_by_machine_sound_synth");
|
.WithMany(p => p.SoundByMachine)
|
||||||
|
.HasForeignKey(d => d.SoundSynthId)
|
||||||
|
.HasConstraintName("fk_sound_by_machine_sound_synth");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<SoundByOwnedMachine>(entity =>
|
modelBuilder.Entity<SoundByOwnedMachine>(entity =>
|
||||||
@@ -1537,8 +1640,11 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
||||||
|
|
||||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(50)").
|
entity.Property(e => e.Name)
|
||||||
HasDefaultValueSql("''");
|
.IsRequired()
|
||||||
|
.HasColumnName("name")
|
||||||
|
.HasColumnType("char(50)")
|
||||||
|
.HasDefaultValueSql("''");
|
||||||
|
|
||||||
entity.Property(e => e.SquareWave).HasColumnName("square_wave").HasColumnType("int(11)");
|
entity.Property(e => e.SquareWave).HasColumnName("square_wave").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1548,8 +1654,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.WhiteNoise).HasColumnName("white_noise").HasColumnType("int(11)");
|
entity.Property(e => e.WhiteNoise).HasColumnName("white_noise").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.HasOne(d => d.Company).WithMany(p => p.SoundSynths).HasForeignKey(d => d.CompanyId).
|
entity.HasOne(d => d.Company)
|
||||||
HasConstraintName("fk_sound_synths_company");
|
.WithMany(p => p.SoundSynths)
|
||||||
|
.HasForeignKey(d => d.CompanyId)
|
||||||
|
.HasConstraintName("fk_sound_synths_company");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<StorageByMachine>(entity =>
|
modelBuilder.Entity<StorageByMachine>(entity =>
|
||||||
@@ -1568,15 +1676,19 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.Property(e => e.Capacity).HasColumnName("capacity").HasColumnType("bigint(20)");
|
entity.Property(e => e.Capacity).HasColumnName("capacity").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
entity.Property(e => e.Interface).HasColumnName("interface").HasColumnType("int(11)").
|
entity.Property(e => e.Interface)
|
||||||
HasDefaultValueSql("'0'");
|
.HasColumnName("interface")
|
||||||
|
.HasColumnType("int(11)")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.Property(e => e.MachineId).HasColumnName("machine").HasColumnType("int(11)");
|
entity.Property(e => e.MachineId).HasColumnName("machine").HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
entity.HasOne(d => d.Machine).WithMany(p => p.Storage).HasForeignKey(d => d.MachineId).
|
entity.HasOne(d => d.Machine)
|
||||||
HasConstraintName("fk_storage_by_machine_machine");
|
.WithMany(p => p.Storage)
|
||||||
|
.HasForeignKey(d => d.MachineId)
|
||||||
|
.HasConstraintName("fk_storage_by_machine_machine");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<StorageByOwnedMachine>(entity =>
|
modelBuilder.Entity<StorageByOwnedMachine>(entity =>
|
||||||
@@ -1612,10 +1724,7 @@ namespace Marechai.Database.Models
|
|||||||
entity.HasIndex(d => d.Withdrawn);
|
entity.HasIndex(d => d.Withdrawn);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<CurrencyInflation>(entity =>
|
modelBuilder.Entity<CurrencyInflation>(entity => { entity.HasIndex(d => d.Year); });
|
||||||
{
|
|
||||||
entity.HasIndex(d => d.Year);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity<CurrencyPegging>(entity =>
|
modelBuilder.Entity<CurrencyPegging>(entity =>
|
||||||
{
|
{
|
||||||
@@ -1639,10 +1748,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<DbFile>(entity =>
|
modelBuilder.Entity<DbFile>(entity =>
|
||||||
{
|
{
|
||||||
entity.Property(e => e.Md5).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Md5).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha1).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha1).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha256).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha256).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha3).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha3).HasConversion(_hexToBytesConverter);
|
||||||
|
|
||||||
entity.HasIndex(e => e.Size);
|
entity.HasIndex(e => e.Size);
|
||||||
entity.HasIndex(e => e.Md5);
|
entity.HasIndex(e => e.Md5);
|
||||||
@@ -1731,10 +1840,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<MediaDumpFileImage>(entity =>
|
modelBuilder.Entity<MediaDumpFileImage>(entity =>
|
||||||
{
|
{
|
||||||
entity.Property(e => e.Md5).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Md5).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha1).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha1).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha256).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha256).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha3).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha3).HasConversion(_hexToBytesConverter);
|
||||||
|
|
||||||
entity.HasOne(d => d.MediaDump).WithMany(p => p.Files).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.MediaDump).WithMany(p => p.Files).OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
@@ -1755,10 +1864,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<MediaDumpImage>(entity =>
|
modelBuilder.Entity<MediaDumpImage>(entity =>
|
||||||
{
|
{
|
||||||
entity.Property(e => e.Md5).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Md5).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha1).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha1).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha256).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha256).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha3).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha3).HasConversion(_hexToBytesConverter);
|
||||||
|
|
||||||
entity.HasOne(d => d.MediaDump).WithOne(p => p.Image).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.MediaDump).WithOne(p => p.Image).OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
@@ -1773,10 +1882,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<MediaDumpSubchannelImage>(entity =>
|
modelBuilder.Entity<MediaDumpSubchannelImage>(entity =>
|
||||||
{
|
{
|
||||||
entity.Property(e => e.Md5).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Md5).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha1).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha1).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha256).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha256).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha3).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha3).HasConversion(_hexToBytesConverter);
|
||||||
|
|
||||||
entity.HasOne(d => d.MediaDump).WithOne(p => p.Subchannel).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.MediaDump).WithOne(p => p.Subchannel).OnDelete(DeleteBehavior.Cascade);
|
||||||
entity.HasOne(d => d.Track).WithOne(p => p.Subchannel).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.Track).WithOne(p => p.Subchannel).OnDelete(DeleteBehavior.Cascade);
|
||||||
@@ -1791,10 +1900,10 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<MediaDumpTrackImage>(entity =>
|
modelBuilder.Entity<MediaDumpTrackImage>(entity =>
|
||||||
{
|
{
|
||||||
entity.Property(e => e.Md5).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Md5).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha1).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha1).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha256).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha256).HasConversion(_hexToBytesConverter);
|
||||||
entity.Property(e => e.Sha3).HasConversion(hexToBytesConverter);
|
entity.Property(e => e.Sha3).HasConversion(_hexToBytesConverter);
|
||||||
|
|
||||||
entity.HasOne(d => d.MediaDump).WithMany(p => p.Tracks).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.MediaDump).WithMany(p => p.Tracks).OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
@@ -1823,12 +1932,16 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<FileDataStreamsByMediaFile>(entity =>
|
modelBuilder.Entity<FileDataStreamsByMediaFile>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasOne(d => d.MediaFile).WithMany(p => p.DataStreams).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.MediaFile)
|
||||||
|
.WithMany(p => p.DataStreams)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<FilesByFilesystem>(entity =>
|
modelBuilder.Entity<FilesByFilesystem>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasOne(d => d.Filesystem).WithMany(p => p.Files).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.Filesystem)
|
||||||
|
.WithMany(p => p.Files)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<Dump>(entity =>
|
modelBuilder.Entity<Dump>(entity =>
|
||||||
@@ -1974,14 +2087,16 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<RequiredOperatingSystemsBySofwareVariant>(entity =>
|
modelBuilder.Entity<RequiredOperatingSystemsBySofwareVariant>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.RequiredOperatingSystems).
|
entity.HasOne(d => d.SoftwareVariant)
|
||||||
OnDelete(DeleteBehavior.Cascade);
|
.WithMany(p => p.RequiredOperatingSystems)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<RequiredSoftwareBySoftwareVariant>(entity =>
|
modelBuilder.Entity<RequiredSoftwareBySoftwareVariant>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.RequiredSoftware).
|
entity.HasOne(d => d.SoftwareVariant)
|
||||||
OnDelete(DeleteBehavior.Cascade);
|
.WithMany(p => p.RequiredSoftware)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<SoundBySoftwareVariant>(entity =>
|
modelBuilder.Entity<SoundBySoftwareVariant>(entity =>
|
||||||
@@ -1992,7 +2107,9 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
modelBuilder.Entity<FileDataStreamsByStandaloneFile>(entity =>
|
modelBuilder.Entity<FileDataStreamsByStandaloneFile>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasOne(d => d.StandaloneFile).WithMany(p => p.DataStreams).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(d => d.StandaloneFile)
|
||||||
|
.WithMany(p => p.DataStreams)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<StandaloneFile>(entity =>
|
modelBuilder.Entity<StandaloneFile>(entity =>
|
||||||
@@ -2025,10 +2142,7 @@ namespace Marechai.Database.Models
|
|||||||
entity.HasOne(e => e.MediaDump).WithMany(e => e.Tags).OnDelete(DeleteBehavior.Cascade);
|
entity.HasOne(e => e.MediaDump).WithMany(e => e.Tags).OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<SoftwareVariantByCompilationMedia>(entity =>
|
modelBuilder.Entity<SoftwareVariantByCompilationMedia>(entity => { entity.HasIndex(e => e.Path); });
|
||||||
{
|
|
||||||
entity.HasIndex(e => e.Path);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity<BookScan>(entity =>
|
modelBuilder.Entity<BookScan>(entity =>
|
||||||
{
|
{
|
||||||
@@ -2135,5 +2249,4 @@ namespace Marechai.Database.Models
|
|||||||
entity.HasOne(d => d.User).WithMany(p => p.MagazineScans).OnDelete(DeleteBehavior.SetNull);
|
entity.HasOne(d => d.User).WithMany(p => p.MagazineScans).OnDelete(DeleteBehavior.SetNull);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -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 Id { get; set; }
|
||||||
public int Version { get; set; }
|
public int Version { get; set; }
|
||||||
public DateTimeOffset? Updated { get; set; }
|
public DateTimeOffset? Updated { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
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; }
|
public MasteringTextType Type { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
@@ -11,5 +11,4 @@ namespace Marechai.Database.Models
|
|||||||
public short? Layer { get; set; }
|
public short? Layer { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,10 +28,10 @@ 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>
|
||||||
{
|
{
|
||||||
public class Media : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public ushort? Sequence { get; set; }
|
public ushort? Sequence { get; set; }
|
||||||
@@ -67,5 +67,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<Dump> Dumps { get; set; }
|
public virtual ICollection<Dump> Dumps { get; set; }
|
||||||
public virtual ICollection<MediaBySoftwareVariant> Software { get; set; }
|
public virtual ICollection<MediaBySoftwareVariant> Software { get; set; }
|
||||||
public virtual ICollection<MasteringText> MasteringTexts { 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]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
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>
|
||||||
{
|
{
|
||||||
public class MediaDump : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
public string Format { get; set; }
|
public string Format { get; set; }
|
||||||
@@ -41,5 +41,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual ICollection<MediaDumpTrackImage> Tracks { get; set; }
|
public virtual ICollection<MediaDumpTrackImage> Tracks { get; set; }
|
||||||
public virtual ICollection<Dump> Dumps { get; set; }
|
public virtual ICollection<Dump> Dumps { get; set; }
|
||||||
public virtual ICollection<MediaTagDump> Tags { get; set; }
|
public virtual ICollection<MediaTagDump> Tags { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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>
|
||||||
{
|
{
|
||||||
public class MediaDumpFileImage : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public virtual MediaDump MediaDump { get; set; }
|
||||||
public long FileSequence { get; set; }
|
public long FileSequence { get; set; }
|
||||||
@@ -47,5 +47,4 @@ namespace Marechai.Database.Models
|
|||||||
public string Spamsum { get; set; }
|
public string Spamsum { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<FilesystemsByMediaDumpFile> Filesystems { get; set; }
|
public virtual ICollection<FilesystemsByMediaDumpFile> Filesystems { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
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; }
|
public ulong MediaDumpId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public virtual MediaDump MediaDump { get; set; }
|
||||||
@@ -19,5 +19,4 @@ namespace Marechai.Database.Models
|
|||||||
public string Sha3 { get; set; }
|
public string Sha3 { get; set; }
|
||||||
public string Spamsum { get; set; }
|
public string Spamsum { get; set; }
|
||||||
public string AccoustId { get; set; }
|
public string AccoustId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class MediaDumpSubchannelImage : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class MediaDumpSubchannelImage : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
public short TrackSequence { get; set; }
|
public short TrackSequence { get; set; }
|
||||||
public SubchannelStatus Status { get; set; }
|
public SubchannelStatus Status { get; set; }
|
||||||
public ulong Size { get; set; }
|
public ulong Size { get; set; }
|
||||||
@@ -46,5 +46,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public virtual MediaDump MediaDump { get; set; }
|
||||||
public virtual MediaDumpTrackImage Track { get; set; }
|
public virtual MediaDumpTrackImage Track { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class MediaDumpTrackImage : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public class MediaDumpTrackImage : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
public short TrackSequence { get; set; }
|
public short TrackSequence { get; set; }
|
||||||
public string Format { get; set; }
|
public string Format { get; set; }
|
||||||
public ulong Size { get; set; }
|
public ulong Size { get; set; }
|
||||||
@@ -44,5 +44,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public virtual MediaDump MediaDump { get; set; }
|
||||||
public virtual MediaDumpSubchannelImage Subchannel { 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,10 +1,10 @@
|
|||||||
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>
|
||||||
{
|
{
|
||||||
public class MediaTagDump : BaseModel<ulong>
|
|
||||||
{
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual MediaDump MediaDump { get; set; }
|
public virtual MediaDump MediaDump { get; set; }
|
||||||
public MediaTagType Type { get; set; }
|
public MediaTagType Type { get; set; }
|
||||||
@@ -12,5 +12,4 @@ namespace Marechai.Database.Models
|
|||||||
public virtual DbFile File { get; set; }
|
public virtual DbFile File { get; set; }
|
||||||
|
|
||||||
public ulong FileId { get; set; }
|
public ulong FileId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class MemoryByMachine : BaseModel<long>
|
||||||
{
|
{
|
||||||
public class MemoryByMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int MachineId { get; set; }
|
public int MachineId { get; set; }
|
||||||
public MemoryType Type { get; set; }
|
public MemoryType Type { get; set; }
|
||||||
public MemoryUsage Usage { get; set; }
|
public MemoryUsage Usage { get; set; }
|
||||||
@@ -37,5 +37,4 @@ namespace Marechai.Database.Models
|
|||||||
public double? Speed { get; set; }
|
public double? Speed { get; set; }
|
||||||
|
|
||||||
public virtual Machine Machine { get; set; }
|
public virtual Machine Machine { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class MemoryByOwnedMachine : BaseModel<long>
|
||||||
{
|
{
|
||||||
public class MemoryByOwnedMachine : BaseModel<long>
|
|
||||||
{
|
|
||||||
public long OwnedMachineId { get; set; }
|
public long OwnedMachineId { get; set; }
|
||||||
public MemoryType Type { get; set; }
|
public MemoryType Type { get; set; }
|
||||||
public MemoryUsage Usage { get; set; }
|
public MemoryUsage Usage { get; set; }
|
||||||
@@ -37,5 +37,4 @@ namespace Marechai.Database.Models
|
|||||||
public double Speed { get; set; }
|
public double Speed { get; set; }
|
||||||
|
|
||||||
public virtual OwnedMachine OwnedMachine { 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 string Donator { get; set; }
|
||||||
public decimal Quantity { 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 DateTime Date { get; set; }
|
||||||
public NewsType Type { get; set; }
|
public NewsType Type { get; set; }
|
||||||
[DisplayName("Affected ID")]
|
[DisplayName("Affected ID")]
|
||||||
public int AddedId { get; set; }
|
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 class OpticalDiscTrack
|
|
||||||
{
|
|
||||||
public int TrackNumber { get; set; }
|
public int TrackNumber { get; set; }
|
||||||
public int SessionNumber { get; set; }
|
public int SessionNumber { get; set; }
|
||||||
public long FirstSector { get; set; }
|
public long FirstSector { get; set; }
|
||||||
public long LastSector { get; set; }
|
public long LastSector { get; set; }
|
||||||
public TrackType Type { get; set; }
|
public TrackType Type { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@ 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")]
|
[DisplayName("Acquisition date")]
|
||||||
public DateTime AcquisitionDate { get; set; }
|
public DateTime AcquisitionDate { get; set; }
|
||||||
[DisplayName("Date when sold, traded, or otherwise lost")]
|
[DisplayName("Date when sold, traded, or otherwise lost")]
|
||||||
@@ -38,15 +38,19 @@ namespace Marechai.Database.Models
|
|||||||
public StatusType Status { get; set; }
|
public StatusType Status { get; set; }
|
||||||
[DisplayName("Last status check date")]
|
[DisplayName("Last status check date")]
|
||||||
public DateTime? LastStatusDate { get; set; }
|
public DateTime? LastStatusDate { get; set; }
|
||||||
[DisplayName("Available for trade or sale"), DefaultValue(false)]
|
[DisplayName("Available for trade or sale")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Trade { get; set; }
|
public bool Trade { get; set; }
|
||||||
[DisplayName("Has original boxes"), DefaultValue(false)]
|
[DisplayName("Has original boxes")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Boxed { get; set; }
|
public bool Boxed { get; set; }
|
||||||
[DisplayName("Has original manuals"), DefaultValue(false)]
|
[DisplayName("Has original manuals")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool Manuals { get; set; }
|
public bool Manuals { get; set; }
|
||||||
[DisplayName("Serial number")]
|
[DisplayName("Serial number")]
|
||||||
public string SerialNumber { get; set; }
|
public string SerialNumber { get; set; }
|
||||||
[DisplayName("Serial number visible to other users"), DefaultValue(false)]
|
[DisplayName("Serial number visible to other users")]
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool SerialNumberVisible { get; set; }
|
public bool SerialNumberVisible { get; set; }
|
||||||
public int MachineId { get; set; }
|
public int MachineId { get; set; }
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
@@ -60,5 +64,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
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 virtual OwnedMachine OwnedMachine { get; set; }
|
||||||
public long OwnedMachineId { 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 class PeopleByBook : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int PersonId { get; set; }
|
public int PersonId { get; set; }
|
||||||
public long BookId { get; set; }
|
public long BookId { get; set; }
|
||||||
[Column(TypeName = "char(3)"), Required]
|
[Column(TypeName = "char(3)")]
|
||||||
|
[Required]
|
||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
public virtual DocumentPerson Person { get; set; }
|
public virtual DocumentPerson Person { get; set; }
|
||||||
public virtual Book Book { get; set; }
|
public virtual Book Book { get; set; }
|
||||||
public virtual DocumentRole Role { get; set; }
|
public virtual DocumentRole Role { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models;
|
||||||
|
|
||||||
|
public class PeopleByCompany : BaseModel<long>
|
||||||
{
|
{
|
||||||
public class PeopleByCompany : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int PersonId { get; set; }
|
public int PersonId { get; set; }
|
||||||
public int CompanyId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public string Position { get; set; }
|
public string Position { get; set; }
|
||||||
@@ -40,5 +40,4 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
public virtual Person Person { get; set; }
|
public virtual Person Person { get; set; }
|
||||||
public virtual Company Company { 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 class PeopleByDocument : BaseModel<long>
|
|
||||||
{
|
|
||||||
public int PersonId { get; set; }
|
public int PersonId { get; set; }
|
||||||
public long DocumentId { get; set; }
|
public long DocumentId { get; set; }
|
||||||
[Column(TypeName = "char(3)"), Required]
|
[Column(TypeName = "char(3)")]
|
||||||
|
[Required]
|
||||||
public string RoleId { get; set; }
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
public virtual DocumentPerson Person { get; set; }
|
public virtual DocumentPerson Person { get; set; }
|
||||||
public virtual Document Document { get; set; }
|
public virtual Document Document { get; set; }
|
||||||
public virtual DocumentRole Role { 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