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

52 lines
1.8 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_operations"), Comment("Данные по операциям на скважине")]
public class WellOperation
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("id_well"), Comment("Id скважины")]
public int IdWell { get; set; }
[Column("id_section"), Comment("Id секции скважины")]
public int IdSection { get; set; }
[Column("id_category"), Comment("Id категории операции")]
public int IdCategory { get; set; }
[Column("type"), Comment("План или Факт")]
public string Type { get; set; }
[Column("depth"), Comment("Глубина, на которой производилась операция")]
public string WellDepth { get; set; }
[Column("date"), Comment("Дата начала операции")]
public DateTime StartDate { get; set; }
[Column("duration_hours"), Comment("Продолжительность в часах")]
public double Duration { get; set; }
[Column("data"), Comment("Данные по операции")]
public string Data { get; set; }
[Column("comment"), Comment("Комментарий")]
public string Comment { get; set; }
[JsonIgnore]
[ForeignKey(nameof(IdSection))]
public virtual WellSection WellSection { get; set; }
[JsonIgnore]
[ForeignKey(nameof(IdCategory))]
public virtual OperationCategory OperationCategory { get; set; }
}
}