Entities mapped to legacy database tables using [Table] and [Column] attributes: - EmailAccount → TBDD_EMAIL_ACCOUNT (OAuth2 and password auth support) - EmailProfile → TBEMLP_POLL_PROFILES (polling configuration) - EmailProcess → TBEMLP_POLL_PROCESS (process definitions) - ProcessStep → TBEMLP_POLL_STEPS (indexing steps) - IndexingStep → TBEMLP_POLL_INDEXING_STEPS (DMS indexing fields) - EmailHistory → TBEMLP_HISTORY (processed emails) - EmailAttachment → TBEMLP_HISTORY_ATTACHMENT (email attachments) - EmailOutbox → TBEMLP_EMAIL_OUT (outgoing email queue) All entities follow Clean Architecture and DDD principles. Database schema is read-only - no migrations will modify existing tables. SNAKE_CASE columns mapped to PascalCase properties.
59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using DigitalData.EmailProfiler.Domain.Common;
|
|
|
|
namespace DigitalData.EmailProfiler.Domain.Entities;
|
|
|
|
[Table("TBEMLP_POLL_STEPS")]
|
|
public class ProcessStep : BaseEntity
|
|
{
|
|
[Key]
|
|
[Column("GUID", Order = 0)]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
[Column("PROCESS_ID")]
|
|
[Required]
|
|
public int ProcessId { get; set; }
|
|
|
|
[Column("STEP_NAME", TypeName = "varchar(50)")]
|
|
[Required]
|
|
[MaxLength(50)]
|
|
public string StepName { get; set; } = string.Empty;
|
|
|
|
[Column("KEYWORDS_BODY", TypeName = "varchar(1000)")]
|
|
[MaxLength(1000)]
|
|
public string? KeywordsBody { get; set; }
|
|
|
|
[Column("ACTIVE")]
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
[Column("SEQUENCE")]
|
|
public int? Sequence { get; set; }
|
|
|
|
[Column("COMMENT", TypeName = "varchar(500)")]
|
|
[MaxLength(500)]
|
|
public string? Comment { get; set; }
|
|
|
|
// Audit fields
|
|
[Column("ADDED_WHO", TypeName = "varchar(50)")]
|
|
[MaxLength(50)]
|
|
public string? AddedWho { get; set; }
|
|
|
|
[Column("ADDED_WHEN")]
|
|
public DateTime? AddedWhen { get; set; }
|
|
|
|
[Column("CHANGED_WHO", TypeName = "varchar(50)")]
|
|
[MaxLength(50)]
|
|
public string? ChangedWho { get; set; }
|
|
|
|
[Column("CHANGED_WHEN")]
|
|
public DateTime? ChangedWhen { get; set; }
|
|
|
|
// Navigation properties
|
|
[ForeignKey("ProcessId")]
|
|
public virtual EmailProcess? EmailProcess { get; set; }
|
|
|
|
public virtual ICollection<IndexingStep> IndexingSteps { get; set; } = new List<IndexingStep>();
|
|
}
|