43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HospitalDatabaseImplement.Models
|
|
{
|
|
/// <summary>
|
|
/// Класс связи для сущностей "Пациент" и "Рецепт"
|
|
/// </summary>
|
|
public class PatientRecipe
|
|
{
|
|
/// <summary>
|
|
/// Идентификатор
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Идентификатор пациента
|
|
/// </summary>
|
|
[Required]
|
|
public int PatientId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Сущность "Пациент"
|
|
/// </summary>
|
|
public virtual Patient Patient { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Идентификатор рецепта
|
|
/// </summary>
|
|
[Required]
|
|
public int RecipeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Сущность "Рецепт"
|
|
/// </summary>
|
|
public virtual Recipe Recipe { get; set; } = new();
|
|
}
|
|
}
|