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