49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RouteGuideDatabaseImplement.Models
|
|
{
|
|
/// <summary>
|
|
/// Класс связи сущностей "Маршрут" и "Остановка"
|
|
/// </summary>
|
|
public class RouteStop
|
|
{
|
|
/// <summary>
|
|
/// Идентификатор
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Идентификатор маршрута
|
|
/// </summary>
|
|
[Required]
|
|
public int RouteId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Сущность "Маршрут"
|
|
/// </summary>
|
|
public virtual Route Route { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Идентификатор остановки
|
|
/// </summary>
|
|
[Required]
|
|
public int StopId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Сущность "Остановка"
|
|
/// </summary>
|
|
public virtual Stop Stop { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Номер остановки в маршруте
|
|
/// </summary>
|
|
[Required]
|
|
public int Number { get; set; }
|
|
}
|
|
}
|