forked from ddrilling/AsbCloudServer
Создание модели и DTO для бурильщика
This commit is contained in:
parent
e152ab8d24
commit
93f4fcf486
31
AsbCloudApp/Data/DrillerDto.cs
Normal file
31
AsbCloudApp/Data/DrillerDto.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AsbCloudApp.Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Описание данных для бурильщика
|
||||||
|
/// </summary>
|
||||||
|
public class DrillerDto : IId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Идентификатор в БД
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Имя
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Фамилия
|
||||||
|
/// </summary>
|
||||||
|
public string Surname { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Отчество
|
||||||
|
/// </summary>
|
||||||
|
public string Patronymic { get; set; }
|
||||||
|
}
|
||||||
|
}
|
31
AsbCloudDb/Model/Driller.cs
Normal file
31
AsbCloudDb/Model/Driller.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Model
|
||||||
|
{
|
||||||
|
[Table("t_driller"), Comment("Бурильщик")]
|
||||||
|
public class Driller
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
[Column("id"),Comment("Идентификатор")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[Column("name"), Comment("Имя")]
|
||||||
|
[StringLength(255)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[Column("surname"), Comment("Фамилия")]
|
||||||
|
[StringLength(255)]
|
||||||
|
public string Surname { get; set; }
|
||||||
|
|
||||||
|
[Column("patronymic"), Comment("Отчество")]
|
||||||
|
[StringLength(255)]
|
||||||
|
public string Patronymic { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user