Add ThirdPartyModule entity with auditing support

Introduced the ThirdPartyModule entity mapped to the TBDD_3RD_PARTY_MODULES table using Entity Framework. The class includes properties for module details and auditing (added/changed by and when), implements IHasChangedWhen and IHasChangedWho interfaces, and uses conditional compilation for .NET Framework and nullable reference types. Data annotations and schema mapping attributes were added for precise database integration.
This commit is contained in:
2026-04-14 12:15:42 +02:00
parent 6a9792bb57
commit 33bf5b1a51

View File

@@ -0,0 +1,61 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using EnvelopeGenerator.Domain.Interfaces.Auditing;
#if NETFRAMEWORK
using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBDD_3RD_PARTY_MODULES", Schema = "dbo")]
public class ThirdPartyModule : IHasChangedWhen, IHasChangedWho
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ACTIVE", TypeName = "bit")]
public bool Active { get; set; }
[Required]
[Column("NAME", TypeName = "varchar(50)")]
public string Name { get; set; }
[Column("DESCRIPTION", TypeName = "varchar(500)")]
public string
#if nullable
?
#endif
Description { get; set; }
[Required]
[Column("LICENSE", TypeName = "varchar(max)")]
public string License { get; set; }
[Required]
[Column("VERSION", TypeName = "varchar(20)")]
public string Version { get; set; }
[Column("ADDED_WHO", TypeName = "varchar(50)")]
public string
#if nullable
?
#endif
AddedWho { get; set; }
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime? AddedWhen { get; set; }
[Column("CHANGED_WHO", TypeName = "varchar(50)")]
public string
#if nullable
?
#endif
ChangedWho { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
}
}