Update model database schema
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Elwig.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Elwig.Models {
|
||||
@ -10,13 +11,16 @@ namespace Elwig.Models {
|
||||
[Column("origin_level")]
|
||||
public int? OriginLevel { get; private set; }
|
||||
|
||||
[Column("predicate")]
|
||||
public bool IsPredicate { get; private set; }
|
||||
|
||||
[Column("min_kmw")]
|
||||
public double? MinKmw { get; private set; }
|
||||
|
||||
[NotMapped]
|
||||
public double? MinOe => MinKmw != null ? Utils.KmwToOe((double)MinKmw) : null;
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; private set; }
|
||||
|
||||
[Column("from_kmw")]
|
||||
public double? FromKmw { get; private set; }
|
||||
|
||||
[Column("to_kmw")]
|
||||
public double? ToKmw { get; private set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user