Refactor EnvelopeDocument class for clarity
Adjusted namespace and reformatted class attributes for consistency. Moved `[Table]`, `[Key]`, `[DatabaseGenerated]`, and `[Column]` attributes to align with properties. The `Elements` property was also repositioned to enhance class structure readability.
This commit is contained in:
parent
d56aa1a778
commit
44aeb53413
@ -2,27 +2,26 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||||
|
public class EnvelopeDocument : IUnique<int>
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
[Key]
|
||||||
public class EnvelopeDocument : IUnique<int>
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
{
|
[Column("GUID")]
|
||||||
[Key]
|
public int Id { get; set; }
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
[Column("GUID")]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_ID")]
|
[Column("ENVELOPE_ID")]
|
||||||
public int EnvelopeId { get; set; }
|
public int EnvelopeId { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public required DateTime AddedWhen { get; set; }
|
public required DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||||
public byte[]? ByteData { get; init; }
|
public byte[]? ByteData { get; init; }
|
||||||
|
|
||||||
public IEnumerable<DocumentReceiverElement>? Elements { get; set; }
|
public IEnumerable<DocumentReceiverElement>? Elements { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user