Add optical media tracks.

This commit is contained in:
2020-06-11 23:00:57 +01:00
parent 4fba49818c
commit 0eda8e60f1
6 changed files with 6731 additions and 1 deletions

File diff suppressed because it is too large Load Diff

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 Microsoft.EntityFrameworkCore.Migrations;
namespace Marechai.Database.Migrations
{
public partial class AddOpticalMediaTableOfContents : Migration
{
protected override void Up(MigrationBuilder migrationBuilder) =>
migrationBuilder.AddColumn<string>("TableOfContents", "Media", nullable: true);
protected override void Down(MigrationBuilder migrationBuilder) =>
migrationBuilder.DropColumn("TableOfContents", "Media");
}
}

View File

@@ -2017,6 +2017,8 @@ namespace Marechai.Database.Migrations
b.Property<int?>("StorageInterface").HasColumnType("int");
b.Property<string>("TableOfContents").HasColumnType("json");
b.Property<string>("Title").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property<ushort?>("Tracks").HasColumnType("smallint unsigned");

View File

@@ -55,6 +55,7 @@ namespace Marechai.Database.Models
public int? LogicalBlockSize { get; set; }
public JsonObject<VariableBlockSize[]> BlockSizes { get; set; }
public StorageInterface? StorageInterface { get; set; }
public JsonObject<OpticalDiscTrack[]> TableOfContents { get; set; }
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
public virtual ICollection<MediaDump> MediaDumps { get; set; }

View File

@@ -0,0 +1,14 @@
using Aaru.CommonTypes.Enums;
namespace Marechai.Database.Models
{
// Not for a table
public class OpticalDiscTrack
{
public int TrackNumber { get; set; }
public int SessionNumber { get; set; }
public long FirstSector { get; set; }
public long LastSector { get; set; }
public TrackType Type { get; set; }
}
}