2023-10-09 12:20:00 +05:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
2023-12-11 09:45:00 +05:00
|
|
|
|
namespace AsbCloudApp.Data.User;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Контакт
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ContactDto : IId
|
2023-06-21 11:44:04 +05:00
|
|
|
|
{
|
2023-12-11 09:45:00 +05:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ключ типа компании
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
[Range(1, int.MaxValue)]
|
|
|
|
|
public int IdCompanyType { get; set; }
|
|
|
|
|
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// <summary>
|
2023-12-11 09:45:00 +05:00
|
|
|
|
/// ключ скважины
|
2023-06-21 11:44:04 +05:00
|
|
|
|
/// </summary>
|
2023-12-11 09:45:00 +05:00
|
|
|
|
[Required]
|
|
|
|
|
[Range(1,int.MaxValue)]
|
|
|
|
|
public int IdWell { get; set; }
|
2023-06-21 11:44:04 +05:00
|
|
|
|
|
2023-12-11 09:45:00 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// ФИО
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
[StringLength(260, MinimumLength = 0, ErrorMessage = "Допустимая длина ФИО от 1 до 260 символов")]
|
|
|
|
|
public string FullName { get; set; } = null!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Email
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessage = "Некорректный email")]
|
|
|
|
|
public string? Email { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Phone
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegularExpression(@"^(?:\+7|8)\s?(?:\(\d{3}\)|\d{3})\s?\d{3}-?\d{2}-?\d{2}$", ErrorMessage = "Некорректный номер телефона")]
|
|
|
|
|
public string? Phone { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Должность
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
[StringLength(260, MinimumLength = 1, ErrorMessage = "Допустимая длина должности от 1 до 260 символов")]
|
|
|
|
|
public string Position { get; set; } = null!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Компания
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
[StringLength(260, MinimumLength = 3, ErrorMessage = "Допустимая длина названия компании от 3 до 260 символов")]
|
|
|
|
|
public string Company { get; set; } = null!;
|
2023-06-21 11:44:04 +05:00
|
|
|
|
}
|