Add Modifier model

This commit is contained in:
2023-04-16 15:52:03 +02:00
parent 6e0b59da4b
commit 7cf5300c3a
4 changed files with 71 additions and 5 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Elwig.Helpers;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace Elwig.Models {
@ -14,9 +15,9 @@ namespace Elwig.Models {
public string? Symbol { get; private set; }
[Column("one_euro")]
public int? OneEuroValue { get; private set; }
public long? OneEuroValue { get; private set; }
[NotMapped]
public decimal? OneEuro => OneEuroValue / 1_000_000;
public decimal? OneEuro => OneEuroValue != null ? Utils.DecFromDb((long)OneEuroValue, 6) : null;
}
}