DD.WellWorkover.Cloud/AsbCloudApp/Data/MeasureDto.cs
2024-08-19 10:01:07 +05:00

47 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data;
/// <summary>
/// инфо о результатах замера
/// </summary>
public class MeasureDto : IId, IWellRelated
{
/// <inheritdoc/>
[Required]
public int Id { get; set; }
/// <inheritdoc/>
[Required]
[Range(1, int.MaxValue, ErrorMessage = "Id скважины не может быть меньше 1")]
public int IdWell { get; set; }
/// <summary>
/// Id категории замера
/// </summary>
[Required]
[Range(1, int.MaxValue, ErrorMessage = "Id категории не может быть меньше 1")]
public int IdCategory { get; set; }
/// <summary>
/// название категории замера
/// </summary>
[Required]
[StringLength(120, MinimumLength = 1, ErrorMessage = "Название категории не может быть больше 120 символов")]
public string CategoryName { get; set; } = string.Empty;
/// <summary>
/// отметка времени замера
/// </summary>
[Required]
public DateTimeOffset Timestamp { get; set; }
/// <summary>
/// данные замера
/// </summary>
[Required]
public Dictionary<string, object> Data { get; set; } = new();
}