This commit is contained in:
Salikh 2024-05-25 12:11:36 +04:00
parent 827cd9fac2
commit c932df1c72

View File

@ -9,35 +9,35 @@ namespace MotorPlantDatabaseImplement.Models
{
public class MessageInfo : IMessageInfoModel
{
[NotMapped]
public int Id { get; private set; }
[NotMapped]
public int Id { get; private set; }
[DataMember]
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public string MessageId { get; set; } = string.Empty;
[DataMember]
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public string MessageId { get; set; } = string.Empty;
[DataMember]
public int? ClientId { get; set; }
public int? ClientId { get; set; }
public virtual Client? Client { get; set; }
public virtual Client? Client { get; set; }
[DataMember]
[Required]
public string SenderName { get; set; } = string.Empty;
[DataMember]
[Required]
public string SenderName { get; set; } = string.Empty;
[DataMember]
[Required]
public DateTime DateDelivery { get; set; }
[DataMember]
[Required]
public DateTime DateDelivery { get; set; }
[Required]
public string Subject { get; set; } = string.Empty;
[DataMember]
[Required]
public string Subject { get; set; } = string.Empty;
[DataMember]
[Required]
public string Body { get; set; } = string.Empty;
[DataMember]
[Required]
public string Body { get; set; } = string.Empty;
public static MessageInfo? Create(MessageInfoBindingModel? model)
public static MessageInfo? Create(MessageInfoBindingModel? model)
{
if (model == null)
{