feat(TfFile): Entität mit Metadaten und Schema-Zuordnung hinzufügen
- Enthält detaillierte Schema-Zuordnung mit Validierungshinweisen für nullfähige Felder. - Ermöglicht die Verfolgung von Dateimetadaten innerhalb des Workflow-Systems.
This commit is contained in:
60
src/WorkFlow.Domain/Entities/TfFile.cs
Normal file
60
src/WorkFlow.Domain/Entities/TfFile.cs
Normal file
@@ -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!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Although this field is marked as <c>nullable</c> in the database schema to allow
|
||||||
|
/// for greater flexibility during database-level operations or migrations, it is
|
||||||
|
/// treated as <c>required</c> and <c>not null</c> within the application logic.
|
||||||
|
/// Validation should be enforced at the application level to ensure a value is provided.
|
||||||
|
/// </summary>
|
||||||
|
[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; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Although this field is marked as <c>nullable</c> in the database schema to allow
|
||||||
|
/// for greater flexibility during database-level operations or migrations, it is
|
||||||
|
/// treated as <c>required</c> and <c>not null</c> within the application logic.
|
||||||
|
/// Validation should be enforced at the application level to ensure a value is provided.
|
||||||
|
/// </summary>
|
||||||
|
[Column("ADDED_WHO", TypeName = "nvarchar(100)")]
|
||||||
|
public string? AddedWho { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Although this field is marked as <c>nullable</c> in the database schema to allow
|
||||||
|
/// for greater flexibility during database-level operations or migrations, it is
|
||||||
|
/// treated as <c>required</c> and <c>not null</c> within the application logic.
|
||||||
|
/// Validation should be enforced at the application level to ensure a value is provided.
|
||||||
|
/// </summary>
|
||||||
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
|
public DateTime? AddedWhen { get; set; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user