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

@@ -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; }
}
}