64 lines
1.3 KiB
C#
64 lines
1.3 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
#if NETFRAMEWORK
|
|
using System.Drawing;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
#endif
|
|
|
|
namespace EnvelopeGenerator.Domain.Entities
|
|
#if NET
|
|
;
|
|
#elif NETFRAMEWORK
|
|
{
|
|
#endif
|
|
|
|
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
|
public class Document
|
|
{
|
|
public Document()
|
|
{
|
|
#if NETFRAMEWORK
|
|
Elements = Enumerable.Empty<Signature>().ToList();
|
|
#endif
|
|
}
|
|
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[Column("GUID")]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[Column("ENVELOPE_ID")]
|
|
public int EnvelopeId { get; set; } = 0;
|
|
|
|
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
|
public byte[] ByteData { get; set; }
|
|
|
|
public List<Signature> Elements { get; set; }
|
|
|
|
// TODO: * Check the Form App and remove the default value
|
|
[NotMapped]
|
|
public string Filepath { get; set; }
|
|
|
|
#if NETFRAMEWORK
|
|
[NotMapped]
|
|
public string FileNameOriginal { get; set; }
|
|
|
|
[NotMapped]
|
|
public bool IsTempFile { get; set; }
|
|
|
|
[NotMapped]
|
|
public string Filename { get; set; }
|
|
|
|
[NotMapped]
|
|
public Bitmap Thumbnail { get; set; }
|
|
|
|
[NotMapped]
|
|
public int PageCount { get; set; }
|
|
#endif
|
|
}
|
|
|
|
#if NETFRAMEWORK
|
|
}
|
|
#endif |