forked from ddrilling/AsbCloudServer
44 lines
1.7 KiB
C#
44 lines
1.7 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using System.ComponentModel.DataAnnotations;
|
|||
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
|
|||
|
namespace AsbCloudDb.Model
|
|||
|
{
|
|||
|
[Table("t_setpoints_rquest"), Comment("Запросы на изменение уставок панели оператора")]
|
|||
|
public class SetpointsRequest : IId, IIdWell
|
|||
|
{
|
|||
|
[Key]
|
|||
|
[Column("id")]
|
|||
|
public int Id { get; set; }
|
|||
|
|
|||
|
[Column("id_well"), Comment("id скважины")]
|
|||
|
public int IdWell { get; set; }
|
|||
|
|
|||
|
[Column("id_author"), Comment("Id пользователя, загрузившего файл")]
|
|||
|
public int IdAuthor { get; set; }
|
|||
|
|
|||
|
[Column("id_state"), Comment("0: неизвестно, 1:ожидает отправки, 2: отправлено, 3: принято оператором, 4: отклонено оператором, 5: устарело")]
|
|||
|
public int IdState { get; set; }
|
|||
|
|
|||
|
[Column("date", TypeName = "timestamp with time zone")]
|
|||
|
public DateTime UploadDate { get; set; }
|
|||
|
|
|||
|
[Column("obsolescence"), Comment("сек. до устаревания")]
|
|||
|
public int ObsolescenceSec { get; set; }
|
|||
|
|
|||
|
[Column("setpoint_set", TypeName = "jsonb"), Comment("Набор уставок")]
|
|||
|
public Dictionary<string, double> Setpoints { get; set; }
|
|||
|
|
|||
|
[Column("comment"), Comment("комментарий для оператора")]
|
|||
|
public string Comment { get; set; }
|
|||
|
|
|||
|
[ForeignKey(nameof(IdWell))]
|
|||
|
public virtual Well Well { get; set; }
|
|||
|
|
|||
|
[ForeignKey(nameof(IdAuthor))]
|
|||
|
public virtual User Author { get; set; }
|
|||
|
}
|
|||
|
}
|