- Updated `using` directives in `Config.cs` and `EnvelopeType.cs` to include additional namespaces and removed `DigitalData.Core.Abstractions`. - Adjusted formatting for `StatusName` and `IsAlreadySent` properties in `Envelope.cs` for consistency. - Simplified `User` property in `Envelope.cs` by removing the namespace prefix. - Introduced a new `User` class in `User.cs` with various properties and data annotations for database mapping. - Removed the `<Nullable>` property from `EnvelopeGenerator.Domain.csproj`, which may impact nullability handling.
96 lines
2.5 KiB
C#
96 lines
2.5 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel;
|
|
|
|
namespace EnvelopeGenerator.Domain.Entities
|
|
{
|
|
[Table("TBDD_USER", Schema = "dbo")]
|
|
public class User
|
|
{
|
|
[Column("GUID")]
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[Column("ADDED_WHO")]
|
|
public string AddedWho { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[Column("CHANGED_WHO")]
|
|
public string ChangedWho { get; set; }
|
|
|
|
//TODO: assign it to default value in create dto, not here!
|
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
|
[DefaultValue("GETDATE()")]
|
|
public DateTime AddedWhen { get; set; } = DateTime.Now;
|
|
|
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
|
public DateTime ChangedWhen { get; set; }
|
|
|
|
[Column("PRENAME")]
|
|
[StringLength(50)]
|
|
public string Prename { get; set; }
|
|
|
|
[Column("NAME")]
|
|
[StringLength(50)]
|
|
public string Name { get; set; }
|
|
|
|
[Required]
|
|
[Column("USERNAME")]
|
|
[StringLength(50)]
|
|
public string Username { get; set; }
|
|
|
|
[Column("SHORTNAME")]
|
|
[StringLength(30)]
|
|
public string Shortname { get; set; }
|
|
|
|
[Column("EMAIL")]
|
|
[StringLength(100)]
|
|
public string Email { get; set; }
|
|
|
|
[Required]
|
|
[Column("LANGUAGE")]
|
|
[StringLength(5)]
|
|
[DefaultValue("de-DE")]
|
|
public string Language { get; set; }
|
|
|
|
[Column("COMMENT")]
|
|
[StringLength(500)]
|
|
public string Comment { get; set; }
|
|
|
|
[Column("DELETED")]
|
|
public bool Deleted { get; set; }
|
|
|
|
[Required]
|
|
[Column("DATE_FORMAT")]
|
|
[StringLength(10)]
|
|
[DefaultValue("dd.MM.yyyy")]
|
|
public string DateFormat { get; set; }
|
|
|
|
[Required]
|
|
[Column("ACTIVE")]
|
|
public bool Active { get; set; }
|
|
|
|
[Required]
|
|
[Column("GENERAL_VIEWER")]
|
|
[StringLength(30)]
|
|
[DefaultValue("NONE")]
|
|
public string GeneralViewer { get; set; }
|
|
|
|
[Required]
|
|
[Column("WAN_ENVIRONMENT")]
|
|
public bool WanEnvironment { get; set; }
|
|
|
|
[Required]
|
|
[Column("USERID_FK_INT_ECM")]
|
|
public int UseridFkIntEcm { get; set; }
|
|
|
|
[Column("DELETED_WHEN")]
|
|
public DateTime DeletedWhen { get; set; }
|
|
|
|
[Column("DELETED_WHO")]
|
|
[StringLength(50)]
|
|
public string DeletedWho { get; set; }
|
|
}
|
|
} |