Fix machine photo types.

This commit is contained in:
2019-05-28 23:34:05 +01:00
parent c4c5e2b821
commit 593b044506
9 changed files with 10852 additions and 5 deletions

View File

@@ -672,4 +672,11 @@ namespace Cicm.Database
Auto = 0,
Manual = 1
}
public enum Sharpness : ushort
{
Normal = 0,
Low = 1,
Hig = 2
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Cicm.Database.Migrations
{
public partial class MachinePhotoForeignKeys : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>("MachineId", "MachinePhotos", nullable: false, oldClrType: typeof(int),
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>("MachineId", "MachinePhotos", nullable: true, oldClrType: typeof(int));
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Cicm.Database.Migrations
{
public partial class ChangeMachinePhotoSharpnessTypeToExifType : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<ushort>("Sharpness", "MachinePhotos", nullable: true,
oldClrType: typeof(string), oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>("Sharpness", "MachinePhotos", nullable: true,
oldClrType: typeof(ushort), oldNullable: true);
}
}
}

View File

@@ -3754,7 +3754,7 @@ namespace Cicm.Database.Migrations
b.Property<ushort?>("LightSource");
b.Property<int?>("MachineId");
b.Property<int>("MachineId");
b.Property<ushort?>("MeteringMode");
@@ -3768,7 +3768,7 @@ namespace Cicm.Database.Migrations
b.Property<ushort?>("SensingMethod");
b.Property<string>("Sharpness");
b.Property<ushort?>("Sharpness");
b.Property<string>("SoftwareUsed");

View File

@@ -52,7 +52,7 @@ namespace Cicm.Database.Models
public SceneCaptureType? SceneCaptureType { get; set; }
[DisplayName("Sensing method")]
public SensingMethod? SensingMethod { get; set; }
public string Sharpness { get; set; }
public Sharpness? Sharpness { get; set; }
[DisplayName("Software used")]
public string SoftwareUsed { get; set; }
[DisplayName("Subject distance range")]
@@ -68,5 +68,8 @@ namespace Cicm.Database.Models
public virtual Machine Machine { get; set; }
[Required]
public virtual License License { get; set; }
public int MachineId { get; set; }
public int LicenseId { get; set; }
}
}

View File

@@ -54,7 +54,7 @@ namespace cicm_web.Areas.Admin.Models
public SceneCaptureType? SceneCaptureType { get; set; }
[DisplayName("Sensing method")]
public SensingMethod? SensingMethod { get; set; }
public string Sharpness { get; set; }
public Sharpness? Sharpness { get; set; }
[DisplayName("Software used")]
public string SoftwareUsed { get; set; }
[DisplayName("Subject distance range")]

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Version>3.0.99.632</Version>
<Version>3.0.99.643</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>