Add software variant.

This commit is contained in:
2020-06-11 22:51:48 +01:00
parent dd4888d283
commit 4fba49818c
36 changed files with 8658 additions and 51 deletions

View File

@@ -520,4 +520,10 @@ namespace Marechai.Database
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
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,597 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Marechai.Database.Migrations
{
public partial class AddSoftwareVariant : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable("SoftwareVariants", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
Name = table.Column<string>(nullable: true), Version = table.Column<string>(nullable: true),
Introduced = table.Column<DateTime>(nullable: true), ParentId = table.Column<ulong>(nullable: true),
SoftwareVersionId = table.Column<ulong>(nullable: false),
MinimumMemory = table.Column<ulong>(nullable: true),
RecommendedMemory = table.Column<ulong>(nullable: true),
RequiredStorage = table.Column<ulong>(nullable: true),
PartNumber = table.Column<string>(nullable: true), SerialNumber = table.Column<string>(nullable: true),
ProductCode = table.Column<string>(nullable: true),
CatalogueNumber = table.Column<string>(nullable: true),
DistributionMode = table.Column<uint>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_SoftwareVariants", x => x.Id);
table.ForeignKey("FK_SoftwareVariants_SoftwareVariants_ParentId", x => x.ParentId, "SoftwareVariants",
"Id", onDelete: ReferentialAction.SetNull);
table.ForeignKey("FK_SoftwareVariants_SoftwareVersion_SoftwareVersionId", x => x.SoftwareVersionId,
"SoftwareVersion", "Id", onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("CompaniesBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
CompanyId = table.Column<int>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false), RoleId = table.Column<string>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_CompaniesBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_CompaniesBySoftwareVariant_companies_CompanyId", x => x.CompanyId, "companies",
"id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_CompaniesBySoftwareVariant_DocumentRoles_RoleId", x => x.RoleId, "DocumentRoles",
"Id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_CompaniesBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("GpusBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
GpuId = table.Column<int>(nullable: false), SoftwareVariantId = table.Column<ulong>(nullable: false),
Minimum = table.Column<bool>(nullable: true), Recommended = table.Column<bool>(nullable: true)
}, constraints: table =>
{
table.PrimaryKey("PK_GpusBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_GpusBySoftwareVariant_gpus_GpuId", x => x.GpuId, "gpus", "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_GpusBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("InstructionSetsBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
InstructionSetId = table.Column<int>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_InstructionSetsBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_InstructionSetsBySoftwareVariant_instruction_sets_Instructio~",
x => x.InstructionSetId, "instruction_sets", "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_InstructionSetsBySoftwareVariant_SoftwareVariants_SoftwareVa~",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("LanguagesBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
LanguageId = table.Column<string>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_LanguagesBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_LanguagesBySoftwareVariant_ISO_639-3_LanguageId", x => x.LanguageId, "ISO_639-3",
"Id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_LanguagesBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("MachineFamiliesBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
MachineFamilyId = table.Column<int>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_MachineFamiliesBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_MachineFamiliesBySoftwareVariant_machine_families_MachineFam~",
x => x.MachineFamilyId, "machine_families", "id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_MachineFamiliesBySoftwareVariant_SoftwareVariants_SoftwareVa~",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("MachinesBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
MachineId = table.Column<int>(nullable: false), SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_MachinesBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_MachinesBySoftwareVariant_machines_MachineId", x => x.MachineId, "machines", "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_MachinesBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("MediaBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
MediaId = table.Column<ulong>(nullable: false), SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_MediaBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_MediaBySoftwareVariant_Media_MediaId", x => x.MediaId, "Media", "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_MediaBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("PeopleBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
SoftwareVariantId = table.Column<ulong>(nullable: false), PersonId = table.Column<int>(nullable: false),
RoleId = table.Column<string>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_PeopleBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_PeopleBySoftwareVariant_People_PersonId", x => x.PersonId, "People", "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_PeopleBySoftwareVariant_DocumentRoles_RoleId", x => x.RoleId, "DocumentRoles",
"Id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_PeopleBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("ProcessorsBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
ProcessorId = table.Column<int>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false), Speed = table.Column<float>(nullable: true),
Minimum = table.Column<bool>(nullable: true), Recommended = table.Column<bool>(nullable: true)
}, constraints: table =>
{
table.PrimaryKey("PK_ProcessorsBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_ProcessorsBySoftwareVariant_processors_ProcessorId", x => x.ProcessorId,
"processors", "id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_ProcessorsBySoftwareVariant_SoftwareVariants_SoftwareVariant~",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("RequiredOperatingSystemsBySofwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
OperatingSystemId = table.Column<ulong>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_RequiredOperatingSystemsBySofwareVariant", x => x.Id);
table.ForeignKey("FK_RequiredOperatingSystemsBySofwareVariant_SoftwareVersion_Ope~",
x => x.OperatingSystemId, "SoftwareVersion", "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_RequiredOperatingSystemsBySofwareVariant_SoftwareVariants_So~",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("RequiredSoftwareBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
SoftwareVersionId = table.Column<ulong>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_RequiredSoftwareBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_RequiredSoftwareBySoftwareVariant_SoftwareVariants_SoftwareV~",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_RequiredSoftwareBySoftwareVariant_SoftwareVersion_SoftwareVe~",
x => x.SoftwareVersionId, "SoftwareVersion", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("SoundBySoftwareVariant", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
SoundSynthId = table.Column<int>(nullable: false),
SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_SoundBySoftwareVariant", x => x.Id);
table.ForeignKey("FK_SoundBySoftwareVariant_SoftwareVariants_SoftwareVariantId",
x => x.SoftwareVariantId, "SoftwareVariants", "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_SoundBySoftwareVariant_sound_synths_SoundSynthId", x => x.SoundSynthId,
"sound_synths", "id", onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("StandaloneFiles", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
Path = table.Column<string>(maxLength: 8192, nullable: false),
Name = table.Column<string>(maxLength: 255, nullable: false),
PathSeparator = table.Column<string>(nullable: false),
IsDirectory = table.Column<bool>(nullable: false),
CreationDate = table.Column<DateTime>(nullable: true),
AccessDate = table.Column<DateTime>(nullable: true),
StatusChangeDate = table.Column<DateTime>(nullable: true),
BackupDate = table.Column<DateTime>(nullable: true),
LastWriteDate = table.Column<DateTime>(nullable: true),
Attributes = table.Column<ulong>(nullable: false), PosixMode = table.Column<ushort>(nullable: true),
DeviceNumber = table.Column<uint>(nullable: true), GroupId = table.Column<ulong>(nullable: true),
UserId = table.Column<ulong>(nullable: true), Inode = table.Column<ulong>(nullable: true),
Links = table.Column<ulong>(nullable: true), SoftwareVariantId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_StandaloneFiles", x => x.Id);
table.ForeignKey("FK_StandaloneFiles_SoftwareVariants_SoftwareVariantId", x => x.SoftwareVariantId,
"SoftwareVariants", "Id", onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("FileDataStreamsByStandaloneFile", table => new
{
Id = table.Column<ulong>(nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CreatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
UpdatedOn = table.Column<DateTime>(nullable: false).
Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.ComputedColumn),
FileDataStreamId = table.Column<ulong>(nullable: false),
StandaloneFileId = table.Column<ulong>(nullable: false)
}, constraints: table =>
{
table.PrimaryKey("PK_FileDataStreamsByStandaloneFile", x => x.Id);
table.ForeignKey("FK_FileDataStreamsByStandaloneFile_FileDataStreams_FileDataStre~",
x => x.FileDataStreamId, "FileDataStreams", "Id", onDelete: ReferentialAction.Cascade);
table.ForeignKey("FK_FileDataStreamsByStandaloneFile_StandaloneFiles_StandaloneFi~",
x => x.StandaloneFileId, "StandaloneFiles", "Id", onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex("IX_CompaniesBySoftwareVariant_CompanyId", "CompaniesBySoftwareVariant",
"CompanyId");
migrationBuilder.CreateIndex("IX_CompaniesBySoftwareVariant_RoleId", "CompaniesBySoftwareVariant",
"RoleId");
migrationBuilder.CreateIndex("IX_CompaniesBySoftwareVariant_SoftwareVariantId",
"CompaniesBySoftwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_FileDataStreamsByStandaloneFile_FileDataStreamId",
"FileDataStreamsByStandaloneFile", "FileDataStreamId");
migrationBuilder.CreateIndex("IX_FileDataStreamsByStandaloneFile_StandaloneFileId",
"FileDataStreamsByStandaloneFile", "StandaloneFileId");
migrationBuilder.CreateIndex("IX_GpusBySoftwareVariant_GpuId", "GpusBySoftwareVariant", "GpuId");
migrationBuilder.CreateIndex("IX_GpusBySoftwareVariant_Minimum", "GpusBySoftwareVariant", "Minimum");
migrationBuilder.CreateIndex("IX_GpusBySoftwareVariant_Recommended", "GpusBySoftwareVariant",
"Recommended");
migrationBuilder.CreateIndex("IX_GpusBySoftwareVariant_SoftwareVariantId", "GpusBySoftwareVariant",
"SoftwareVariantId");
migrationBuilder.CreateIndex("IX_InstructionSetsBySoftwareVariant_InstructionSetId",
"InstructionSetsBySoftwareVariant", "InstructionSetId");
migrationBuilder.CreateIndex("IX_InstructionSetsBySoftwareVariant_SoftwareVariantId",
"InstructionSetsBySoftwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_LanguagesBySoftwareVariant_LanguageId", "LanguagesBySoftwareVariant",
"LanguageId");
migrationBuilder.CreateIndex("IX_LanguagesBySoftwareVariant_SoftwareVariantId",
"LanguagesBySoftwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_MachineFamiliesBySoftwareVariant_MachineFamilyId",
"MachineFamiliesBySoftwareVariant", "MachineFamilyId");
migrationBuilder.CreateIndex("IX_MachineFamiliesBySoftwareVariant_SoftwareVariantId",
"MachineFamiliesBySoftwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_MachinesBySoftwareVariant_MachineId", "MachinesBySoftwareVariant",
"MachineId");
migrationBuilder.CreateIndex("IX_MachinesBySoftwareVariant_SoftwareVariantId", "MachinesBySoftwareVariant",
"SoftwareVariantId");
migrationBuilder.CreateIndex("IX_MediaBySoftwareVariant_MediaId", "MediaBySoftwareVariant", "MediaId");
migrationBuilder.CreateIndex("IX_MediaBySoftwareVariant_SoftwareVariantId", "MediaBySoftwareVariant",
"SoftwareVariantId");
migrationBuilder.CreateIndex("IX_PeopleBySoftwareVariant_PersonId", "PeopleBySoftwareVariant", "PersonId");
migrationBuilder.CreateIndex("IX_PeopleBySoftwareVariant_RoleId", "PeopleBySoftwareVariant", "RoleId");
migrationBuilder.CreateIndex("IX_PeopleBySoftwareVariant_SoftwareVariantId", "PeopleBySoftwareVariant",
"SoftwareVariantId");
migrationBuilder.CreateIndex("IX_ProcessorsBySoftwareVariant_Minimum", "ProcessorsBySoftwareVariant",
"Minimum");
migrationBuilder.CreateIndex("IX_ProcessorsBySoftwareVariant_ProcessorId", "ProcessorsBySoftwareVariant",
"ProcessorId");
migrationBuilder.CreateIndex("IX_ProcessorsBySoftwareVariant_Recommended", "ProcessorsBySoftwareVariant",
"Recommended");
migrationBuilder.CreateIndex("IX_ProcessorsBySoftwareVariant_SoftwareVariantId",
"ProcessorsBySoftwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_ProcessorsBySoftwareVariant_Speed", "ProcessorsBySoftwareVariant",
"Speed");
migrationBuilder.CreateIndex("IX_RequiredOperatingSystemsBySofwareVariant_OperatingSystemId",
"RequiredOperatingSystemsBySofwareVariant", "OperatingSystemId");
migrationBuilder.CreateIndex("IX_RequiredOperatingSystemsBySofwareVariant_SoftwareVariantId",
"RequiredOperatingSystemsBySofwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_RequiredSoftwareBySoftwareVariant_SoftwareVariantId",
"RequiredSoftwareBySoftwareVariant", "SoftwareVariantId");
migrationBuilder.CreateIndex("IX_RequiredSoftwareBySoftwareVariant_SoftwareVersionId",
"RequiredSoftwareBySoftwareVariant", "SoftwareVersionId");
migrationBuilder.CreateIndex("IX_SoftwareVariants_CatalogueNumber", "SoftwareVariants", "CatalogueNumber");
migrationBuilder.CreateIndex("IX_SoftwareVariants_DistributionMode", "SoftwareVariants",
"DistributionMode");
migrationBuilder.CreateIndex("IX_SoftwareVariants_Introduced", "SoftwareVariants", "Introduced");
migrationBuilder.CreateIndex("IX_SoftwareVariants_MinimumMemory", "SoftwareVariants", "MinimumMemory");
migrationBuilder.CreateIndex("IX_SoftwareVariants_Name", "SoftwareVariants", "Name");
migrationBuilder.CreateIndex("IX_SoftwareVariants_ParentId", "SoftwareVariants", "ParentId");
migrationBuilder.CreateIndex("IX_SoftwareVariants_PartNumber", "SoftwareVariants", "PartNumber");
migrationBuilder.CreateIndex("IX_SoftwareVariants_ProductCode", "SoftwareVariants", "ProductCode");
migrationBuilder.CreateIndex("IX_SoftwareVariants_RecommendedMemory", "SoftwareVariants",
"RecommendedMemory");
migrationBuilder.CreateIndex("IX_SoftwareVariants_RequiredStorage", "SoftwareVariants", "RequiredStorage");
migrationBuilder.CreateIndex("IX_SoftwareVariants_SerialNumber", "SoftwareVariants", "SerialNumber");
migrationBuilder.CreateIndex("IX_SoftwareVariants_SoftwareVersionId", "SoftwareVariants",
"SoftwareVersionId");
migrationBuilder.CreateIndex("IX_SoftwareVariants_Version", "SoftwareVariants", "Version");
migrationBuilder.CreateIndex("IX_SoundBySoftwareVariant_SoftwareVariantId", "SoundBySoftwareVariant",
"SoftwareVariantId");
migrationBuilder.CreateIndex("IX_SoundBySoftwareVariant_SoundSynthId", "SoundBySoftwareVariant",
"SoundSynthId");
migrationBuilder.CreateIndex("IX_StandaloneFiles_AccessDate", "StandaloneFiles", "AccessDate");
migrationBuilder.CreateIndex("IX_StandaloneFiles_BackupDate", "StandaloneFiles", "BackupDate");
migrationBuilder.CreateIndex("IX_StandaloneFiles_CreationDate", "StandaloneFiles", "CreationDate");
migrationBuilder.CreateIndex("IX_StandaloneFiles_GroupId", "StandaloneFiles", "GroupId");
migrationBuilder.CreateIndex("IX_StandaloneFiles_IsDirectory", "StandaloneFiles", "IsDirectory");
migrationBuilder.CreateIndex("IX_StandaloneFiles_LastWriteDate", "StandaloneFiles", "LastWriteDate");
migrationBuilder.CreateIndex("IX_StandaloneFiles_Name", "StandaloneFiles", "Name");
migrationBuilder.CreateIndex("IX_StandaloneFiles_Path", "StandaloneFiles", "Path");
migrationBuilder.CreateIndex("IX_StandaloneFiles_SoftwareVariantId", "StandaloneFiles",
"SoftwareVariantId");
migrationBuilder.CreateIndex("IX_StandaloneFiles_StatusChangeDate", "StandaloneFiles", "StatusChangeDate");
migrationBuilder.CreateIndex("IX_StandaloneFiles_UserId", "StandaloneFiles", "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable("CompaniesBySoftwareVariant");
migrationBuilder.DropTable("FileDataStreamsByStandaloneFile");
migrationBuilder.DropTable("GpusBySoftwareVariant");
migrationBuilder.DropTable("InstructionSetsBySoftwareVariant");
migrationBuilder.DropTable("LanguagesBySoftwareVariant");
migrationBuilder.DropTable("MachineFamiliesBySoftwareVariant");
migrationBuilder.DropTable("MachinesBySoftwareVariant");
migrationBuilder.DropTable("MediaBySoftwareVariant");
migrationBuilder.DropTable("PeopleBySoftwareVariant");
migrationBuilder.DropTable("ProcessorsBySoftwareVariant");
migrationBuilder.DropTable("RequiredOperatingSystemsBySofwareVariant");
migrationBuilder.DropTable("RequiredSoftwareBySoftwareVariant");
migrationBuilder.DropTable("SoundBySoftwareVariant");
migrationBuilder.DropTable("StandaloneFiles");
migrationBuilder.DropTable("SoftwareVariants");
}
}
}

View File

@@ -381,6 +381,31 @@ namespace Marechai.Database.Migrations
b.ToTable("CompaniesBySoftwareFamily");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<int>("CompanyId").HasColumnType("int(11)");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<string>("RoleId").IsRequired().HasColumnType("char(3)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("RoleId");
b.HasIndex("SoftwareVariantId");
b.ToTable("CompaniesBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesBySoftwareVersion", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
@@ -927,6 +952,27 @@ namespace Marechai.Database.Migrations
b.ToTable("FileDataStreamsByMediaFile");
});
modelBuilder.Entity("Marechai.Database.Models.FileDataStreamsByStandaloneFile", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<ulong>("FileDataStreamId").HasColumnType("bigint unsigned");
b.Property<ulong>("StandaloneFileId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("FileDataStreamId");
b.HasIndex("StandaloneFileId");
b.ToTable("FileDataStreamsByStandaloneFile");
});
modelBuilder.Entity("Marechai.Database.Models.FilesByFilesystem", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
@@ -1187,6 +1233,35 @@ namespace Marechai.Database.Migrations
b.ToTable("GpusByOwnedMachine");
});
modelBuilder.Entity("Marechai.Database.Models.GpusBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<int>("GpuId").HasColumnType("int(11)");
b.Property<bool?>("Minimum").HasColumnType("bit(1)");
b.Property<bool?>("Recommended").HasColumnType("bit(1)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("GpuId");
b.HasIndex("Minimum");
b.HasIndex("Recommended");
b.HasIndex("SoftwareVariantId");
b.ToTable("GpusBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.InstructionSet", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
@@ -1240,6 +1315,27 @@ namespace Marechai.Database.Migrations
b.ToTable("instruction_set_extensions_by_processor");
});
modelBuilder.Entity("Marechai.Database.Models.InstructionSetsBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<int>("InstructionSetId").HasColumnType("int(11)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("InstructionSetId");
b.HasIndex("SoftwareVariantId");
b.ToTable("InstructionSetsBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.Iso31661Numeric", b =>
{
b.Property<short>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("smallint(3)");
@@ -1326,6 +1422,27 @@ namespace Marechai.Database.Migrations
b.ToTable("ISO_639-3");
});
modelBuilder.Entity("Marechai.Database.Models.LanguagesBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<string>("LanguageId").IsRequired().HasColumnType("char(3)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("LanguageId");
b.HasIndex("SoftwareVariantId");
b.ToTable("LanguagesBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.License", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnType("int");
@@ -1494,6 +1611,27 @@ namespace Marechai.Database.Migrations
b.ToTable("machines");
});
modelBuilder.Entity("Marechai.Database.Models.MachineFamiliesBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<int>("MachineFamilyId").HasColumnType("int(11)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("MachineFamilyId");
b.HasIndex("SoftwareVariantId");
b.ToTable("MachineFamiliesBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.MachineFamily", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
@@ -1678,6 +1816,27 @@ namespace Marechai.Database.Migrations
b.ToTable("MachinePhotos");
});
modelBuilder.Entity("Marechai.Database.Models.MachinesBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<int>("MachineId").HasColumnType("int(11)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("MachineId");
b.HasIndex("SoftwareVariantId");
b.ToTable("MachinesBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.Magazine", b =>
{
b.Property<long>("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
@@ -1895,6 +2054,27 @@ namespace Marechai.Database.Migrations
b.ToTable("Media");
});
modelBuilder.Entity("Marechai.Database.Models.MediaBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<ulong>("MediaId").HasColumnType("bigint unsigned");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("MediaId");
b.HasIndex("SoftwareVariantId");
b.ToTable("MediaBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.MediaDump", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
@@ -2644,6 +2824,31 @@ namespace Marechai.Database.Migrations
b.ToTable("PeopleBySoftwareFamily");
});
modelBuilder.Entity("Marechai.Database.Models.PeopleBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<int>("PersonId").HasColumnType("int");
b.Property<string>("RoleId").IsRequired().HasColumnType("char(3)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("PersonId");
b.HasIndex("RoleId");
b.HasIndex("SoftwareVariantId");
b.ToTable("PeopleBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.PeopleBySoftwareVersion", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
@@ -2893,6 +3098,81 @@ namespace Marechai.Database.Migrations
b.ToTable("ProcessorsByOwnedMachine");
});
modelBuilder.Entity("Marechai.Database.Models.ProcessorsBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<bool?>("Minimum").HasColumnType("bit(1)");
b.Property<int>("ProcessorId").HasColumnType("int(11)");
b.Property<bool?>("Recommended").HasColumnType("bit(1)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<float?>("Speed").HasColumnType("float");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("Minimum");
b.HasIndex("ProcessorId");
b.HasIndex("Recommended");
b.HasIndex("SoftwareVariantId");
b.HasIndex("Speed");
b.ToTable("ProcessorsBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.RequiredOperatingSystemsBySofwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<ulong>("OperatingSystemId").HasColumnType("bigint unsigned");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("OperatingSystemId");
b.HasIndex("SoftwareVariantId");
b.ToTable("RequiredOperatingSystemsBySofwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.RequiredSoftwareBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<ulong>("SoftwareVersionId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("SoftwareVariantId");
b.HasIndex("SoftwareVersionId");
b.ToTable("RequiredSoftwareBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.Resolution", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
@@ -3061,6 +3341,71 @@ namespace Marechai.Database.Migrations
b.ToTable("SoftwareFamilies");
});
modelBuilder.Entity("Marechai.Database.Models.SoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<string>("CatalogueNumber").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<uint>("DistributionMode").HasColumnType("int unsigned");
b.Property<DateTime?>("Introduced").HasColumnType("datetime(6)");
b.Property<ulong?>("MinimumMemory").HasColumnType("bigint unsigned");
b.Property<string>("Name").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property<ulong?>("ParentId").HasColumnType("bigint unsigned");
b.Property<string>("PartNumber").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property<string>("ProductCode").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property<ulong?>("RecommendedMemory").HasColumnType("bigint unsigned");
b.Property<ulong?>("RequiredStorage").HasColumnType("bigint unsigned");
b.Property<string>("SerialNumber").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property<ulong>("SoftwareVersionId").HasColumnType("bigint unsigned");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.Property<string>("Version").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("CatalogueNumber");
b.HasIndex("DistributionMode");
b.HasIndex("Introduced");
b.HasIndex("MinimumMemory");
b.HasIndex("Name");
b.HasIndex("ParentId");
b.HasIndex("PartNumber");
b.HasIndex("ProductCode");
b.HasIndex("RecommendedMemory");
b.HasIndex("RequiredStorage");
b.HasIndex("SerialNumber");
b.HasIndex("SoftwareVersionId");
b.HasIndex("Version");
b.ToTable("SoftwareVariants");
});
modelBuilder.Entity("Marechai.Database.Models.SoftwareVersion", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
@@ -3144,6 +3489,27 @@ namespace Marechai.Database.Migrations
b.ToTable("SoundByOwnedMachine");
});
modelBuilder.Entity("Marechai.Database.Models.SoundBySoftwareVariant", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<int>("SoundSynthId").HasColumnType("int(11)");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("SoftwareVariantId");
b.HasIndex("SoundSynthId");
b.ToTable("SoundBySoftwareVariant");
});
modelBuilder.Entity("Marechai.Database.Models.SoundSynth", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
@@ -3199,6 +3565,77 @@ namespace Marechai.Database.Migrations
b.ToTable("sound_synths");
});
modelBuilder.Entity("Marechai.Database.Models.StandaloneFile", b =>
{
b.Property<ulong>("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned");
b.Property<DateTime?>("AccessDate").HasColumnType("datetime(6)");
b.Property<ulong>("Attributes").HasColumnType("bigint unsigned");
b.Property<DateTime?>("BackupDate").HasColumnType("datetime(6)");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<DateTime?>("CreationDate").HasColumnType("datetime(6)");
b.Property<uint?>("DeviceNumber").HasColumnType("int unsigned");
b.Property<ulong?>("GroupId").HasColumnType("bigint unsigned");
b.Property<ulong?>("Inode").HasColumnType("bigint unsigned");
b.Property<bool>("IsDirectory").HasColumnType("bit(1)");
b.Property<DateTime?>("LastWriteDate").HasColumnType("datetime(6)");
b.Property<ulong?>("Links").HasColumnType("bigint unsigned");
b.Property<string>("Name").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4").
HasMaxLength(255);
b.Property<string>("Path").IsRequired().HasColumnType("longtext CHARACTER SET utf8mb4").
HasMaxLength(8192);
b.Property<string>("PathSeparator").IsRequired().HasColumnType("varchar(1) CHARACTER SET utf8mb4");
b.Property<ushort?>("PosixMode").HasColumnType("smallint unsigned");
b.Property<ulong>("SoftwareVariantId").HasColumnType("bigint unsigned");
b.Property<DateTime?>("StatusChangeDate").HasColumnType("datetime(6)");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.Property<ulong?>("UserId").HasColumnType("bigint unsigned");
b.HasKey("Id");
b.HasIndex("AccessDate");
b.HasIndex("BackupDate");
b.HasIndex("CreationDate");
b.HasIndex("GroupId");
b.HasIndex("IsDirectory");
b.HasIndex("LastWriteDate");
b.HasIndex("Name");
b.HasIndex("Path");
b.HasIndex("SoftwareVariantId");
b.HasIndex("StatusChangeDate");
b.HasIndex("UserId");
b.ToTable("StandaloneFiles");
});
modelBuilder.Entity("Marechai.Database.Models.StorageByMachine", b =>
{
b.Property<long>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)");
@@ -3421,6 +3858,18 @@ namespace Marechai.Database.Migrations
HasForeignKey("SoftwareFamilyId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Company", "Company").WithMany("SoftwareVariants").
HasForeignKey("CompanyId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.DocumentRole", "Role").WithMany().HasForeignKey("RoleId").
OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Companies").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesBySoftwareVersion", b =>
{
b.HasOne("Marechai.Database.Models.Company", "Company").WithMany("SoftwareVersions").
@@ -3539,6 +3988,15 @@ namespace Marechai.Database.Migrations
HasForeignKey("MediaFileId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.FileDataStreamsByStandaloneFile", b =>
{
b.HasOne("Marechai.Database.Models.FileDataStream", "FileDataStream").WithMany().
HasForeignKey("FileDataStreamId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.StandaloneFile", "StandaloneFile").WithMany("DataStreams").
HasForeignKey("StandaloneFileId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.FilesByFilesystem", b =>
{
b.HasOne("Marechai.Database.Models.MediaFile", "File").WithMany().HasForeignKey("FileId").
@@ -3590,6 +4048,15 @@ namespace Marechai.Database.Migrations
HasForeignKey("OwnedMachineId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.GpusBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Gpu", "Gpu").WithMany("Software").HasForeignKey("GpuId").
OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Gpus").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtensionsByProcessor", b =>
{
b.HasOne("Marechai.Database.Models.InstructionSetExtension", "Extension").
@@ -3600,6 +4067,24 @@ namespace Marechai.Database.Migrations
HasForeignKey("ProcessorId").HasConstraintName("fk_extension_processor_id").IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.InstructionSetsBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.InstructionSet", "InstructionSet").WithMany("Software").
HasForeignKey("InstructionSetId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Architectures").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.LanguagesBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Iso639", "Language").WithMany("Software").
HasForeignKey("LanguageId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Languages").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.LogicalPartitionsByMedia", b =>
{
b.HasOne("Marechai.Database.Models.Media", "Media").WithMany("LogicalPartitions").
@@ -3618,6 +4103,15 @@ namespace Marechai.Database.Migrations
HasForeignKey("FamilyId").HasConstraintName("fk_machines_family");
});
modelBuilder.Entity("Marechai.Database.Models.MachineFamiliesBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.MachineFamily", "MachineFamily").WithMany("Software").
HasForeignKey("MachineFamilyId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("MachineFamilies").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.MachineFamily", b =>
{
b.HasOne("Marechai.Database.Models.Company", "Company").WithMany("MachineFamilies").
@@ -3637,6 +4131,15 @@ namespace Marechai.Database.Migrations
OnDelete(DeleteBehavior.SetNull);
});
modelBuilder.Entity("Marechai.Database.Models.MachinesBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Machine", "Machine").WithMany("Software").HasForeignKey("MachineId").
OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Machines").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.Magazine", b =>
{
b.HasOne("Marechai.Database.Models.Iso31661Numeric", "Country").WithMany("Magazines").
@@ -3667,6 +4170,15 @@ namespace Marechai.Database.Migrations
HasForeignKey("MagazineId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.MediaBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Media", "Media").WithMany("Software").HasForeignKey("MediaId").
OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Media").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.MediaDump", b =>
{
b.HasOne("Marechai.Database.Models.Media", "Media").WithMany("MediaDumps").HasForeignKey("MediaId").
@@ -3793,6 +4305,18 @@ namespace Marechai.Database.Migrations
HasForeignKey("SoftwareFamilyId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.PeopleBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Person", "Person").WithMany("SoftwareVariants").
HasForeignKey("PersonId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.DocumentRole", "Role").WithMany().HasForeignKey("RoleId").
OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("People").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.PeopleBySoftwareVersion", b =>
{
b.HasOne("Marechai.Database.Models.Person", "Person").WithMany("SoftwareVersions").
@@ -3840,6 +4364,34 @@ namespace Marechai.Database.Migrations
OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.ProcessorsBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.Processor", "Processor").WithMany("Software").
HasForeignKey("ProcessorId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Processors").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.RequiredOperatingSystemsBySofwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.SoftwareVersion", "OperatingSystem").WithMany().
HasForeignKey("OperatingSystemId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").
WithMany("RequiredOperatingSystems").HasForeignKey("SoftwareVariantId").
OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.RequiredSoftwareBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("RequiredSoftware").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoftwareVersion", "SoftwareVersion").WithMany().
HasForeignKey("SoftwareVersionId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.ResolutionsByGpu", b =>
{
b.HasOne("Marechai.Database.Models.Gpu", "Gpu").WithMany("ResolutionsByGpu").HasForeignKey("GpuId").
@@ -3880,6 +4432,15 @@ namespace Marechai.Database.Migrations
HasForeignKey("ParentId").OnDelete(DeleteBehavior.SetNull);
});
modelBuilder.Entity("Marechai.Database.Models.SoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.SoftwareVariant", "Parent").WithMany("Derivates").
HasForeignKey("ParentId").OnDelete(DeleteBehavior.SetNull);
b.HasOne("Marechai.Database.Models.SoftwareVersion", "SoftwareVersion").WithMany("Variants").
HasForeignKey("SoftwareVersionId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.SoftwareVersion", b =>
{
b.HasOne("Marechai.Database.Models.SoftwareFamily", "Family").WithMany("Versions").
@@ -3911,12 +4472,27 @@ namespace Marechai.Database.Migrations
OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.SoundBySoftwareVariant", b =>
{
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("SupportedSound").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
b.HasOne("Marechai.Database.Models.SoundSynth", "SoundSynth").WithMany("Software").
HasForeignKey("SoundSynthId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.SoundSynth", b =>
{
b.HasOne("Marechai.Database.Models.Company", "Company").WithMany("SoundSynths").
HasForeignKey("CompanyId").HasConstraintName("fk_sound_synths_company");
});
modelBuilder.Entity("Marechai.Database.Models.StandaloneFile", b =>
{
b.HasOne("Marechai.Database.Models.SoftwareVariant", "SoftwareVariant").WithMany("Files").
HasForeignKey("SoftwareVariantId").OnDelete(DeleteBehavior.Cascade).IsRequired();
});
modelBuilder.Entity("Marechai.Database.Models.StorageByMachine", b =>
{
b.HasOne("Marechai.Database.Models.Machine", "Machine").WithMany("Storage").HasForeignKey("MachineId").

View File

@@ -0,0 +1,55 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Aaru.CommonTypes.Structs;
namespace Marechai.Database.Models
{
public abstract class BaseFile : BaseModel<ulong>
{
[StringLength(8192), Required]
public string Path { get; set; }
[StringLength(255), Required]
public string Name { get; set; }
[Required, DefaultValue('/')]
public char PathSeparator { get; set; }
public bool IsDirectory { get; set; }
public DateTime? CreationDate { get; set; }
public DateTime? AccessDate { get; set; }
public DateTime? StatusChangeDate { get; set; }
public DateTime? BackupDate { get; set; }
public DateTime? LastWriteDate { get; set; }
public FileAttributes Attributes { get; set; }
public ushort? PosixMode { get; set; }
public uint? DeviceNumber { get; set; }
public ulong? GroupId { get; set; }
public ulong? UserId { get; set; }
public ulong? Inode { get; set; }
public ulong? Links { get; set; }
}
}

View File

@@ -28,7 +28,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Marechai.Database.Models
{
public class BaseModel<TKey>
public abstract class BaseModel<TKey>
{
public TKey Id { get; set; }

View File

@@ -29,7 +29,7 @@ using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class BasePhoto : BaseModel<Guid>
public abstract class BasePhoto : BaseModel<Guid>
{
public double? Aperture { get; set; }
public string Author { get; set; }

View File

@@ -0,0 +1,39 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class CompaniesBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual Company Company { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
[Required]
public virtual DocumentRole Role { get; set; }
}
}

View File

@@ -86,5 +86,6 @@ namespace Marechai.Database.Models
public virtual DocumentCompany DocumentCompany { get; set; }
public virtual ICollection<CompaniesBySoftwareFamily> SoftwareFamilies { get; set; }
public virtual ICollection<CompaniesBySoftwareVersion> SoftwareVersions { get; set; }
public virtual ICollection<CompaniesBySoftwareVariant> SoftwareVariants { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class FileDataStreamsByStandaloneFile : BaseModel<ulong>
{
[Required]
public virtual FileDataStream FileDataStream { get; set; }
[Required]
public virtual StandaloneFile StandaloneFile { get; set; }
}
}

View File

@@ -56,8 +56,9 @@ namespace Marechai.Database.Models
[Range(1, long.MaxValue)]
public long? Transistors { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
public virtual ICollection<GpusBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,39 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class GpusBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual Gpu Gpu { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
public bool? Minimum { get; set; }
public bool? Recommended { get; set; }
}
}

View File

@@ -36,6 +36,7 @@ namespace Marechai.Database.Models
[Required, StringLength(45), Remote("VerifyUnique", "InstructionSets", "Admin")]
public string Name { get; set; }
public virtual ICollection<Processor> Processors { get; set; }
public virtual ICollection<Processor> Processors { get; set; }
public virtual ICollection<InstructionSetsBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class InstructionSetsBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual InstructionSet InstructionSet { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -24,6 +24,7 @@
*******************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -53,5 +54,7 @@ namespace Marechai.Database.Models
public string ReferenceName { get; set; }
[Column(TypeName = "varchar(150)")]
public string Comment { get; set; }
public virtual ICollection<LanguagesBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class LanguagesBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual Iso639 Language { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -52,17 +52,18 @@ namespace Marechai.Database.Models
[StringLength(50)]
public string Model { get; set; }
public virtual Company Company { get; set; }
public virtual MachineFamily Family { get; set; }
public virtual ICollection<GpusByMachine> Gpus { get; set; }
public virtual ICollection<MemoryByMachine> Memory { get; set; }
public virtual ICollection<ProcessorsByMachine> Processors { get; set; }
public virtual ICollection<SoundByMachine> Sound { get; set; }
public virtual ICollection<StorageByMachine> Storage { get; set; }
public virtual ICollection<MachinePhoto> Photos { get; set; }
public virtual ICollection<ScreensByMachine> Screens { get; set; }
public virtual ICollection<DocumentsByMachine> Documents { get; set; }
public virtual ICollection<BooksByMachine> Books { get; set; }
public virtual ICollection<MagazinesByMachine> Magazines { get; set; }
public virtual Company Company { get; set; }
public virtual MachineFamily Family { get; set; }
public virtual ICollection<GpusByMachine> Gpus { get; set; }
public virtual ICollection<MemoryByMachine> Memory { get; set; }
public virtual ICollection<ProcessorsByMachine> Processors { get; set; }
public virtual ICollection<SoundByMachine> Sound { get; set; }
public virtual ICollection<StorageByMachine> Storage { get; set; }
public virtual ICollection<MachinePhoto> Photos { get; set; }
public virtual ICollection<ScreensByMachine> Screens { get; set; }
public virtual ICollection<DocumentsByMachine> Documents { get; set; }
public virtual ICollection<BooksByMachine> Books { get; set; }
public virtual ICollection<MagazinesByMachine> Magazines { get; set; }
public virtual ICollection<MachinesBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class MachineFamiliesBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual MachineFamily MachineFamily { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -36,10 +36,11 @@ namespace Marechai.Database.Models
[Required, StringLength(255)]
public string Name { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<Machine> Machines { get; set; }
public virtual ICollection<DocumentsByMachineFamily> Documents { get; set; }
public virtual ICollection<BooksByMachineFamily> Books { get; set; }
public virtual ICollection<MagazinesByMachineFamily> Magazines { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<Machine> Machines { get; set; }
public virtual ICollection<DocumentsByMachineFamily> Documents { get; set; }
public virtual ICollection<BooksByMachineFamily> Books { get; set; }
public virtual ICollection<MagazinesByMachineFamily> Magazines { get; set; }
public virtual ICollection<MachineFamiliesBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class MachinesBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual Machine Machine { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -120,6 +120,8 @@ namespace Marechai.Database.Models
public virtual DbSet<MediaFile> MediaFiles { get; set; }
public virtual DbSet<Dump> Dumps { get; set; }
public virtual DbSet<SoftwareFamily> SoftwareFamilies { get; set; }
public virtual DbSet<SoftwareVariant> SoftwareVariants { get; set; }
public virtual DbSet<StandaloneFile> StandaloneFiles { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
@@ -1853,6 +1855,124 @@ namespace Marechai.Database.Models
entity.HasOne(d => d.Person).WithMany(p => p.SoftwareVersions).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVersion).WithMany(p => p.People).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<SoftwareVariant>(entity =>
{
entity.HasIndex(e => e.Introduced);
entity.HasIndex(e => e.Name);
entity.HasIndex(e => e.CatalogueNumber);
entity.HasIndex(e => e.DistributionMode);
entity.HasIndex(e => e.MinimumMemory);
entity.HasIndex(e => e.PartNumber);
entity.HasIndex(e => e.ProductCode);
entity.HasIndex(e => e.RecommendedMemory);
entity.HasIndex(e => e.RequiredStorage);
entity.HasIndex(e => e.SerialNumber);
entity.HasIndex(e => e.Version);
entity.HasOne(e => e.Parent).WithMany(e => e.Derivates).OnDelete(DeleteBehavior.SetNull);
entity.HasOne(e => e.SoftwareVersion).WithMany(e => e.Variants).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<CompaniesBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.Company).WithMany(p => p.SoftwareVariants).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Companies).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<GpusBySoftwareVariant>(entity =>
{
entity.HasIndex(e => e.Minimum);
entity.HasIndex(e => e.Recommended);
entity.HasOne(d => d.Gpu).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Gpus).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<InstructionSetsBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.InstructionSet).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Architectures).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<LanguagesBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.Language).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Languages).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<MachineFamiliesBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.MachineFamily).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.MachineFamilies).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<MachinesBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.Machine).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Machines).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<MediaBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.Media).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Media).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<PeopleBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.Person).WithMany(p => p.SoftwareVariants).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.People).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<ProcessorsBySoftwareVariant>(entity =>
{
entity.HasIndex(e => e.Minimum);
entity.HasIndex(e => e.Recommended);
entity.HasIndex(e => e.Speed);
entity.HasOne(d => d.Processor).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Processors).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<RequiredOperatingSystemsBySofwareVariant>(entity =>
{
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.RequiredOperatingSystems).
OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<RequiredSoftwareBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.RequiredSoftware).
OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<SoundBySoftwareVariant>(entity =>
{
entity.HasOne(d => d.SoundSynth).WithMany(p => p.Software).OnDelete(DeleteBehavior.Cascade);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.SupportedSound).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<FileDataStreamsByStandaloneFile>(entity =>
{
entity.HasOne(d => d.StandaloneFile).WithMany(p => p.DataStreams).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<StandaloneFile>(entity =>
{
entity.HasIndex(e => e.Path);
entity.HasIndex(e => e.Name);
entity.HasIndex(e => e.IsDirectory);
entity.HasIndex(e => e.CreationDate);
entity.HasIndex(e => e.AccessDate);
entity.HasIndex(e => e.StatusChangeDate);
entity.HasIndex(e => e.BackupDate);
entity.HasIndex(e => e.LastWriteDate);
entity.HasIndex(e => e.GroupId);
entity.HasIndex(e => e.UserId);
entity.HasOne(d => d.SoftwareVariant).WithMany(p => p.Files).OnDelete(DeleteBehavior.Cascade);
});
}
}
}

View File

@@ -59,5 +59,6 @@ namespace Marechai.Database.Models
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
public virtual ICollection<MediaDump> MediaDumps { get; set; }
public virtual ICollection<Dump> Dumps { get; set; }
public virtual ICollection<MediaBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class MediaBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual Media Media { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -23,36 +23,12 @@
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Aaru.CommonTypes.Structs;
namespace Marechai.Database.Models
{
public class MediaFile : BaseModel<ulong>
public class MediaFile : BaseFile
{
[StringLength(8192), Required]
public string Path { get; set; }
[StringLength(255), Required]
public string Name { get; set; }
[Required, DefaultValue('/')]
public char PathSeparator { get; set; }
public bool IsDirectory { get; set; }
public DateTime? CreationDate { get; set; }
public DateTime? AccessDate { get; set; }
public DateTime? StatusChangeDate { get; set; }
public DateTime? BackupDate { get; set; }
public DateTime? LastWriteDate { get; set; }
public FileAttributes Attributes { get; set; }
public ushort? PosixMode { get; set; }
public uint? DeviceNumber { get; set; }
public ulong? GroupId { get; set; }
public ulong? UserId { get; set; }
public ulong? Inode { get; set; }
public ulong? Links { get; set; }
public virtual ICollection<FileDataStreamsByMediaFile> DataStreams { get; set; }
}
}

View File

@@ -0,0 +1,39 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class PeopleBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
[Required]
public virtual Person Person { get; set; }
[Required]
public virtual DocumentRole Role { get; set; }
}
}

View File

@@ -62,5 +62,6 @@ namespace Marechai.Database.Models
public virtual DocumentPerson DocumentPerson { get; set; }
public virtual ICollection<PeopleBySoftwareFamily> SoftwareFamilies { get; set; }
public virtual ICollection<PeopleBySoftwareVersion> SoftwareVersions { get; set; }
public virtual ICollection<PeopleBySoftwareVariant> SoftwareVariants { get; set; }
}
}

View File

@@ -92,5 +92,6 @@ namespace Marechai.Database.Models
public virtual InstructionSet InstructionSet { get; set; }
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensions { get; set; }
public virtual ICollection<ProcessorsByMachine> ProcessorsByMachine { get; set; }
public virtual ICollection<ProcessorsBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,40 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class ProcessorsBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual Processor Processor { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
public float? Speed { get; set; }
public bool? Minimum { get; set; }
public bool? Recommended { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class RequiredOperatingSystemsBySofwareVariant : BaseModel<ulong>
{
[Required]
public virtual SoftwareVersion OperatingSystem { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class RequiredSoftwareBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual SoftwareVersion SoftwareVersion { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -0,0 +1,64 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class SoftwareVariant : BaseModel<ulong>
{
public string Name { get; set; }
public string Version { get; set; }
public DateTime? Introduced { get; set; }
public virtual SoftwareVariant Parent { get; set; }
[Required]
public virtual SoftwareVersion SoftwareVersion { get; set; }
public ulong? MinimumMemory { get; set; }
public ulong? RecommendedMemory { get; set; }
public ulong? RequiredStorage { get; set; }
public string PartNumber { get; set; }
public string SerialNumber { get; set; }
public string ProductCode { get; set; }
public string CatalogueNumber { get; set; }
public DistributionMode DistributionMode { get; set; }
public virtual ICollection<SoftwareVariant> Derivates { get; set; }
public virtual ICollection<CompaniesBySoftwareVariant> Companies { get; set; }
public virtual ICollection<GpusBySoftwareVariant> Gpus { get; set; }
public virtual ICollection<InstructionSetsBySoftwareVariant> Architectures { get; set; }
public virtual ICollection<LanguagesBySoftwareVariant> Languages { get; set; }
public virtual ICollection<MachineFamiliesBySoftwareVariant> MachineFamilies { get; set; }
public virtual ICollection<MachinesBySoftwareVariant> Machines { get; set; }
public virtual ICollection<MediaBySoftwareVariant> Media { get; set; }
public virtual ICollection<PeopleBySoftwareVariant> People { get; set; }
public virtual ICollection<ProcessorsBySoftwareVariant> Processors { get; set; }
public virtual ICollection<RequiredOperatingSystemsBySofwareVariant> RequiredOperatingSystems { get; set; }
public virtual ICollection<RequiredSoftwareBySoftwareVariant> RequiredSoftware { get; set; }
public virtual ICollection<SoundBySoftwareVariant> SupportedSound { get; set; }
public virtual ICollection<StandaloneFile> Files { get; set; }
}
}

View File

@@ -43,5 +43,6 @@ namespace Marechai.Database.Models
public virtual SoftwareVersion Next { get; set; }
public virtual ICollection<CompaniesBySoftwareVersion> Companies { get; set; }
public virtual ICollection<PeopleBySoftwareVersion> People { get; set; }
public virtual ICollection<SoftwareVariant> Variants { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class SoundBySoftwareVariant : BaseModel<ulong>
{
[Required]
public virtual SoundSynth SoundSynth { get; set; }
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
}
}

View File

@@ -53,7 +53,8 @@ namespace Marechai.Database.Models
public int? WhiteNoise { get; set; }
public int? Type { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<SoundByMachine> SoundByMachine { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<SoundByMachine> SoundByMachine { get; set; }
public virtual ICollection<SoundBySoftwareVariant> Software { get; set; }
}
}

View File

@@ -0,0 +1,38 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class StandaloneFile : BaseFile
{
[Required]
public virtual SoftwareVariant SoftwareVariant { get; set; }
public virtual ICollection<FileDataStreamsByStandaloneFile> DataStreams { get; set; }
}
}

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>4.0.0.1713</Version>
<Version>4.0.0.1723</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>