refactor(Profile): simplify Profile entity and remove unused metadata

- Removed dependency on IUnique<int> interface
- Removed validation and database annotations like [Required], [Key]
- Renamed/updated column mappings and replaced required fields with nullable types
- Removed metadata fields such as AddedWho, AddedWhen, ChangedWho, ChangedWhen, etc.
- Cleaned up namespace and using directives
This commit is contained in:
tekh 2025-07-18 15:44:49 +02:00
parent 1fcdcf6c0a
commit 547d723f47

View File

@ -1,44 +1,27 @@
using DigitalData.Core.Abstractions; using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlow.Domain.Entities namespace WorkFlow.Domain.Entities;
public class Profile
{ {
[Table("TBMWF_PROFILE", Schema = "dbo")] [Column("PROFILE_ID")]
public class Profile : IUnique<int> public int? Id { get; set; }
{
[Key]
[Column("GUID")]
public int Id { get; init; }
[Required] [Column("TYPE_ID")]
[Column("INTL_NAME", TypeName = "varchar(200)")] public int? TypeId { get; set; }
public required string IntlName { get; init; }
[Required] [Column("CAPTION")]
[Column("EXT_ID1")] public string? Caption { get; set; }
public required int ExtId1 { get; init; }
[Required] [Column("SUBTITLE")]
[Column("ACTIVE")] public string? Subtitle { get; set; }
public required bool Active { get; init; }
[Required] [Column("COUNTOBJ")]
[Column("ADDED_WHO", TypeName = "varchar(30)")] public int? CountObj { get; set; }
public required string AddedWho { get; init; }
[Required] [Column("FORE_COLOR")]
[Column("ADDED_WHEN", TypeName = "datetime")] public string? ForeColor { get; set; }
public required DateTime AddedWhen { get; init; }
[Column("CHANGED_WHO", TypeName = "varchar(30)")] [Column("BACK_COLOR")]
public string? ChangedWho { get; init; } public string? BackColor { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; init; }
[Required]
[Column("TYPE_ID")]
public required byte TypeId { get; init; }
}
} }