refactor(EnvelopeDocument): Überarbeitung der Klasse EnvelopeDocument für .NET/Framework Kompatibilität
- Hinzugefügt: bedingte Namensraum-Deklaration für NET und NETFRAMEWORK - Konstruktor eingeführt mit Initialisierung von Elements (nur .NET Framework) - Entfernt: Property AddedWhen - Verschoben: FileNameOriginal, IsTempFile, Filename, Filepath, Thumbnail, PageCount → nur verfügbar unter .NET Framework - Entfernt Standardinitialisierung von Elements, stattdessen abhängig von Laufzeitumgebung
This commit is contained in:
parent
12519f06f7
commit
82d4b0e740
@ -4,49 +4,62 @@ using System.Drawing;
|
|||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
#if NET
|
||||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
;
|
||||||
public class EnvelopeDocument
|
#elif NETFRAMEWORK
|
||||||
{
|
{
|
||||||
[Key]
|
#endif
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
[Column("GUID")]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||||
[Column("ENVELOPE_ID")]
|
public class EnvelopeDocument
|
||||||
public int EnvelopeId { get; set; } = 0;
|
{
|
||||||
|
public EnvelopeDocument()
|
||||||
[Required]
|
{
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
#if NETFRAMEWORK
|
||||||
public DateTime AddedWhen { get; set; }
|
Elements = Enumerable.Empty<DocumentReceiverElement>().ToList();
|
||||||
|
#endif
|
||||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
|
||||||
public byte[] ByteData { get; set; }
|
|
||||||
|
|
||||||
public List<DocumentReceiverElement> Elements { get; set; } = new List<DocumentReceiverElement>();
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
|
||||||
[NotMapped]
|
|
||||||
public string FileNameOriginal { get; set; }
|
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public bool IsTempFile { get; set; }
|
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public string Filename { get; set; }
|
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public string Filepath { get; set; }
|
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public Bitmap Thumbnail { get; set; }
|
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public int PageCount { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
[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<DocumentReceiverElement> Elements { get; set; }
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
[NotMapped]
|
||||||
|
public string FileNameOriginal { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool IsTempFile { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string Filename { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string Filepath { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public Bitmap Thumbnail { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public int PageCount { get; set; }
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Loading…
x
Reference in New Issue
Block a user