2022-04-11 18:00:34 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
2021-11-24 16:16:17 +05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
|
{
|
|
|
|
|
[Table("t_setpoints_rquest"), Comment("Запросы на изменение уставок панели оператора")]
|
2022-06-09 11:19:52 +05:00
|
|
|
|
public class SetpointsRequest : IId, IWellRelated
|
2021-11-24 16:16:17 +05:00
|
|
|
|
{
|
|
|
|
|
[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")]
|
2021-12-30 10:45:06 +05:00
|
|
|
|
public DateTimeOffset UploadDate { get; set; }
|
2021-11-24 16:16:17 +05:00
|
|
|
|
|
|
|
|
|
[Column("obsolescence"), Comment("сек. до устаревания")]
|
|
|
|
|
public int ObsolescenceSec { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("setpoint_set", TypeName = "jsonb"), Comment("Набор уставок")]
|
2023-02-20 14:21:52 +05:00
|
|
|
|
public Dictionary<string, double> Setpoints { get; set; } = new();
|
2021-11-24 16:16:17 +05:00
|
|
|
|
|
|
|
|
|
[Column("comment"), Comment("комментарий для оператора")]
|
2023-02-20 14:21:52 +05:00
|
|
|
|
public string? Comment { get; set; }
|
2021-11-24 16:16:17 +05:00
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(IdWell))]
|
2023-02-20 14:21:52 +05:00
|
|
|
|
public virtual Well Well { get; set; } = null!;
|
2021-11-24 16:16:17 +05:00
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(IdAuthor))]
|
2023-02-20 14:21:52 +05:00
|
|
|
|
public virtual User Author { get; set; } = null!;
|
2021-11-24 16:16:17 +05:00
|
|
|
|
}
|
2022-05-06 10:58:52 +05:00
|
|
|
|
|
2021-11-24 16:16:17 +05:00
|
|
|
|
}
|