forked from ddrilling/AsbCloudServer
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
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("data", TypeName = "jsonb"), Comment("Данные таблицы последних данных")]
|
|
public object Data { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdWell))]
|
|
public virtual Well Well { get; set; }
|
|
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(IdCategory))]
|
|
public virtual FileCategory FileCategory { get; set; }
|
|
}
|
|
}
|