Files
EnvelopeGenerator/EnvelopeGenerator.Domain/Entities/ThirdPartyModule.cs
TekH 33bf5b1a51 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.
2026-04-14 12:15:42 +02:00

62 lines
1.6 KiB
C#

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; }
}
}