diff --git a/EnotaryoPH/EnotaryoPH.Data/Entities/Transaction.cs b/EnotaryoPH/EnotaryoPH.Data/Entities/Transaction.cs index bf2a327..b8e2925 100644 --- a/EnotaryoPH/EnotaryoPH.Data/Entities/Transaction.cs +++ b/EnotaryoPH/EnotaryoPH.Data/Entities/Transaction.cs @@ -5,11 +5,17 @@ namespace EnotaryoPH.Data.Entities [Table("Transactions")] public class Transaction { - [Column("TransactionID")] - public int TransactionID { get; set; } + [Column("CreatedOn")] + public DateTime? CreatedOn { get; set; } - [Column("TransactionDate")] - public DateTime TransactionDate { get; set; } + [Column("IsRecorded")] + public bool? IsRecorded { get; set; } + + [Column("LawyerID")] + public int? LawyerID { get; set; } + + [Column("PreferredLawyerID")] + public int? PreferredLawyerID { get; set; } [Column("PrincipalID")] public int PrincipalID { get; set; } @@ -17,19 +23,15 @@ namespace EnotaryoPH.Data.Entities [Column("Status")] public string Status { get; set; } - [Column("CreatedOn")] - public DateTime? CreatedOn { get; set; } - [Column("Transaction_UID")] public Guid? Transaction_UID { get; set; } - [Column("PreferredLawyerID")] - public int? PreferredLawyerID { get; set; } + [Column("TransactionDate")] + public DateTime TransactionDate { get; set; } - [Column("LawyerID")] - public int? LawyerID { get; set; } + public TransactionDocument TransactionDocument { get; set; } - [Column("IsRecorded")] - public bool? IsRecorded { get; set; } + [Column("TransactionID")] + public int TransactionID { get; set; } } } \ No newline at end of file diff --git a/EnotaryoPH/EnotaryoPH.Data/Entities/TransactionDocument.cs b/EnotaryoPH/EnotaryoPH.Data/Entities/TransactionDocument.cs index 58e04d3..86552e8 100644 --- a/EnotaryoPH/EnotaryoPH.Data/Entities/TransactionDocument.cs +++ b/EnotaryoPH/EnotaryoPH.Data/Entities/TransactionDocument.cs @@ -5,11 +5,14 @@ namespace EnotaryoPH.Data.Entities [Table("TransactionDocuments")] public class TransactionDocument { - [Column("TransactionDocumentID")] - public int TransactionDocumentID { get; set; } + [Column("CreatedOn")] + public DateTime? CreatedOn { get; set; } - [Column("TransactionID")] - public int TransactionID { get; set; } + [Column("DocumentType")] + public string DocumentType { get; set; } + + [Column("File")] + public byte[] File { get; set; } [Column("Filename")] public string Filename { get; set; } @@ -17,19 +20,19 @@ namespace EnotaryoPH.Data.Entities [Column("Notes")] public string? Notes { get; set; } - [Column("File")] - public byte[] File { get; set; } - - [Column("UploadedOn")] - public DateTime UploadedOn { get; set; } - - [Column("CreatedOn")] - public DateTime? CreatedOn { get; set; } + [ForeignKey("TransactionID")] + public Transaction Transaction { get; set; } [Column("TransactionDocument_UID")] public Guid? TransactionDocument_UID { get; set; } - [Column("DocumentType")] - public string DocumentType { get; set; } + [Column("TransactionDocumentID")] + public int TransactionDocumentID { get; set; } + + [Column("TransactionID")] + public int TransactionID { get; set; } + + [Column("UploadedOn")] + public DateTime UploadedOn { get; set; } } } \ No newline at end of file diff --git a/EnotaryoPH/EnotaryoPH.Data/NotaryoDBContext.cs b/EnotaryoPH/EnotaryoPH.Data/NotaryoDBContext.cs index 6b403c7..fd8cec6 100644 --- a/EnotaryoPH/EnotaryoPH.Data/NotaryoDBContext.cs +++ b/EnotaryoPH/EnotaryoPH.Data/NotaryoDBContext.cs @@ -12,7 +12,21 @@ namespace EnotaryoPH.Data protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseNpgsql(_configuration.GetConnectionString("NotaryoDatabase")); - public DbSet? Users { get; set; } + public DbSet? ErrorLogs { get; set; } + public DbSet? EventLogs { get; set; } + public DbSet? IdentificationDocuments { get; set; } public DbSet? Lawyers { get; set; } + public DbSet? LawyerVideoConferenceParticipants { get; set; } + public DbSet? LawyerVideoConferenceSchedules { get; set; } + public DbSet