36 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using BankDataModels.Enums;
using BankDataModels.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;
namespace BankDatabaseImplement.Models
{
//реализация аккаунта
public class Account : IAccountModel
{
public int Id { get; set; }
[Required]
public string AccountNumber { get; set; } = string.Empty;
[Required]
public int CashierId { get; set; }
[Required]
public int ClientId { get; set; }
//чтобы передать ФИО клиета
public virtual Client Client { get; set; }
[Required]
public double Balance { get; set; }
[Required]
public DateTime DateOpen { get; set; }
[Required]
public StatusAccount StatusAccount { get; set; }
//для реализации связи один ко многим со Снятием наличных
[ForeignKey("AccountId")]
public virtual List<CashWithdrawal> CashWithdrawals { get; set; } = new();
}
}