feat(domain): add all domain entities with legacy database mapping
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.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DigitalData.EmailProfiler.Domain.Common;
|
||||
|
||||
namespace DigitalData.EmailProfiler.Domain.Entities;
|
||||
|
||||
[Table("TBEMLP_POLL_INDEXING_STEPS")]
|
||||
public class IndexingStep : BaseEntity
|
||||
{
|
||||
[Key]
|
||||
[Column("GUID", Order = 0)]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("STEP_ID")]
|
||||
[Required]
|
||||
public int StepId { get; set; }
|
||||
|
||||
[Column("INDEXNAME", TypeName = "varchar(100)")]
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string IndexName { get; set; } = string.Empty;
|
||||
|
||||
[Column("INDEXVALUE", TypeName = "varchar(100)")]
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string IndexValue { get; set; } = string.Empty;
|
||||
|
||||
[Column("ACTIVE")]
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
[Column("USE_FOR_DIRECT_ANSWER")]
|
||||
public bool UseForDirectAnswer { get; set; }
|
||||
|
||||
[Column("SEQUENCE")]
|
||||
public int? Sequence { 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("StepId")]
|
||||
public virtual ProcessStep? ProcessStep { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user