This commit is contained in:
2023-06-21 17:56:00 +03:00
parent fa8852a32a
commit e9d4053e65
55 changed files with 3883 additions and 262 deletions
+8
View File
@@ -205,5 +205,13 @@ public class AppDbContext : DbContext
.HasOne(x => x.Account)
.WithMany(x => x.Motions)
.HasForeignKey(x => x.AccountId);
modelBuilder.Entity<AccountMotion>()
.Property(x => x.AmountMinus)
.HasPrecision(18, 6);
modelBuilder.Entity<AccountMotion>()
.Property(x => x.AmountPlus)
.HasPrecision(18, 6);
}
}
@@ -35,6 +35,10 @@ public class RepositoryInitializer
new() { Id = "EUR", DefaultQuantity = 1, Symbol = "€", Name = "Euros" },
new() { Id = "GBP", DefaultQuantity = 1, Symbol = "£", Name = "British pounds sterling" },
new() { Id = "RUB", DefaultQuantity = 10, Symbol = "₽", Name = "Russia Ruble" },
new() { Id = "BTC", DefaultQuantity = 10, Symbol = "btc", Name = "Bitcoin" },
new() { Id = "ETH", DefaultQuantity = 10, Symbol = "eth", Name = "Ethereum" },
new() { Id = "TON", DefaultQuantity = 10, Symbol = "ton", Name = "TON" },
new() { Id = "OTHER", DefaultQuantity = 1, Symbol = "₽", Name = "Other" },
};
var currencyGlobals = dbContext.CurrencyGlobals.ToList();