DD.WellWorkover.Cloud/AsbCloudDb/Model/Schedule.cs

41 lines
1.5 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_schedule"), Comment("График работы бурильщика")]
2022-06-15 14:57:37 +05:00
public class Schedule : IId, IWellRelated
{
[Key]
2022-06-15 14:57:37 +05:00
[Column("id"), Comment("Идентификатор")]
public int Id { get; set; }
[Column("id_driller"), Comment("Идентификатор бурильщика")]
public int IdDriller { get; set; }
[Column("id_well"), Comment("Идентификатор скважины")]
public int IdWell { get; set; }
[Column("shift_start", TypeName = "time without time zone"), Comment("Начало смены")]
public TimeOnly ShiftStart { get; set; }
[Column("shift_end", TypeName = "time without time zone"), Comment("Конец смены")]
public TimeOnly ShiftEnd { get; set; }
[Column("drill_start", TypeName = "timestamp with time zone"), Comment("Начало вахты")]
public DateTimeOffset DrillStart { get; set; }
[Column("drill_end", TypeName = "timestamp with time zone"), Comment("Конец вахты")]
public DateTimeOffset DrillEnd { get; set; }
[ForeignKey(nameof(IdDriller))]
2022-05-25 20:19:08 +05:00
[InverseProperty(nameof(Model.Driller.Schedule))]
public virtual Driller Driller { get; set; } = null!;
[ForeignKey(nameof(IdWell))]
public virtual Well Well { get; set; } = null!;
}
}