| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using System.ComponentModel.DataAnnotations; |
| | | 4 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 5 | | using System.Text; |
| | | 6 | | using WinSolutions.Sveta.Server.Data.DataModel.Kinds; |
| | | 7 | | |
| | | 8 | | namespace WinSolutions.Sveta.Server.Data.DataModel.Entities |
| | | 9 | | { |
| | | 10 | | public class Event : ExternalRecord |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// Дата/время |
| | | 14 | | /// </summary> |
| | | 15 | | [Required(ErrorMessage = "Не указана дата и время")] |
| | | 16 | | //[DatabaseGenerated(DatabaseGeneratedOption.Computed)] |
| | 0 | 17 | | public DateTime DtCreated { get; set; } = DateTime.UtcNow; |
| | | 18 | | |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Пользователь |
| | | 22 | | /// </summary> |
| | | 23 | | [Required(ErrorMessage = "Не указан пользователь")] |
| | 0 | 24 | | public User User { get; set; } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Тип события |
| | | 28 | | /// </summary> |
| | | 29 | | /* [Required] |
| | | 30 | | [Obsolete] |
| | | 31 | | public EventKind Kind { get; set; }*/ |
| | | 32 | | [Required(ErrorMessage = "Не указан тип события")] |
| | 0 | 33 | | public EventsKind EventsKind { get; set; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Сущность |
| | | 37 | | /// </summary> |
| | | 38 | | [Required(ErrorMessage = "Не указана таблица")] |
| | 0 | 39 | | public string Entity { get; set; } |
| | | 40 | | |
| | | 41 | | //TODO: надо удалить |
| | | 42 | | /// <summary> |
| | | 43 | | /// Идентификатор записи |
| | | 44 | | /// </summary> |
| | | 45 | | /* [Required] |
| | | 46 | | public long RecordId { get; set; }*/ |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Идентификатор записи в виде Guid |
| | | 50 | | /// </summary> |
| | | 51 | | [Required(ErrorMessage = "Не указан Guid записи")] |
| | 0 | 52 | | public Guid RecordGuid { get; set; } |
| | | 53 | | |
| | | 54 | | //TODO: надо удалить |
| | | 55 | | /// <summary> |
| | | 56 | | /// Причина |
| | | 57 | | /// </summary> |
| | | 58 | | // public string Reason { get; set; } |
| | | 59 | | |
| | | 60 | | /// <summary> |
| | | 61 | | /// Причина в виде json |
| | | 62 | | /// </summary> |
| | 0 | 63 | | public string ReasonJson { get; set; } |
| | | 64 | | } |
| | | 65 | | } |