// This file has been auto generated by EF Core Power Tools.
#nullable disable
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace RDBMS_lab4.Models;
///
/// Таблица расписания, содержит ссылки на клиента, услугу и работника
///
[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; }
}