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

44 lines
1.4 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsbCloudDb.Model
{
[Table("t_schedule"), Comment("График работы бурильщика")]
public class ScheduleItem: IId
{
[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"), Comment("Начало смены")]
public DateTimeOffset ShiftStart { get; set; }
[Column("shift_end"), Comment("Конец смены")]
public DateTimeOffset ShiftEnd { get; set; }
[Column("drill_start"), Comment("Начало бурение")]
public DateTimeOffset DrillStart { get; set; }
[Column("drill_end"), Comment("Конец бурения")]
public DateTimeOffset DrillEnd { get; set; }
[ForeignKey(nameof(IdDriller))]
public virtual Driller Driller { get; set; }
[ForeignKey(nameof(IdWell))]
public virtual Well well { get; set; }
}
}