diff --git a/src/WorkFlow.Domain/Entities/TfFile.cs b/src/WorkFlow.Domain/Entities/TfFile.cs new file mode 100644 index 0000000..422d4c9 --- /dev/null +++ b/src/WorkFlow.Domain/Entities/TfFile.cs @@ -0,0 +1,60 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace WorkFlow.Domain.Entities; + +[Table("TBMWF_TF_FILES")] +public class TfFile +{ + [Key] + [Column("GUID", TypeName = "bigint")] + public long Id { get; set; } + + [Required] + [Column("OBJ_STATE_ID", TypeName = "bigint")] + public long ObjStateId { get; set; } + + [Required] + [StringLength(512)] + [Column("F_FAPTH", TypeName = "nvarchar(512)")] + public string FFapth { get; set; } = null!; + + /// + /// Although this field is marked as nullable in the database schema to allow + /// for greater flexibility during database-level operations or migrations, it is + /// treated as required and not null within the application logic. + /// Validation should be enforced at the application level to ensure a value is provided. + /// + [Column("HEADLINE", TypeName = "nvarchar(100)")] + public string? Headline { get; set; } + + [StringLength(100)] + [Column("SUBLINE", TypeName = "nvarchar(100)")] + public string? Subline { get; set; } + + [StringLength(250)] + [Column("COMMENT", TypeName = "nvarchar(250)")] + public string? Comment { get; set; } + + [StringLength(100)] + [Column("ICON", TypeName = "nvarchar(100)")] + public string? Icon { get; set; } + + /// + /// Although this field is marked as nullable in the database schema to allow + /// for greater flexibility during database-level operations or migrations, it is + /// treated as required and not null within the application logic. + /// Validation should be enforced at the application level to ensure a value is provided. + /// + [Column("ADDED_WHO", TypeName = "nvarchar(100)")] + public string? AddedWho { get; set; } + + /// + /// Although this field is marked as nullable in the database schema to allow + /// for greater flexibility during database-level operations or migrations, it is + /// treated as required and not null within the application logic. + /// Validation should be enforced at the application level to ensure a value is provided. + /// + [Column("ADDED_WHEN", TypeName = "datetime")] + public DateTime? AddedWhen { get; set; } +}