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

44 lines
1.1 KiB
C#

using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DigitalData.UserManager.Domain.Entities
{
[Table("TBDD_GROUPS", Schema = "dbo")]
public class Group : BaseEntity
{
[StringLength(50)]
public string
#if NET7_0_OR_GREATER
?
#endif
Name { get; set; }
[Required]
[DefaultValue(false)]
[Column("AD_SYNC")]
public bool AdSync { get; set; }
[Required]
[DefaultValue(false)]
public bool Internal { get; set; }
[Required]
[DefaultValue(true)]
public bool Active { get; set; }
[StringLength(200)]
public string
#if NET7_0_OR_GREATER
?
#endif
Comment
{ get; set; }
// TODO: this column should be assigned by triggers. despite this it is not null and this is problem for creation. talk with others
[Required]
[Column("ECM_FK_ID")]
[DefaultValue(-1)]
public int EcmFkId { get; set; } = -1;
}
}