mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 11:04:25 +00:00
Update dependencies.
This commit is contained in:
@@ -4,14 +4,15 @@
|
|||||||
<RootNamespace>Marechai.Database</RootNamespace>
|
<RootNamespace>Marechai.Database</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.6">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.1" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.2" />
|
||||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||||
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Json.Microsoft" Version="5.0.0-alpha.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
|
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
|
||||||
|
|||||||
7934
Marechai.Database/Migrations/20201220155949_FixCurrenciesNullability.Designer.cs
generated
Normal file
7934
Marechai.Database/Migrations/20201220155949_FixCurrenciesNullability.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Marechai.Database.Migrations
|
||||||
|
{
|
||||||
|
public partial class FixCurrenciesNullability : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>("SourceCode", "CurrenciesPegging", "varchar(3) CHARACTER SET utf8mb4",
|
||||||
|
nullable: false, defaultValue: "", oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(3) CHARACTER SET utf8mb4", oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>("DestinationCode", "CurrenciesPegging",
|
||||||
|
"varchar(3) CHARACTER SET utf8mb4", nullable: false, defaultValue: "",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(3) CHARACTER SET utf8mb4", oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>("CurrencyCode", "CurrenciesInflation",
|
||||||
|
"varchar(3) CHARACTER SET utf8mb4", nullable: false, defaultValue: "",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(3) CHARACTER SET utf8mb4", oldNullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>("SourceCode", "CurrenciesPegging", "varchar(3) CHARACTER SET utf8mb4",
|
||||||
|
nullable: true, oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(3) CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>("DestinationCode", "CurrenciesPegging",
|
||||||
|
"varchar(3) CHARACTER SET utf8mb4", nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(3) CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>("CurrencyCode", "CurrenciesInflation",
|
||||||
|
"varchar(3) CHARACTER SET utf8mb4", nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(3) CHARACTER SET utf8mb4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
{
|
{
|
||||||
@@ -8,12 +8,16 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
public AuditType Type { get; set; }
|
public AuditType Type { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string Table { get; set; }
|
public string Table { get; set; }
|
||||||
public JsonObject<Dictionary<string, object>> Keys { get; set; }
|
[Column(TypeName = "json")]
|
||||||
public JsonObject<Dictionary<string, object>> OldValues { get; set; }
|
public Dictionary<string, object> Keys { get; set; }
|
||||||
public JsonObject<Dictionary<string, object>> NewValues { get; set; }
|
[Column(TypeName = "json")]
|
||||||
public JsonObject<List<string>> AffectedColumns { get; set; }
|
public Dictionary<string, object> OldValues { get; set; }
|
||||||
|
[Column(TypeName = "json")]
|
||||||
|
public Dictionary<string, object> NewValues { get; set; }
|
||||||
|
[Column(TypeName = "json")]
|
||||||
|
public List<string> AffectedColumns { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public virtual ApplicationUser User { get; set; }
|
public virtual ApplicationUser User { get; set; }
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
// Copyright © 2003-2020 Natalia Portillo
|
// Copyright © 2003-2020 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
{
|
{
|
||||||
@@ -46,8 +46,8 @@ namespace Marechai.Database.Models
|
|||||||
public string SoftwareVersion { get; set; }
|
public string SoftwareVersion { get; set; }
|
||||||
[StringLength(64)]
|
[StringLength(64)]
|
||||||
public string SoftwareOperatingSystem { get; set; }
|
public string SoftwareOperatingSystem { get; set; }
|
||||||
[Required]
|
[Required, Column(TypeName = "json")]
|
||||||
public JsonObject<Extent[]> Extents { get; set; }
|
public Extent[] Extents { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Dump Dump { get; set; }
|
public virtual Dump Dump { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,5 +34,7 @@ namespace Marechai.Database.Models
|
|||||||
public ulong Size { get; set; }
|
public ulong Size { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual DbFile File { get; set; }
|
public virtual DbFile File { get; set; }
|
||||||
|
|
||||||
|
public ulong FileId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,5 +33,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual FileDataStream FileDataStream { get; set; }
|
public virtual FileDataStream FileDataStream { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual MediaFile MediaFile { get; set; }
|
public virtual MediaFile MediaFile { get; set; }
|
||||||
|
|
||||||
|
public ulong FileDataStreamId { get; set; }
|
||||||
|
public ulong MediaFileId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,5 +33,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual FileDataStream FileDataStream { get; set; }
|
public virtual FileDataStream FileDataStream { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual StandaloneFile StandaloneFile { get; set; }
|
public virtual StandaloneFile StandaloneFile { get; set; }
|
||||||
|
|
||||||
|
public ulong FileDataStreamId { get; set; }
|
||||||
|
public ulong StandaloneFileId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,5 +33,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual Filesystem Filesystem { get; set; }
|
public virtual Filesystem Filesystem { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual MediaFile File { get; set; }
|
public virtual MediaFile File { get; set; }
|
||||||
|
|
||||||
|
public ulong FilesystemId { get; set; }
|
||||||
|
public ulong FileId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
// Copyright © 2003-2020 Natalia Portillo
|
// Copyright © 2003-2020 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Marechai.Database.Schemas;
|
using Marechai.Database.Schemas;
|
||||||
@@ -141,7 +142,7 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
|
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
|
||||||
IConfigurationRoot configuration = builder.Build();
|
IConfigurationRoot configuration = builder.Build();
|
||||||
optionsBuilder.UseMySql(configuration.GetConnectionString("DefaultConnection")).UseLazyLoadingProxies();
|
optionsBuilder.UseMySql(configuration.GetConnectionString("DefaultConnection"), new MariaDbServerVersion(new Version(10, 5, 0)), b=> b.UseMicrosoftJson()).UseLazyLoadingProxies();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> SaveChangesWithUserAsync(string userId)
|
public async Task<int> SaveChangesWithUserAsync(string userId)
|
||||||
@@ -237,7 +238,7 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.HasIndex(e => e.CountryId);
|
entity.HasIndex(e => e.CountryId);
|
||||||
|
|
||||||
entity.HasIndex(e => e.Synopsis).ForMySqlIsFullText();
|
entity.HasIndex(e => e.Synopsis).IsFullText();
|
||||||
|
|
||||||
entity.HasIndex(e => e.Isbn);
|
entity.HasIndex(e => e.Isbn);
|
||||||
|
|
||||||
@@ -280,15 +281,15 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("browser_tests");
|
entity.ToTable("browser_tests");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Browser).HasName("idx_browser_tests_browser");
|
entity.HasIndex(e => e.Browser).HasDatabaseName("idx_browser_tests_browser");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Os).HasName("idx_browser_tests_os");
|
entity.HasIndex(e => e.Os).HasDatabaseName("idx_browser_tests_os");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Platform).HasName("idx_browser_tests_platform");
|
entity.HasIndex(e => e.Platform).HasDatabaseName("idx_browser_tests_platform");
|
||||||
|
|
||||||
entity.HasIndex(e => e.UserAgent).HasName("idx_browser_tests_user_agent");
|
entity.HasIndex(e => e.UserAgent).HasDatabaseName("idx_browser_tests_user_agent");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Version).HasName("idx_browser_tests_version");
|
entity.HasIndex(e => e.Version).HasDatabaseName("idx_browser_tests_version");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -394,31 +395,31 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("companies");
|
entity.ToTable("companies");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Address).HasName("idx_companies_address");
|
entity.HasIndex(e => e.Address).HasDatabaseName("idx_companies_address");
|
||||||
|
|
||||||
entity.HasIndex(e => e.City).HasName("idx_companies_city");
|
entity.HasIndex(e => e.City).HasDatabaseName("idx_companies_city");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CountryId).HasName("idx_companies_country");
|
entity.HasIndex(e => e.CountryId).HasDatabaseName("idx_companies_country");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Facebook).HasName("idx_companies_facebook");
|
entity.HasIndex(e => e.Facebook).HasDatabaseName("idx_companies_facebook");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Founded).HasName("idx_companies_founded");
|
entity.HasIndex(e => e.Founded).HasDatabaseName("idx_companies_founded");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_companies_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_companies_name");
|
||||||
|
|
||||||
entity.HasIndex(e => e.PostalCode).HasName("idx_companies_postal_code");
|
entity.HasIndex(e => e.PostalCode).HasDatabaseName("idx_companies_postal_code");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Province).HasName("idx_companies_province");
|
entity.HasIndex(e => e.Province).HasDatabaseName("idx_companies_province");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Sold).HasName("idx_companies_sold");
|
entity.HasIndex(e => e.Sold).HasDatabaseName("idx_companies_sold");
|
||||||
|
|
||||||
entity.HasIndex(e => e.SoldToId).HasName("idx_companies_sold_to");
|
entity.HasIndex(e => e.SoldToId).HasDatabaseName("idx_companies_sold_to");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Status).HasName("idx_companies_status");
|
entity.HasIndex(e => e.Status).HasDatabaseName("idx_companies_status");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Twitter).HasName("idx_companies_twitter");
|
entity.HasIndex(e => e.Twitter).HasDatabaseName("idx_companies_twitter");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Website).HasName("idx_companies_website");
|
entity.HasIndex(e => e.Website).HasDatabaseName("idx_companies_website");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -459,7 +460,7 @@ namespace Marechai.Database.Models
|
|||||||
HasForeignKey<DocumentCompany>(d => d.CompanyId).OnDelete(DeleteBehavior.SetNull);
|
HasForeignKey<DocumentCompany>(d => d.CompanyId).OnDelete(DeleteBehavior.SetNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<CompanyDescription>().HasIndex(e => e.Text).ForMySqlIsFullText();
|
modelBuilder.Entity<CompanyDescription>().HasIndex(e => e.Text).IsFullText();
|
||||||
|
|
||||||
modelBuilder.Entity<CompanyLogo>(entity =>
|
modelBuilder.Entity<CompanyLogo>(entity =>
|
||||||
{
|
{
|
||||||
@@ -472,11 +473,11 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.ToTable("company_logos");
|
entity.ToTable("company_logos");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CompanyId).HasName("idx_company_id");
|
entity.HasIndex(e => e.CompanyId).HasDatabaseName("idx_company_id");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Id).HasName("idx_id").IsUnique();
|
entity.HasIndex(e => e.Id).HasDatabaseName("idx_id").IsUnique();
|
||||||
|
|
||||||
entity.HasIndex(e => e.Guid).HasName("idx_guid");
|
entity.HasIndex(e => e.Guid).HasDatabaseName("idx_guid");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
||||||
|
|
||||||
@@ -500,7 +501,7 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.HasIndex(e => e.CountryId);
|
entity.HasIndex(e => e.CountryId);
|
||||||
|
|
||||||
entity.HasIndex(e => e.Synopsis).ForMySqlIsFullText();
|
entity.HasIndex(e => e.Synopsis).IsFullText();
|
||||||
|
|
||||||
entity.HasOne(d => d.Country).WithMany(p => p.Documents).HasForeignKey(d => d.CountryId);
|
entity.HasOne(d => d.Country).WithMany(p => p.Documents).HasForeignKey(d => d.CountryId);
|
||||||
});
|
});
|
||||||
@@ -565,13 +566,13 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("forbidden");
|
entity.ToTable("forbidden");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Browser).HasName("idx_forbidden_browser");
|
entity.HasIndex(e => e.Browser).HasDatabaseName("idx_forbidden_browser");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Date).HasName("idx_forbidden_date");
|
entity.HasIndex(e => e.Date).HasDatabaseName("idx_forbidden_date");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Ip).HasName("idx_forbidden_ip");
|
entity.HasIndex(e => e.Ip).HasDatabaseName("idx_forbidden_ip");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Referer).HasName("idx_forbidden_referer");
|
entity.HasIndex(e => e.Referer).HasDatabaseName("idx_forbidden_referer");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -592,23 +593,23 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("gpus");
|
entity.ToTable("gpus");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CompanyId).HasName("idx_gpus_company");
|
entity.HasIndex(e => e.CompanyId).HasDatabaseName("idx_gpus_company");
|
||||||
|
|
||||||
entity.HasIndex(e => e.DieSize).HasName("idx_gpus_die_size");
|
entity.HasIndex(e => e.DieSize).HasDatabaseName("idx_gpus_die_size");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Introduced).HasName("idx_gpus_introduced");
|
entity.HasIndex(e => e.Introduced).HasDatabaseName("idx_gpus_introduced");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ModelCode).HasName("idx_gpus_model_code");
|
entity.HasIndex(e => e.ModelCode).HasDatabaseName("idx_gpus_model_code");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_gpus_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_gpus_name");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Package).HasName("idx_gpus_package");
|
entity.HasIndex(e => e.Package).HasDatabaseName("idx_gpus_package");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Process).HasName("idx_gpus_process");
|
entity.HasIndex(e => e.Process).HasDatabaseName("idx_gpus_process");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ProcessNm).HasName("idx_gpus_process_nm");
|
entity.HasIndex(e => e.ProcessNm).HasDatabaseName("idx_gpus_process_nm");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Transistors).HasName("idx_gpus_transistors");
|
entity.HasIndex(e => e.Transistors).HasDatabaseName("idx_gpus_transistors");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -639,9 +640,9 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("gpus_by_machine");
|
entity.ToTable("gpus_by_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.GpuId).HasName("idx_gpus_by_machine_gpus");
|
entity.HasIndex(e => e.GpuId).HasDatabaseName("idx_gpus_by_machine_gpus");
|
||||||
|
|
||||||
entity.HasIndex(e => e.MachineId).HasName("idx_gpus_by_machine_machine");
|
entity.HasIndex(e => e.MachineId).HasDatabaseName("idx_gpus_by_machine_machine");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
@@ -685,9 +686,9 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.ToTable("instruction_set_extensions_by_processor");
|
entity.ToTable("instruction_set_extensions_by_processor");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ExtensionId).HasName("idx_setextension_extension");
|
entity.HasIndex(e => e.ExtensionId).HasDatabaseName("idx_setextension_extension");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ProcessorId).HasName("idx_setextension_processor");
|
entity.HasIndex(e => e.ProcessorId).HasDatabaseName("idx_setextension_processor");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
||||||
|
|
||||||
@@ -717,7 +718,7 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("iso3166_1_numeric");
|
entity.ToTable("iso3166_1_numeric");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_name");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("smallint(3)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("smallint(3)");
|
||||||
|
|
||||||
@@ -751,13 +752,13 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("log");
|
entity.ToTable("log");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Browser).HasName("idx_log_browser");
|
entity.HasIndex(e => e.Browser).HasDatabaseName("idx_log_browser");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Date).HasName("idx_log_date");
|
entity.HasIndex(e => e.Date).HasDatabaseName("idx_log_date");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Ip).HasName("idx_log_ip");
|
entity.HasIndex(e => e.Ip).HasDatabaseName("idx_log_ip");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Referer).HasName("idx_log_referer");
|
entity.HasIndex(e => e.Referer).HasDatabaseName("idx_log_referer");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -778,9 +779,9 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("machine_families");
|
entity.ToTable("machine_families");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CompanyId).HasName("idx_machine_families_company");
|
entity.HasIndex(e => e.CompanyId).HasDatabaseName("idx_machine_families_company");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_machine_families_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_machine_families_name");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -796,17 +797,17 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("machines");
|
entity.ToTable("machines");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CompanyId).HasName("idx_machines_company");
|
entity.HasIndex(e => e.CompanyId).HasDatabaseName("idx_machines_company");
|
||||||
|
|
||||||
entity.HasIndex(e => e.FamilyId).HasName("idx_machines_family");
|
entity.HasIndex(e => e.FamilyId).HasDatabaseName("idx_machines_family");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Introduced).HasName("idx_machines_introduced");
|
entity.HasIndex(e => e.Introduced).HasDatabaseName("idx_machines_introduced");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Model).HasName("idx_machines_model");
|
entity.HasIndex(e => e.Model).HasDatabaseName("idx_machines_model");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_machines_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_machines_name");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Type).HasName("idx_machines_type");
|
entity.HasIndex(e => e.Type).HasDatabaseName("idx_machines_type");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1015,7 +1016,7 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
entity.HasIndex(e => e.CountryId);
|
entity.HasIndex(e => e.CountryId);
|
||||||
|
|
||||||
entity.HasIndex(e => e.Synopsis).ForMySqlIsFullText();
|
entity.HasIndex(e => e.Synopsis).IsFullText();
|
||||||
|
|
||||||
entity.HasIndex(e => e.Issn);
|
entity.HasIndex(e => e.Issn);
|
||||||
|
|
||||||
@@ -1065,15 +1066,15 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("memory_by_machine");
|
entity.ToTable("memory_by_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.MachineId).HasName("idx_memory_by_machine_machine");
|
entity.HasIndex(e => e.MachineId).HasDatabaseName("idx_memory_by_machine_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Size).HasName("idx_memory_by_machine_size");
|
entity.HasIndex(e => e.Size).HasDatabaseName("idx_memory_by_machine_size");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Speed).HasName("idx_memory_by_machine_speed");
|
entity.HasIndex(e => e.Speed).HasDatabaseName("idx_memory_by_machine_speed");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Type).HasName("idx_memory_by_machine_type");
|
entity.HasIndex(e => e.Type).HasDatabaseName("idx_memory_by_machine_type");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Usage).HasName("idx_memory_by_machine_usage");
|
entity.HasIndex(e => e.Usage).HasDatabaseName("idx_memory_by_machine_usage");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
@@ -1110,9 +1111,9 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("money_donations");
|
entity.ToTable("money_donations");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Donator).HasName("idx_money_donations_donator");
|
entity.HasIndex(e => e.Donator).HasDatabaseName("idx_money_donations_donator");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Quantity).HasName("idx_money_donations_quantity");
|
entity.HasIndex(e => e.Quantity).HasDatabaseName("idx_money_donations_quantity");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1127,11 +1128,11 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("news");
|
entity.ToTable("news");
|
||||||
|
|
||||||
entity.HasIndex(e => e.AddedId).HasName("idx_news_ip");
|
entity.HasIndex(e => e.AddedId).HasDatabaseName("idx_news_ip");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Date).HasName("idx_news_date");
|
entity.HasIndex(e => e.Date).HasDatabaseName("idx_news_date");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Type).HasName("idx_news_type");
|
entity.HasIndex(e => e.Type).HasDatabaseName("idx_news_type");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1227,55 +1228,55 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("processors");
|
entity.ToTable("processors");
|
||||||
|
|
||||||
entity.HasIndex(e => e.AddrBus).HasName("idx_processors_addr_bus");
|
entity.HasIndex(e => e.AddrBus).HasDatabaseName("idx_processors_addr_bus");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CompanyId).HasName("idx_processors_company");
|
entity.HasIndex(e => e.CompanyId).HasDatabaseName("idx_processors_company");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Cores).HasName("idx_processors_cores");
|
entity.HasIndex(e => e.Cores).HasDatabaseName("idx_processors_cores");
|
||||||
|
|
||||||
entity.HasIndex(e => e.DataBus).HasName("idx_processors_data_bus");
|
entity.HasIndex(e => e.DataBus).HasDatabaseName("idx_processors_data_bus");
|
||||||
|
|
||||||
entity.HasIndex(e => e.DieSize).HasName("idx_processors_die_size");
|
entity.HasIndex(e => e.DieSize).HasDatabaseName("idx_processors_die_size");
|
||||||
|
|
||||||
entity.HasIndex(e => e.FprSize).HasName("idx_processors_FPR_size");
|
entity.HasIndex(e => e.FprSize).HasDatabaseName("idx_processors_FPR_size");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Fprs).HasName("idx_processors_FPRs");
|
entity.HasIndex(e => e.Fprs).HasDatabaseName("idx_processors_FPRs");
|
||||||
|
|
||||||
entity.HasIndex(e => e.GprSize).HasName("idx_processors_GPR_size");
|
entity.HasIndex(e => e.GprSize).HasDatabaseName("idx_processors_GPR_size");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Gprs).HasName("idx_processors_GPRs");
|
entity.HasIndex(e => e.Gprs).HasDatabaseName("idx_processors_GPRs");
|
||||||
|
|
||||||
entity.HasIndex(e => e.InstructionSetId).HasName("idx_processors_instruction_set");
|
entity.HasIndex(e => e.InstructionSetId).HasDatabaseName("idx_processors_instruction_set");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Introduced).HasName("idx_processors_introduced");
|
entity.HasIndex(e => e.Introduced).HasDatabaseName("idx_processors_introduced");
|
||||||
|
|
||||||
entity.HasIndex(e => e.L1Data).HasName("idx_processors_L1_data");
|
entity.HasIndex(e => e.L1Data).HasDatabaseName("idx_processors_L1_data");
|
||||||
|
|
||||||
entity.HasIndex(e => e.L1Instruction).HasName("idx_processors_L1_instruction");
|
entity.HasIndex(e => e.L1Instruction).HasDatabaseName("idx_processors_L1_instruction");
|
||||||
|
|
||||||
entity.HasIndex(e => e.L2).HasName("idx_processors_L2");
|
entity.HasIndex(e => e.L2).HasDatabaseName("idx_processors_L2");
|
||||||
|
|
||||||
entity.HasIndex(e => e.L3).HasName("idx_processors_L3");
|
entity.HasIndex(e => e.L3).HasDatabaseName("idx_processors_L3");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ModelCode).HasName("idx_processors_model_code");
|
entity.HasIndex(e => e.ModelCode).HasDatabaseName("idx_processors_model_code");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_processors_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_processors_name");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Package).HasName("idx_processors_package");
|
entity.HasIndex(e => e.Package).HasDatabaseName("idx_processors_package");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Process).HasName("idx_processors_process");
|
entity.HasIndex(e => e.Process).HasDatabaseName("idx_processors_process");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ProcessNm).HasName("idx_processors_process_nm");
|
entity.HasIndex(e => e.ProcessNm).HasDatabaseName("idx_processors_process_nm");
|
||||||
|
|
||||||
entity.HasIndex(e => e.SimdRegisters).HasName("idx_processors_SIMD_registers");
|
entity.HasIndex(e => e.SimdRegisters).HasDatabaseName("idx_processors_SIMD_registers");
|
||||||
|
|
||||||
entity.HasIndex(e => e.SimdSize).HasName("idx_processors_SIMD_size");
|
entity.HasIndex(e => e.SimdSize).HasDatabaseName("idx_processors_SIMD_size");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Speed).HasName("idx_processors_speed");
|
entity.HasIndex(e => e.Speed).HasDatabaseName("idx_processors_speed");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ThreadsPerCore).HasName("idx_processors_threads_per_core");
|
entity.HasIndex(e => e.ThreadsPerCore).HasDatabaseName("idx_processors_threads_per_core");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Transistors).HasName("idx_processors_transistors");
|
entity.HasIndex(e => e.Transistors).HasDatabaseName("idx_processors_transistors");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1337,11 +1338,11 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("processors_by_machine");
|
entity.ToTable("processors_by_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.MachineId).HasName("idx_processors_by_machine_machine");
|
entity.HasIndex(e => e.MachineId).HasDatabaseName("idx_processors_by_machine_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ProcessorId).HasName("idx_processors_by_machine_processor");
|
entity.HasIndex(e => e.ProcessorId).HasDatabaseName("idx_processors_by_machine_processor");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Speed).HasName("idx_processors_by_machine_speed");
|
entity.HasIndex(e => e.Speed).HasDatabaseName("idx_processors_by_machine_speed");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
@@ -1373,26 +1374,26 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("resolutions");
|
entity.ToTable("resolutions");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Colors).HasName("idx_resolutions_colors");
|
entity.HasIndex(e => e.Colors).HasDatabaseName("idx_resolutions_colors");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Height).HasName("idx_resolutions_height");
|
entity.HasIndex(e => e.Height).HasDatabaseName("idx_resolutions_height");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Palette).HasName("idx_resolutions_palette");
|
entity.HasIndex(e => e.Palette).HasDatabaseName("idx_resolutions_palette");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Width).HasName("idx_resolutions_width");
|
entity.HasIndex(e => e.Width).HasDatabaseName("idx_resolutions_width");
|
||||||
|
|
||||||
entity.HasIndex(e => new
|
entity.HasIndex(e => new
|
||||||
{
|
{
|
||||||
e.Width,
|
e.Width,
|
||||||
e.Height
|
e.Height
|
||||||
}).HasName("idx_resolutions_resolution");
|
}).HasDatabaseName("idx_resolutions_resolution");
|
||||||
|
|
||||||
entity.HasIndex(e => new
|
entity.HasIndex(e => new
|
||||||
{
|
{
|
||||||
e.Width,
|
e.Width,
|
||||||
e.Height,
|
e.Height,
|
||||||
e.Colors
|
e.Colors
|
||||||
}).HasName("idx_resolutions_resolution_with_color");
|
}).HasDatabaseName("idx_resolutions_resolution_with_color");
|
||||||
|
|
||||||
entity.HasIndex(e => new
|
entity.HasIndex(e => new
|
||||||
{
|
{
|
||||||
@@ -1400,7 +1401,7 @@ namespace Marechai.Database.Models
|
|||||||
e.Height,
|
e.Height,
|
||||||
e.Colors,
|
e.Colors,
|
||||||
e.Palette
|
e.Palette
|
||||||
}).HasName("idx_resolutions_resolution_with_color_and_palette");
|
}).HasDatabaseName("idx_resolutions_resolution_with_color_and_palette");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1421,9 +1422,9 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("resolutions_by_gpu");
|
entity.ToTable("resolutions_by_gpu");
|
||||||
|
|
||||||
entity.HasIndex(e => e.GpuId).HasName("idx_resolutions_by_gpu_gpu");
|
entity.HasIndex(e => e.GpuId).HasDatabaseName("idx_resolutions_by_gpu_gpu");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ResolutionId).HasName("idx_resolutions_by_gpu_resolution");
|
entity.HasIndex(e => e.ResolutionId).HasDatabaseName("idx_resolutions_by_gpu_resolution");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
@@ -1471,9 +1472,9 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("sound_by_machine");
|
entity.ToTable("sound_by_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.MachineId).HasName("idx_sound_by_machine_machine");
|
entity.HasIndex(e => e.MachineId).HasDatabaseName("idx_sound_by_machine_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.SoundSynthId).HasName("idx_sound_by_machine_sound_synth");
|
entity.HasIndex(e => e.SoundSynthId).HasDatabaseName("idx_sound_by_machine_sound_synth");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
@@ -1501,25 +1502,25 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("sound_synths");
|
entity.ToTable("sound_synths");
|
||||||
|
|
||||||
entity.HasIndex(e => e.CompanyId).HasName("idx_sound_synths_company");
|
entity.HasIndex(e => e.CompanyId).HasDatabaseName("idx_sound_synths_company");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Depth).HasName("idx_sound_synths_depth");
|
entity.HasIndex(e => e.Depth).HasDatabaseName("idx_sound_synths_depth");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Frequency).HasName("idx_sound_synths_frequency");
|
entity.HasIndex(e => e.Frequency).HasDatabaseName("idx_sound_synths_frequency");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Introduced).HasName("idx_sound_synths_introduced");
|
entity.HasIndex(e => e.Introduced).HasDatabaseName("idx_sound_synths_introduced");
|
||||||
|
|
||||||
entity.HasIndex(e => e.ModelCode).HasName("idx_sound_synths_model_code");
|
entity.HasIndex(e => e.ModelCode).HasDatabaseName("idx_sound_synths_model_code");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Name).HasName("idx_sound_synths_name");
|
entity.HasIndex(e => e.Name).HasDatabaseName("idx_sound_synths_name");
|
||||||
|
|
||||||
entity.HasIndex(e => e.SquareWave).HasName("idx_sound_synths_square_wave");
|
entity.HasIndex(e => e.SquareWave).HasDatabaseName("idx_sound_synths_square_wave");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Type).HasName("idx_sound_synths_type");
|
entity.HasIndex(e => e.Type).HasDatabaseName("idx_sound_synths_type");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Voices).HasName("idx_sound_synths_voices");
|
entity.HasIndex(e => e.Voices).HasDatabaseName("idx_sound_synths_voices");
|
||||||
|
|
||||||
entity.HasIndex(e => e.WhiteNoise).HasName("idx_sound_synths_white_noise");
|
entity.HasIndex(e => e.WhiteNoise).HasDatabaseName("idx_sound_synths_white_noise");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|
||||||
@@ -1552,13 +1553,13 @@ namespace Marechai.Database.Models
|
|||||||
{
|
{
|
||||||
entity.ToTable("storage_by_machine");
|
entity.ToTable("storage_by_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Capacity).HasName("idx_storage_capacity");
|
entity.HasIndex(e => e.Capacity).HasDatabaseName("idx_storage_capacity");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Interface).HasName("idx_storage_interface");
|
entity.HasIndex(e => e.Interface).HasDatabaseName("idx_storage_interface");
|
||||||
|
|
||||||
entity.HasIndex(e => e.MachineId).HasName("idx_storage_machine");
|
entity.HasIndex(e => e.MachineId).HasDatabaseName("idx_storage_machine");
|
||||||
|
|
||||||
entity.HasIndex(e => e.Type).HasName("idx_storage_type");
|
entity.HasIndex(e => e.Type).HasDatabaseName("idx_storage_type");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
// Copyright © 2003-2020 Natalia Portillo
|
// Copyright © 2003-2020 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Aaru.CommonTypes;
|
using Aaru.CommonTypes;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
@@ -33,32 +33,34 @@ namespace Marechai.Database.Models
|
|||||||
public class Media : BaseModel<ulong>
|
public class Media : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public ushort? Sequence { get; set; }
|
public ushort? Sequence { get; set; }
|
||||||
public ushort? LastSequence { get; set; }
|
public ushort? LastSequence { get; set; }
|
||||||
public MediaType Type { get; set; }
|
public MediaType Type { get; set; }
|
||||||
public int? WriteOffset { get; set; }
|
public int? WriteOffset { get; set; }
|
||||||
public ushort? Sides { get; set; }
|
public ushort? Sides { get; set; }
|
||||||
public ushort? Layers { get; set; }
|
public ushort? Layers { get; set; }
|
||||||
public ushort? Sessions { get; set; }
|
public ushort? Sessions { get; set; }
|
||||||
public ushort? Tracks { get; set; }
|
public ushort? Tracks { get; set; }
|
||||||
public ulong Sectors { get; set; }
|
public ulong Sectors { get; set; }
|
||||||
public ulong Size { get; set; }
|
public ulong Size { get; set; }
|
||||||
public string CopyProtection { get; set; }
|
public string CopyProtection { get; set; }
|
||||||
public string PartNumber { get; set; }
|
public string PartNumber { get; set; }
|
||||||
public string SerialNumber { get; set; }
|
public string SerialNumber { get; set; }
|
||||||
public string Barcode { get; set; }
|
public string Barcode { get; set; }
|
||||||
public string CatalogueNumber { get; set; }
|
public string CatalogueNumber { get; set; }
|
||||||
public string Manufacturer { get; set; }
|
public string Manufacturer { get; set; }
|
||||||
public string Model { get; set; }
|
public string Model { get; set; }
|
||||||
public string Revision { get; set; }
|
public string Revision { get; set; }
|
||||||
public string Firmware { get; set; }
|
public string Firmware { get; set; }
|
||||||
public int? PhysicalBlockSize { get; set; }
|
public int? PhysicalBlockSize { get; set; }
|
||||||
public int? LogicalBlockSize { get; set; }
|
public int? LogicalBlockSize { get; set; }
|
||||||
public JsonObject<VariableBlockSize[]> BlockSizes { get; set; }
|
[Column(TypeName = "json")]
|
||||||
public StorageInterface? StorageInterface { get; set; }
|
public VariableBlockSize[] BlockSizes { get; set; }
|
||||||
public JsonObject<OpticalDiscTrack[]> TableOfContents { get; set; }
|
public StorageInterface? StorageInterface { get; set; }
|
||||||
public virtual MagazineIssue MagazineIssue { get; set; }
|
[Column(TypeName = "json")]
|
||||||
|
public OpticalDiscTrack[] TableOfContents { get; set; }
|
||||||
|
public virtual MagazineIssue MagazineIssue { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
|
public virtual ICollection<LogicalPartitionsByMedia> LogicalPartitions { get; set; }
|
||||||
public virtual ICollection<MediaDump> MediaDumps { get; set; }
|
public virtual ICollection<MediaDump> MediaDumps { get; set; }
|
||||||
|
|||||||
@@ -10,5 +10,7 @@ namespace Marechai.Database.Models
|
|||||||
public MediaTagType Type { get; set; }
|
public MediaTagType Type { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual DbFile File { get; set; }
|
public virtual DbFile File { get; set; }
|
||||||
|
|
||||||
|
public ulong FileId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
{
|
{
|
||||||
@@ -35,5 +36,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual Person Person { get; set; }
|
public virtual Person Person { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareFamily SoftwareFamily { get; set; }
|
public virtual SoftwareFamily SoftwareFamily { get; set; }
|
||||||
|
|
||||||
|
[Column(TypeName = "char(3)"), Required]
|
||||||
|
public string RoleId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
{
|
{
|
||||||
@@ -35,5 +36,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual Person Person { get; set; }
|
public virtual Person Person { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual DocumentRole Role { get; set; }
|
public virtual DocumentRole Role { get; set; }
|
||||||
|
|
||||||
|
[Column(TypeName = "char(3)"), Required]
|
||||||
|
public string RoleId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
{
|
{
|
||||||
@@ -35,5 +36,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual Person Person { get; set; }
|
public virtual Person Person { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual DocumentRole Role { get; set; }
|
public virtual DocumentRole Role { get; set; }
|
||||||
|
|
||||||
|
[Column(TypeName = "char(3)"), Required]
|
||||||
|
public string RoleId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,5 +33,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual SoftwareVersion OperatingSystem { get; set; }
|
public virtual SoftwareVersion OperatingSystem { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
|
|
||||||
|
public ulong OperatingSystemId { get; set; }
|
||||||
|
public ulong SoftwareVariantId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,5 +33,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual SoftwareVersion SoftwareVersion { get; set; }
|
public virtual SoftwareVersion SoftwareVersion { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
|
|
||||||
|
public ulong SoftwareVersionId { get; set; }
|
||||||
|
public ulong SoftwareVariantId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,5 +37,8 @@ namespace Marechai.Database.Models
|
|||||||
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
public virtual SoftwareVariant SoftwareVariant { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public virtual Media Media { get; set; }
|
public virtual Media Media { get; set; }
|
||||||
|
|
||||||
|
public ulong SoftwareVariantId { get; set; }
|
||||||
|
public ulong MediaId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using MySql.Data.MySqlClient;
|
using MySqlConnector;
|
||||||
|
|
||||||
namespace Marechai.Database
|
namespace Marechai.Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace Marechai.Database.Seeders
|
|||||||
codes.Current = listOne.Current;
|
codes.Current = listOne.Current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Exception trying to read list one.");
|
Console.WriteLine("Exception trying to read list one.");
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ namespace Marechai.Database.Seeders
|
|||||||
codes.Historical = listThree.Historical;
|
codes.Historical = listThree.Historical;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Exception trying to read list three.");
|
Console.WriteLine("Exception trying to read list three.");
|
||||||
}
|
}
|
||||||
|
|||||||
9
Marechai/Directory.Build.props
Normal file
9
Marechai/Directory.Build.props
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Packaging.Targets">
|
||||||
|
<Version>0.1.189-*</Version>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -213,7 +213,7 @@ namespace Marechai.Helpers
|
|||||||
float svgMax = Math.Max(svgSize.Width, svgSize.Height);
|
float svgMax = Math.Max(svgSize.Width, svgSize.Height);
|
||||||
float canvasMin = minSize * multiplier;
|
float canvasMin = minSize * multiplier;
|
||||||
float scale = canvasMin / svgMax;
|
float scale = canvasMin / svgMax;
|
||||||
var matrix = SKMatrix.MakeScale(scale, scale);
|
var matrix = SKMatrix.CreateScale(scale, scale);
|
||||||
var bitmap = new SKBitmap((int)(svgSize.Width * scale), (int)(svgSize.Height * scale));
|
var bitmap = new SKBitmap((int)(svgSize.Width * scale), (int)(svgSize.Height * scale));
|
||||||
var canvas = new SKCanvas(bitmap);
|
var canvas = new SKCanvas(bitmap);
|
||||||
canvas.Clear();
|
canvas.Clear();
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace DiscImageChef.Interop
|
|||||||
{
|
{
|
||||||
Assembly assembly = typeof(GCSettings).Assembly;
|
Assembly assembly = typeof(GCSettings).Assembly;
|
||||||
|
|
||||||
string[] assemblyPath = assembly.CodeBase.Split(new[]
|
string[] assemblyPath = assembly.Location.Split(new[]
|
||||||
{
|
{
|
||||||
'/', '\\'
|
'/', '\\'
|
||||||
}, StringSplitOptions.RemoveEmptyEntries);
|
}, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|||||||
@@ -15,24 +15,24 @@
|
|||||||
<NrtShowRevision>true</NrtShowRevision>
|
<NrtShowRevision>true</NrtShowRevision>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.1.2" />
|
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.2.4" />
|
||||||
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.1.2" />
|
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.2.4" />
|
||||||
<PackageReference Include="Markdig" Version="0.20.0" />
|
<PackageReference Include="Markdig" Version="0.22.1" />
|
||||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.14.0" />
|
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.16.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.6">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.1" />
|
||||||
<PackageReference Include="MySql.Data" Version="8.0.21" />
|
<PackageReference Include="MySql.Data" Version="8.0.22" />
|
||||||
<PackageReference Include="SkiaSharp" Version="2.80.1" />
|
<PackageReference Include="SkiaSharp" Version="2.80.2" />
|
||||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.1" />
|
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.2" />
|
||||||
<PackageReference Include="Svg.Skia" Version="0.4.1" />
|
<PackageReference Include="Svg.Skia" Version="0.4.1" />
|
||||||
<PackageReference Include="Tewr.Blazor.FileReader" Version="2.0.0.20200" />
|
<PackageReference Include="Tewr.Blazor.FileReader" Version="3.0.0.20340" />
|
||||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" />
|
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -89,9 +89,6 @@
|
|||||||
<data name="Pegging must be bigger than 0." xml:space="preserve">
|
<data name="Pegging must be bigger than 0." xml:space="preserve">
|
||||||
<value>Pegging must be bigger than 0.</value>
|
<value>Pegging must be bigger than 0.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Please enter an ending date." xml:space="preserve">
|
|
||||||
<value>Please enter an ending date.</value>
|
|
||||||
</data>
|
|
||||||
<data name="Ending date must be before now." xml:space="preserve">
|
<data name="Ending date must be before now." xml:space="preserve">
|
||||||
<value>Ending date must be before now.</value>
|
<value>Ending date must be before now.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ namespace Marechai.Services
|
|||||||
Firmware = d.Firmware,
|
Firmware = d.Firmware,
|
||||||
PhysicalBlockSize = d.PhysicalBlockSize,
|
PhysicalBlockSize = d.PhysicalBlockSize,
|
||||||
LogicalBlockSize = d.LogicalBlockSize,
|
LogicalBlockSize = d.LogicalBlockSize,
|
||||||
BlockSizes = d.BlockSizes.Object,
|
BlockSizes = d.BlockSizes,
|
||||||
StorageInterface = d.StorageInterface,
|
StorageInterface = d.StorageInterface,
|
||||||
TableOfContents = d.TableOfContents.Object
|
TableOfContents = d.TableOfContents
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
public async Task<List<MediaViewModel>> GetTitlesAsync() => await _context.
|
public async Task<List<MediaViewModel>> GetTitlesAsync() => await _context.
|
||||||
@@ -106,11 +106,10 @@ namespace Marechai.Services
|
|||||||
d.PhysicalBlockSize,
|
d.PhysicalBlockSize,
|
||||||
LogicalBlockSize =
|
LogicalBlockSize =
|
||||||
d.LogicalBlockSize,
|
d.LogicalBlockSize,
|
||||||
BlockSizes = d.BlockSizes.Object,
|
BlockSizes = d.BlockSizes,
|
||||||
StorageInterface =
|
StorageInterface =
|
||||||
d.StorageInterface,
|
d.StorageInterface,
|
||||||
TableOfContents =
|
TableOfContents = d.TableOfContents
|
||||||
d.TableOfContents.Object
|
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
public async Task UpdateAsync(MediaViewModel viewModel, string userId)
|
public async Task UpdateAsync(MediaViewModel viewModel, string userId)
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
// Copyright © 2003-2020 Natalia Portillo
|
// Copyright © 2003-2020 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Blazorise;
|
using Blazorise;
|
||||||
using Blazorise.Bootstrap;
|
using Blazorise.Bootstrap;
|
||||||
@@ -48,7 +49,7 @@ namespace Marechai
|
|||||||
{
|
{
|
||||||
readonly CultureInfo[] supportedCultures =
|
readonly CultureInfo[] supportedCultures =
|
||||||
{
|
{
|
||||||
new CultureInfo("en-US"), new CultureInfo("es")
|
new("en-US"), new("es")
|
||||||
};
|
};
|
||||||
|
|
||||||
public Startup(IConfiguration configuration) => Configuration = configuration;
|
public Startup(IConfiguration configuration) => Configuration = configuration;
|
||||||
@@ -63,8 +64,10 @@ namespace Marechai
|
|||||||
AddFontAwesomeIcons();
|
AddFontAwesomeIcons();
|
||||||
|
|
||||||
services.AddDbContext<MarechaiContext>(options => options.UseLazyLoadingProxies().
|
services.AddDbContext<MarechaiContext>(options => options.UseLazyLoadingProxies().
|
||||||
UseMySql(Configuration.
|
UseMySql(Configuration.GetConnectionString("DefaultConnection"),
|
||||||
GetConnectionString("DefaultConnection")));
|
new MariaDbServerVersion(new Version(10,
|
||||||
|
5, 0)),
|
||||||
|
b => b.UseMicrosoftJson()));
|
||||||
|
|
||||||
services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true).
|
services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true).
|
||||||
AddRoles<ApplicationRole>().AddEntityFrameworkStores<MarechaiContext>();
|
AddRoles<ApplicationRole>().AddEntityFrameworkStores<MarechaiContext>();
|
||||||
@@ -93,7 +96,7 @@ namespace Marechai
|
|||||||
if(env.IsDevelopment())
|
if(env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
app.UseDatabaseErrorPage();
|
app.UseMigrationsEndPoint();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,4 +13,5 @@
|
|||||||
@using System.IO
|
@using System.IO
|
||||||
@using Microsoft.AspNetCore.Hosting
|
@using Microsoft.AspNetCore.Hosting
|
||||||
@using Blazorise
|
@using Blazorise
|
||||||
@using Tewr.Blazor.FileReader
|
@using Tewr.Blazor.FileReader
|
||||||
|
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||||
Reference in New Issue
Block a user