RDBMS/RDBMS_lab4/Models/Timetable.cs
2024-05-12 17:52:28 +04:00

48 lines
1.5 KiB
C#

// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace RDBMS_lab4.Models;
/// <summary>
/// Таблица расписания, содержит ссылки на клиента, услугу и работника
/// </summary>
[Table("timetable")]
[Index("Buyerid", Name = "fki_timetable_buyerid_fkey")]
[Index("Serviceid", Name = "fki_timetable_serviceid_fkey")]
[Index("Workerid", Name = "fki_timetable_workerid_fkey")]
[Index("Date", "Serviceid", Name = "timetable_date_serviceid_key", IsUnique = true)]
public partial class Timetable
{
[Column("id")]
public int? Id { get; set; }
[Column("date", TypeName = "timestamp without time zone")]
public DateTime Date { get; set; }
[Key]
[Column("buyerid")]
public int Buyerid { get; set; }
[Column("serviceid")]
public int Serviceid { get; set; }
[Column("workerid")]
public int Workerid { get; set; }
[ForeignKey("Buyerid")]
[InverseProperty("Timetable")]
public virtual Buyer Buyer { get; set; }
[ForeignKey("Serviceid")]
[InverseProperty("Timetables")]
public virtual Service Service { get; set; }
[ForeignKey("Workerid")]
[InverseProperty("Timetables")]
public virtual Worker Worker { get; set; }
}