2021-08-09 14:01:57 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-08-27 17:55:22 +05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2021-08-02 12:23:18 +05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2021-08-02 18:35:36 +05:00
|
|
|
|
using System.Text.Json.Serialization;
|
2021-08-02 12:23:18 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
|
{
|
|
|
|
|
[Table("t_last_data"), Comment("Таблица c данными для вкладки \'Последние данные\'")]
|
|
|
|
|
public class LastData : IId
|
|
|
|
|
{
|
|
|
|
|
[Key]
|
|
|
|
|
[Column("id")]
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("id_well"), Comment("id скважины")]
|
|
|
|
|
public int IdWell { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("id_category"), Comment("id категории")]
|
|
|
|
|
public int IdCategory { get; set; }
|
|
|
|
|
|
2021-08-27 17:55:22 +05:00
|
|
|
|
[Column("date_insert"), Comment("время добавления")]
|
|
|
|
|
public DateTime DateInsert { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("date_modify"), Comment("время изменения")]
|
|
|
|
|
public DateTime DateModify { get; set; }
|
|
|
|
|
|
2021-08-02 12:23:18 +05:00
|
|
|
|
[Column("data", TypeName = "jsonb"), Comment("Данные таблицы последних данных")]
|
2021-08-27 17:55:22 +05:00
|
|
|
|
public Dictionary<string, object> Data { get; set; }
|
2021-08-02 18:35:36 +05:00
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
[ForeignKey(nameof(IdWell))]
|
|
|
|
|
public virtual Well Well { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
[ForeignKey(nameof(IdCategory))]
|
2021-08-27 17:55:22 +05:00
|
|
|
|
public virtual LastDataCategory Category { get; set; }
|
2021-08-02 12:23:18 +05:00
|
|
|
|
}
|
|
|
|
|
}
|