forked from ddrilling/AsbCloudServer
59 lines
2.1 KiB
C#
59 lines
2.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_well_operation"), Comment("Данные по операциям на скважине")]
|
|
public class WellOperation
|
|
{
|
|
public WellOperation ShallowCopy() =>
|
|
(WellOperation) MemberwiseClone();
|
|
|
|
[Key]
|
|
[Column("id")]
|
|
public int Id { get; set; }
|
|
|
|
[Column("id_well"), Comment("Id скважины")]
|
|
public int IdWell { get; set; }
|
|
|
|
[Column("id_well_section_type"), Comment("Id тип секции скважины")]
|
|
public int IdWellSectionType { get; set; }
|
|
|
|
[Column("id_category"), Comment("Id категории операции")]
|
|
public int IdCategory { get; set; }
|
|
|
|
[Column("id_type"), Comment("0 = План или 1 = Факт")]
|
|
public int IdType { get; set; }
|
|
|
|
[Column("depth"), Comment("Глубина, на которой производилась операция")]
|
|
public double WellDepth { get; set; }
|
|
|
|
[Column("date"), Comment("Дата начала операции")]
|
|
public DateTime StartDate { get; set; }
|
|
|
|
[Column("duration_hours"), Comment("Продолжительность в часах")]
|
|
public double DurationHours { get; set; }
|
|
|
|
[Column("category_info"), Comment("Доп. информация к выбраной категории")]
|
|
public string CategoryInfo { get; set; }
|
|
|
|
[Column("comment"), Comment("Комментарий")]
|
|
public string Comment { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdWell))]
|
|
public virtual Well Well { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdWellSectionType))]
|
|
public virtual WellSectionType WellSectionType { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdCategory))]
|
|
public virtual WellOperationCategory OperationCategory { get; set; }
|
|
}
|
|
}
|