Update model database schema

This commit is contained in:
2023-04-16 15:08:15 +02:00
parent 0333e8a5c5
commit 6e0b59da4b
14 changed files with 232 additions and 72 deletions

22
Elwig/Models/Currency.cs Normal file
View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace Elwig.Models {
[Table("currency"), PrimaryKey("Code")]
public class Currency {
[Column("code")]
public string Code { get; private set; }
[Column("name")]
public string Name { get; private set; }
[Column("symbol")]
public string? Symbol { get; private set; }
[Column("one_euro")]
public int? OneEuroValue { get; private set; }
[NotMapped]
public decimal? OneEuro => OneEuroValue / 1_000_000;
}
}