23 lines
594 B
C#
23 lines
594 B
C#
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;
|
|
}
|
|
}
|