2024-07-04 11:02:45 +05:00
|
|
|
|
using System;
|
2021-11-01 16:41:25 +05:00
|
|
|
|
using System.Collections.Generic;
|
2023-03-10 05:09:41 +05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2023-02-17 17:36:25 +05:00
|
|
|
|
using System.Linq;
|
2023-06-21 12:33:18 +05:00
|
|
|
|
using AsbCloudApp.Data.User;
|
2021-07-23 17:40:31 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
namespace AsbCloudApp.Data;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// DTO информации о файле. Используется для загрузки файла.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class FileInfoDto : IId, IWellRelated
|
2021-07-23 17:40:31 +05:00
|
|
|
|
{
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
[Required]
|
|
|
|
|
public int Id { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
[Required]
|
|
|
|
|
[Range(1, int.MaxValue, ErrorMessage = "Id скважины не может быть меньше 1")]
|
|
|
|
|
public int IdWell { get; set; }
|
2023-03-10 05:09:41 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// id категории файла
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
[Range(1, int.MaxValue, ErrorMessage = "Id категории файла не может быть меньше 1")]
|
|
|
|
|
public int IdCategory { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Id автора
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int? IdAuthor { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// имя файла
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
[StringLength(260, MinimumLength = 1, ErrorMessage = "Допустимое имя компании от 1 до 260 символов")]
|
|
|
|
|
public string Name { get; set; } = null!;
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// дата загрузки
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public DateTimeOffset UploadDate { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// размер в байтах
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public long Size { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Помечен как удаленный
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public bool IsDeleted { get; set; }
|
2022-10-17 14:42:47 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// DTO автора
|
|
|
|
|
/// </summary>
|
|
|
|
|
public UserDto? Author { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// список отметок файла
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public IEnumerable<FileMarkDto> FileMarks { get; set; } = Enumerable.Empty<FileMarkDto>();
|
2021-07-23 17:40:31 +05:00
|
|
|
|
}
|