From fa8852a32a15320c19845570e7e6bcba88de7d43 Mon Sep 17 00:00:00 2001 From: Alexandr Sulimov Date: Wed, 21 Jun 2023 17:55:53 +0300 Subject: [PATCH] fix --- MyOffice.Data.Models/Accounts/AccountMotion.cs | 2 +- MyOffice.DbContext/AppDbContext.cs | 6 +++--- MyOffice.Services/Account/Domain/AccountMotionAdd.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MyOffice.Data.Models/Accounts/AccountMotion.cs b/MyOffice.Data.Models/Accounts/AccountMotion.cs index 750b635..7540d79 100644 --- a/MyOffice.Data.Models/Accounts/AccountMotion.cs +++ b/MyOffice.Data.Models/Accounts/AccountMotion.cs @@ -4,7 +4,7 @@ using MyOffice.Data.Models.Motions; public class AccountMotion { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreatedOn { get; set; } public DateTime DateTime { get; set; } public int MotionId { get; set; } diff --git a/MyOffice.DbContext/AppDbContext.cs b/MyOffice.DbContext/AppDbContext.cs index 41d54ab..04c6598 100644 --- a/MyOffice.DbContext/AppDbContext.cs +++ b/MyOffice.DbContext/AppDbContext.cs @@ -42,7 +42,7 @@ public class AppDbContext : DbContext public DbSet GlobalMotions { get; set; } = null!; public DbSet MotionCategories { get; set; } = null!; public DbSet Motions { get; set; } = null!; - //public DbSet AccountMotions { get; set; } = null!; + public DbSet AccountMotions { get; set; } = null!; protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -196,7 +196,7 @@ public class AppDbContext : DbContext .WithMany(x => x.Motions) .HasForeignKey(x => x.MotionGlobalId); - /*modelBuilder.Entity() + modelBuilder.Entity() .HasOne(x => x.Motion) .WithMany(x => x.Motions) .HasForeignKey(x => x.MotionId); @@ -204,6 +204,6 @@ public class AppDbContext : DbContext modelBuilder.Entity() .HasOne(x => x.Account) .WithMany(x => x.Motions) - .HasForeignKey(x => x.AccountId);*/ + .HasForeignKey(x => x.AccountId); } } \ No newline at end of file diff --git a/MyOffice.Services/Account/Domain/AccountMotionAdd.cs b/MyOffice.Services/Account/Domain/AccountMotionAdd.cs index 0cf8aed..c61f541 100644 --- a/MyOffice.Services/Account/Domain/AccountMotionAdd.cs +++ b/MyOffice.Services/Account/Domain/AccountMotionAdd.cs @@ -4,7 +4,7 @@ { public DateTime Date { get; set; } public string Motion { get; set; } = null!; - public string? Description { get; set; }; + public string? Description { get; set; } public decimal Plus { get; set; } public decimal Minus { get; set; } }