DD.WellWorkover.Cloud/AsbCloudDb/Model/DailyReports/DailyReport.cs

37 lines
1.4 KiB
C#
Raw Normal View History

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AsbCloudDb.Model.DailyReports.Blocks.Sign;
using AsbCloudDb.Model.DailyReports.Blocks.Subsystem;
using AsbCloudDb.Model.DailyReports.Blocks.TimeBalance;
using Microsoft.EntityFrameworkCore;
namespace AsbCloudDb.Model.DailyReports;
[Table("t_daily_report"), Comment("Ежедневные отчёты")]
public class DailyReport : IId
{
[Key]
public int Id { get; set; }
[Column("id_well"), Comment("ID скважины")]
public int IdWell { get; set; }
[Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")]
public DateTime? DateLastUpdate { get; set; }
[Column("date", TypeName = "timestamp with time zone"), Comment("Дата формирования отчёта")]
public DateTime Date { get; set; }
[Column("sign_block", TypeName = "jsonb"), Comment("Подпись")]
public SignBlock? SignBlock { get; set; }
[Column("time_balance_block", TypeName = "jsonb"), Comment("Баланс времени")]
public TimeBalanceBlock? TimeBalanceBlock { get; set; }
[Column("subsystem_block", TypeName = "jsonb"), Comment("Наработкой подсистем")]
public SubsystemBlock? SubsystemBlock { get; set; }
[ForeignKey(nameof(IdWell))]
public virtual Well Well { get; set; } = null!;
}