Refactor entity classes for non-nullable properties
Removed nullable types and `init` properties, replacing them with standard getters and setters in various entity classes. Updated properties like `DocumentPath`, `SendingProfile`, and `SignatureHost` to be non-nullable and added required attributes. Modified the project file to include `net462` as a target framework and added a reference for `System.ComponentModel.Annotations`. Removed the `IUnique<int>` interface from several classes to simplify uniqueness management. These changes improve data integrity and usability across the entity classes.
This commit is contained in:
@@ -1,52 +1,50 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_RECEIVER_READ_ONLY")]
|
||||
public class EnvelopeReceiverReadOnly : IUnique<long>
|
||||
public class EnvelopeReceiverReadOnly
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public long Id { get; init; }
|
||||
public long Id { get; set; }
|
||||
|
||||
[Column("ENVELOPE_ID")]
|
||||
[Required]
|
||||
public long EnvelopeId { get; init; }
|
||||
public long EnvelopeId { get; set; }
|
||||
|
||||
//TODO: remove NotMapped attribute when EnvelopeId data type is standardized
|
||||
[NotMapped]
|
||||
public Envelope? Envelope { get; set; }
|
||||
public Envelope Envelope { get; set; }
|
||||
|
||||
[Column("RECEIVER_MAIL")]
|
||||
[Required]
|
||||
[StringLength(250)]
|
||||
[TemplatePlaceholder("NAME_RECEIVER")]
|
||||
public required string ReceiverMail { get; init; }
|
||||
public string ReceiverMail { get; set; }
|
||||
|
||||
[Column("DATE_VALID")]
|
||||
[Required]
|
||||
public DateTime DateValid { get; init; }
|
||||
public DateTime DateValid { get; set; }
|
||||
|
||||
[Column("ADDED_WHO")]
|
||||
[Required]
|
||||
[StringLength(100)]
|
||||
public required string AddedWho { get; init; }
|
||||
public string AddedWho { get; set; }
|
||||
|
||||
public Receiver? Receiver { get; init; }
|
||||
public Receiver Receiver { get; set; }
|
||||
|
||||
[Column("ADDED_WHEN")]
|
||||
[Required]
|
||||
public DateTime AddedWhen { get; init; }
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHO")]
|
||||
[StringLength(100)]
|
||||
public string? ChangedWho { get; init; }
|
||||
public string ChangedWho { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN")]
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user