This commit is contained in:
Salikh 2024-05-25 13:28:47 +04:00
parent 62f4064fce
commit 8676666326

View File

@ -3,16 +3,11 @@ using MotorPlantContracts.ViewModels;
using MotorPlantDataModels.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
namespace MotorPlantDatabaseImplement.Models
{
public class MessageInfo : IMessageInfoModel
{
[NotMapped]
public int Id { get; private set; }
[DataMember]
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public string MessageId { get; set; } = string.Empty;
@ -21,19 +16,15 @@ namespace MotorPlantDatabaseImplement.Models
public virtual Client? Client { get; set; }
[DataMember]
[Required]
public string SenderName { get; set; } = string.Empty;
[DataMember]
[Required]
public DateTime DateDelivery { get; set; }
[DataMember]
[Required]
public string Subject { get; set; } = string.Empty;
[DataMember]
[Required]
public string Body { get; set; } = string.Empty;