TekH bc44de63ee Update project for multi-targeting and nullable types
Updated `DigitalData.UserManager.Domain.csproj` to support .NET 4.6.2, 7.0, 8.0, and 9.0. Adjusted implicit usings and nullable reference types settings based on the target framework, disabling nullable types for `net462` and enabling them for others.

Refactored entity classes (`BaseEntity`, `ClientUser`, `Group`, `GroupOfUser`, `Module`, `ModuleOfUser`, `User`, and `UserRep`) to conditionally include nullable reference types. Added `?` operator for string properties in .NET 7.0 and above, enhancing code safety and reducing null reference exceptions.
2025-06-26 13:15:36 +02:00

98 lines
2.4 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DigitalData.UserManager.Domain.Entities
{
[Table("TBDD_MODULES", Schema = "dbo")]
public class Module
{
[Column("GUID")]
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[StringLength(50)]
public string
#if NET7_0_OR_GREATER
?
#endif
Name { get; set; }
[StringLength(20)]
[Column("SHORT_NAME")]
public string
#if NET7_0_OR_GREATER
?
#endif
ShortName { get; set; }
#region IGNORED COLUMNS
//[Required]
//[StringLength(2000)]
//public string License { get; set; }
//[Required]
//[StringLength(20)]
//public string ProductVersion { get; set; }
//[Required]
//[StringLength(20)]
//public string DbVersion { get; set; }
//public bool Active { get; set; }
//[Required]
//[StringLength(1)]
//public string VersionDelimiter { get; set; }
//[Required]
//[StringLength(1)]
//public string FileDelimiter { get; set; }
//public bool Bit1 { get; set; }
//public bool Bit2 { get; set; }
//[StringLength(50)]
//public string? String1 { get; set; }
//[StringLength(50)]
//public string? String2 { get; set; }
//public byte[]? BackgroundImage { get; set; }
//[Required]
//[StringLength(200)]
//public string ProductName1 { get; set; }
//[StringLength(200)]
//public string? ProductName2 { get; set; }
//[Required]
//[StringLength(500)]
//public string VersionUpdatePath { get; set; }
//[Required]
//public int AutoLogoutUser { get; set; }
//public bool WmsessionStartstopStartup { get; set; }
//[Required]
//[StringLength(10)]
//public string MinRequiredVersion { get; set; }
//public bool LicenseValid { get; set; }
//[StringLength(50)]
//public string? AddedWho { get; set; }
//public DateTime? AddedWhen { get; set; }
//[StringLength(50)]
//public string? ChangedWho { get; set; }
//public DateTime? ChangedWhen { get; set; }
#endregion
}
}