ClientsDatabase
This commit is contained in:
parent
7494228685
commit
459fc319ef
@ -4,6 +4,7 @@ using BankYouBankruptDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -15,7 +16,6 @@ namespace BankYouBankruptDatabaseImplement.Models
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
public int ClientID { get; set; }
|
||||
|
||||
public virtual Client Client { get; set; } = new();
|
||||
[Required]
|
||||
public int AccountId { get; set; }
|
||||
@ -26,6 +26,12 @@ namespace BankYouBankruptDatabaseImplement.Models
|
||||
[Required]
|
||||
public DateTime Period { get; set; } = DateTime.Now;
|
||||
|
||||
[ForeignKey("CardId")]
|
||||
public virtual List<Crediting> Creditings { get; set; } = new();
|
||||
|
||||
[ForeignKey("CardId")]
|
||||
public virtual List<Debiting> Debitings { get; set; } = new();
|
||||
|
||||
public CardViewModel GetViewModel => new()
|
||||
{
|
||||
Id = Id,
|
||||
|
@ -33,6 +33,8 @@ namespace BankYouBankruptDatabaseImplement.Models
|
||||
[Required]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
[ForeignKey("ClientID")]
|
||||
public virtual List<Client> Clients { get; set; } = new();
|
||||
|
||||
public ClientViewModel GetViewModel => new()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user