PIbd-21_MasenkinMS_Coursewo.../Hospital/HospitalDatabaseImplement/Models/RecipeMedicine.cs
2024-04-25 02:00:30 +04:00

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 RecipeMedicine
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Идентификатор рецепта
/// </summary>
[Required]
public int RecipeId { get; set; }
/// <summary>
/// Сущность "Рецепт"
/// </summary>
public virtual Recipe Recipe { get; set; } = new();
/// <summary>
/// Идентификатор лекарства
/// </summary>
[Required]
public int MedicineId { get; set; }
/// <summary>
/// Сущность "Лекарство"
/// </summary>
public virtual Medicine Medicine { get; set; } = new();
}
}