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