forked from ddrilling/AsbCloudServer
41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_schedule"), Comment("График работы бурильщика")]
|
|
public class Schedule : IId, IWellRelated
|
|
{
|
|
[Key]
|
|
[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))]
|
|
[InverseProperty(nameof(Model.Driller.Schedule))]
|
|
public virtual Driller Driller { get; set; } = null!;
|
|
|
|
[ForeignKey(nameof(IdWell))]
|
|
public virtual Well Well { get; set; } = null!;
|
|
}
|
|
}
|