Add base photo model.

This commit is contained in:
2019-05-29 01:16:36 +01:00
parent bb931e7209
commit b27d67604f
3 changed files with 77 additions and 67 deletions

View File

@@ -0,0 +1,74 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Cicm.Database.Models
{
public class BasePhoto : BaseModel<Guid>
{
public string Author { get; set; }
[DisplayName("Camera manufacturer")]
public string CameraManufacturer { get; set; }
[DisplayName("Camera model")]
public string CameraModel { get; set; }
[DisplayName("Color space")]
public ColorSpace? ColorSpace { get; set; }
[DisplayName("User comments")]
public string Comments { get; set; }
public Contrast? Contrast { get; set; }
[DisplayName("Date and time of digitizing")]
public DateTime? CreationDate { get; set; }
[DisplayName("Digital zoom ratio")]
public double? DigitalZoomRatio { get; set; }
[DisplayName("Exif version")]
public string ExifVersion { get; set; }
[DisplayName("Exposure time")]
public string Exposure { get; set; }
[DisplayName("Exposure mode")]
public ExposureMode? ExposureMethod { get; set; }
[DisplayName("Exposure Program")]
public ExposureProgram? ExposureProgram { get; set; }
public Flash? Flash { get; set; }
[DisplayName("F-number")]
public double? Focal { get; set; }
[DisplayName("Lens focal length")]
public double? FocalLength { get; set; }
[DisplayName("Focal length in 35 mm film")]
public ushort? FocalLengthEquivalent { get; set; }
[DisplayName("Horizontal resolution")]
public double? HorizontalResolution { get; set; }
[DisplayName("ISO speed rating")]
public ushort? IsoRating { get; set; }
[DisplayName("Lens used")]
public string Lens { get; set; }
[DisplayName("Light source")]
public LightSource? LightSource { get; set; }
[DisplayName("Metering mode")]
public MeteringMode? MeteringMode { get; set; }
[DisplayName("Resolution unit")]
public ResolutionUnit? ResolutionUnit { get; set; }
public Orientation? Orientation { get; set; }
public Saturation? Saturation { get; set; }
[DisplayName("Scene capture type")]
public SceneCaptureType? SceneCaptureType { get; set; }
[DisplayName("Sensing method")]
public SensingMethod? SensingMethod { get; set; }
public Sharpness? Sharpness { get; set; }
[DisplayName("Software used")]
public string SoftwareUsed { get; set; }
[DisplayName("Subject distance range")]
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
[Timestamp]
public DateTime UploadDate { get; set; }
[DisplayName("Vertical resolution")]
public double? VerticalResolution { get; set; }
[DisplayName("White balance")]
public WhiteBalance? WhiteBalance { get; set; }
public virtual ApplicationUser User { get; set; }
[Required]
public virtual License License { get; set; }
public int LicenseId { get; set; }
}
}

View File

@@ -1,78 +1,14 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Cicm.Database.Models namespace Cicm.Database.Models
{ {
public class MachinePhoto : BaseModel<Guid> public class MachinePhoto : BasePhoto
{ {
public string Author { get; set; }
[DisplayName("Camera manufacturer")]
public string CameraManufacturer { get; set; }
[DisplayName("Camera model")]
public string CameraModel { get; set; }
[DisplayName("Color space")]
public ColorSpace? ColorSpace { get; set; }
[DisplayName("User comments")]
public string Comments { get; set; }
public Contrast? Contrast { get; set; }
[DisplayName("Date and time of digitizing")]
public DateTime? CreationDate { get; set; }
[DisplayName("Digital zoom ratio")]
public double? DigitalZoomRatio { get; set; }
[DisplayName("Exif version")]
public string ExifVersion { get; set; }
[DisplayName("Exposure time")]
public string Exposure { get; set; }
[DisplayName("Exposure mode")]
public ExposureMode? ExposureMethod { get; set; }
[DisplayName("Exposure Program")]
public ExposureProgram? ExposureProgram { get; set; }
public Flash? Flash { get; set; }
[DisplayName("F-number")]
public double? Focal { get; set; }
[DisplayName("Lens focal length")]
public double? FocalLength { get; set; }
[DisplayName("Focal length in 35 mm film")]
public ushort? FocalLengthEquivalent { get; set; }
[DisplayName("Horizontal resolution")]
public double? HorizontalResolution { get; set; }
[DisplayName("ISO speed rating")]
public ushort? IsoRating { get; set; }
[DisplayName("Lens used")]
public string Lens { get; set; }
[DisplayName("Light source")]
public LightSource? LightSource { get; set; }
[DisplayName("Metering mode")]
public MeteringMode? MeteringMode { get; set; }
[DisplayName("Resolution unit")]
public ResolutionUnit? ResolutionUnit { get; set; }
public Orientation? Orientation { get; set; }
public Saturation? Saturation { get; set; }
[DisplayName("Scene capture type")]
public SceneCaptureType? SceneCaptureType { get; set; }
[DisplayName("Sensing method")]
public SensingMethod? SensingMethod { get; set; }
public Sharpness? Sharpness { get; set; }
[DisplayName("Software used")]
public string SoftwareUsed { get; set; }
[DisplayName("Subject distance range")]
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
[Timestamp]
public DateTime UploadDate { get; set; }
[DisplayName("Vertical resolution")]
public double? VerticalResolution { get; set; }
[DisplayName("White balance")]
public WhiteBalance? WhiteBalance { get; set; }
[Url] [Url]
public string Source { get; set; } public string Source { get; set; }
public virtual ApplicationUser User { get; set; }
public virtual Machine Machine { get; set; } public virtual Machine Machine { get; set; }
[Required]
public virtual License License { get; set; }
public int MachineId { get; set; } public int MachineId { get; set; }
public int LicenseId { get; set; }
} }
} }

View File

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