forked from ddrilling/AsbCloudServer
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
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; }
|
|
|
|
[Column("date_insert"), Comment("время добавления")]
|
|
public DateTime DateInsert { get; set; }
|
|
|
|
[Column("date_modify"), Comment("время изменения")]
|
|
public DateTime DateModify { get; set; }
|
|
|
|
[Column("data", TypeName = "jsonb"), Comment("Данные таблицы последних данных")]
|
|
public Dictionary<string, object> Data { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdWell))]
|
|
public virtual Well Well { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdCategory))]
|
|
public virtual LastDataCategory Category { get; set; }
|
|
}
|
|
}
|