forked from ddrilling/AsbCloudServer
45 lines
1.7 KiB
C#
45 lines
1.7 KiB
C#
using Microsoft.EntityFrameworkCore;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel.DataAnnotations;
|
||
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
||
namespace AsbCloudDb.Model
|
||
{
|
||
[Table("t_setpoints_rquest"), Comment("Запросы на изменение уставок панели оператора")]
|
||
public class SetpointsRequest : IId, IWellRelated
|
||
{
|
||
[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 DateTimeOffset UploadDate { get; set; }
|
||
|
||
[Column("obsolescence"), Comment("сек. до устаревания")]
|
||
public int ObsolescenceSec { get; set; }
|
||
|
||
[Column("setpoint_set", TypeName = "jsonb"), Comment("Набор уставок")]
|
||
public Dictionary<string, double> Setpoints { get; set; } = new();
|
||
|
||
[Column("comment"), Comment("комментарий для оператора")]
|
||
public string? Comment { get; set; }
|
||
|
||
[ForeignKey(nameof(IdWell))]
|
||
public virtual Well Well { get; set; } = null!;
|
||
|
||
[ForeignKey(nameof(IdAuthor))]
|
||
public virtual User Author { get; set; } = null!;
|
||
}
|
||
|
||
}
|