diff --git a/source/backend/api/Areas/Contacts/Controllers/SearchController.cs b/source/backend/api/Areas/Contacts/Controllers/SearchController.cs
index a21fc05d2b..6daa70003c 100644
--- a/source/backend/api/Areas/Contacts/Controllers/SearchController.cs
+++ b/source/backend/api/Areas/Contacts/Controllers/SearchController.cs
@@ -10,7 +10,6 @@
using Pims.Api.Policies;
using Pims.Api.Services.Interfaces;
using Pims.Dal.Entities.Models;
-using Pims.Dal.Repositories;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/source/backend/api/Areas/ExpropriationPayment/ExpropriationPaymentController.cs b/source/backend/api/Areas/ExpropriationPayment/ExpropriationPaymentController.cs
index 4b22ea8693..eadd9e6202 100644
--- a/source/backend/api/Areas/ExpropriationPayment/ExpropriationPaymentController.cs
+++ b/source/backend/api/Areas/ExpropriationPayment/ExpropriationPaymentController.cs
@@ -67,7 +67,7 @@ public IActionResult GetExpropriationPaymentById([FromRoute] long id)
///
///
///
- /// Validate id matching
+ /// Validate id matching.
[HttpPut("{id:long}")]
[HasPermission(Permissions.AcquisitionFileEdit)]
[Produces("application/json")]
diff --git a/source/backend/api/Areas/Leases/Controllers/SearchController.cs b/source/backend/api/Areas/Leases/Controllers/SearchController.cs
index 9fb40f17b2..5429d122ff 100644
--- a/source/backend/api/Areas/Leases/Controllers/SearchController.cs
+++ b/source/backend/api/Areas/Leases/Controllers/SearchController.cs
@@ -14,7 +14,6 @@
using Pims.Core.Json;
using Pims.Dal.Entities.Models;
using Pims.Dal.Security;
-using Serilog.Core;
using Swashbuckle.AspNetCore.Annotations;
namespace Pims.Api.Areas.Lease.Controllers
diff --git a/source/backend/api/Areas/Property/Controllers/PropertyContactController.cs b/source/backend/api/Areas/Property/Controllers/PropertyContactController.cs
index b7609a6556..f11121a1dd 100644
--- a/source/backend/api/Areas/Property/Controllers/PropertyContactController.cs
+++ b/source/backend/api/Areas/Property/Controllers/PropertyContactController.cs
@@ -60,14 +60,15 @@ public PropertyContactController(IPropertyRepository propertyRepository, IProper
[TypeFilter(typeof(NullJsonResultFilter))]
public IActionResult GetPropertyContacts(long propertyId)
{
- //var property = _propertyRepository.GetAllAssociationsById(propertyId);
-
- var propertyContacts = new List() {
- new PropertyContactModel() {
+ // var property = _propertyRepository.GetAllAssociationsById(propertyId);
+ var propertyContacts = new List()
+ {
+ new PropertyContactModel()
+ {
Id = 1,
Person = new PersonModel() { Id = 1, FirstName = "John", Surname = "Doe" },
Purpose="Test Purpouse",
- }
+ },
};
return new JsonResult(propertyContacts);
diff --git a/source/backend/api/Areas/Reports/Controllers/AcquisitionController.cs b/source/backend/api/Areas/Reports/Controllers/AcquisitionController.cs
index 9c7a87179b..76cd747d56 100644
--- a/source/backend/api/Areas/Reports/Controllers/AcquisitionController.cs
+++ b/source/backend/api/Areas/Reports/Controllers/AcquisitionController.cs
@@ -94,7 +94,7 @@ public IActionResult ExportAgreements([FromBody] AcquisitionReportFilterModel fi
///
/// Exports compensation requisitions as Excel file.
/// Include 'Accept' header to request the appropriate export -
- /// ["application/application/vnd.ms-excel"]
+ /// ["application/application/vnd.ms-excel"].
///
///
/// The generated Excel file.
diff --git a/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportModel.cs b/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportModel.cs
index fac9d7800e..692e25cfb9 100644
--- a/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportModel.cs
+++ b/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportModel.cs
@@ -1,7 +1,6 @@
using System;
using System.ComponentModel;
using System.Globalization;
-using System.Linq;
using System.Security.Claims;
using Pims.Core.Extensions;
using Pims.Dal.Entities;
diff --git a/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportTotalsModel.cs b/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportTotalsModel.cs
index d96727687f..41f9187fa0 100644
--- a/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportTotalsModel.cs
+++ b/source/backend/api/Areas/Reports/Models/Acquisition/CompensationFinancialReportTotalsModel.cs
@@ -122,6 +122,5 @@ private static void AddToProjectTotal(Dictionary dict, long proje
dict.Add(projectId, financialValue);
}
}
-
}
}
diff --git a/source/backend/api/Constants/NoteType.cs b/source/backend/api/Constants/NoteType.cs
index 41d473b748..558d771999 100644
--- a/source/backend/api/Constants/NoteType.cs
+++ b/source/backend/api/Constants/NoteType.cs
@@ -6,8 +6,6 @@ namespace Pims.Api.Constants
[JsonConverter(typeof(JsonStringEnumMemberConverter))]
public enum NoteType
{
- [EnumMember(Value = "activity")]
- Activity,
[EnumMember(Value = "acquisition_file")]
Acquisition_File,
[EnumMember(Value = "lease_file")]
diff --git a/source/backend/api/Controllers/LookupController.cs b/source/backend/api/Controllers/LookupController.cs
index efe11751fa..39616b7ea4 100644
--- a/source/backend/api/Controllers/LookupController.cs
+++ b/source/backend/api/Controllers/LookupController.cs
@@ -120,7 +120,6 @@ public IActionResult GetAll()
var propertyResearchPurposeTypes = _mapper.Map(_lookupRepository.GetAllPropertyResearchPurposeTypes());
var propertyAnomalyTypes = _mapper.Map(_lookupRepository.GetAllPropertyAnomalyTypes());
var propertyRoadTypes = _mapper.Map(_lookupRepository.GetAllPropertyRoadTypes());
- //var propertyAdjacentLandTypes = _mapper.Map(_lookupRepository.GetAllPropertyAdjacentLandTypes());
var volumeUnitTypes = _mapper.Map(_lookupRepository.GetAllPropertyVolumeUnitTypes());
var propertyVolumetricTypes = _mapper.Map(_lookupRepository.GetAllPropertyVolumetricTypes());
var pphStatusType = _mapper.Map(_lookupRepository.GetAllPPHStatusType());
@@ -128,8 +127,6 @@ public IActionResult GetAll()
var acquisitionFileStatusTypes = _mapper.Map(_lookupRepository.GetAllAcquisitionFileStatusTypes());
var acquisitionPhysFileStatusTypes = _mapper.Map(_lookupRepository.GetAllAcquisitionPhysFileStatusTypes());
var acquisitionTypes = _mapper.Map(_lookupRepository.GetAllAcquisitionTypes());
- var activityTemplateTypes = _mapper.Map(_lookupRepository.GetAllActivityTemplateTypes());
- var activityStatusTypes = _mapper.Map(_lookupRepository.GetAllActivityStatusTypes());
var acqFilePersonProfileTypes = _mapper.Map(_lookupRepository.GetAllAcqFilePersonProfileTypes());
var tenantTypes = _mapper.Map(_lookupRepository.GetAllTenantTypes());
var acqFundingTypes = _mapper.Map(_lookupRepository.GetAllAcquisitionFundingTypes());
@@ -180,7 +177,6 @@ public IActionResult GetAll()
codes.AddRange(propertyResearchPurposeTypes);
codes.AddRange(propertyAnomalyTypes);
codes.AddRange(propertyRoadTypes);
- //codes.AddRange(propertyAdjacentLandTypes);
codes.AddRange(volumeUnitTypes);
codes.AddRange(propertyVolumetricTypes);
codes.AddRange(pphStatusType);
@@ -188,8 +184,6 @@ public IActionResult GetAll()
codes.AddRange(acquisitionFileStatusTypes);
codes.AddRange(acquisitionPhysFileStatusTypes);
codes.AddRange(acquisitionTypes);
- codes.AddRange(activityTemplateTypes);
- codes.AddRange(activityStatusTypes);
codes.AddRange(acqFilePersonProfileTypes);
codes.AddRange(tenantTypes);
codes.AddRange(acqFundingTypes);
diff --git a/source/backend/api/Models/Concepts/AcquisitionFile/AcquisitionFilePropertyModel.cs b/source/backend/api/Models/Concepts/AcquisitionFile/AcquisitionFilePropertyModel.cs
index f4b6765073..5ab14c4360 100644
--- a/source/backend/api/Models/Concepts/AcquisitionFile/AcquisitionFilePropertyModel.cs
+++ b/source/backend/api/Models/Concepts/AcquisitionFile/AcquisitionFilePropertyModel.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
namespace Pims.Api.Models.Concepts
{
diff --git a/source/backend/api/Models/Concepts/ExpropriationPayment/ExpropriationPaymentModel.cs b/source/backend/api/Models/Concepts/ExpropriationPayment/ExpropriationPaymentModel.cs
index 87afbcb6cb..3f42563be7 100644
--- a/source/backend/api/Models/Concepts/ExpropriationPayment/ExpropriationPaymentModel.cs
+++ b/source/backend/api/Models/Concepts/ExpropriationPayment/ExpropriationPaymentModel.cs
@@ -26,6 +26,5 @@ public class ExpropriationPaymentModel : BaseAppModel
public bool? IsDisabled { get; set; }
public List PaymentItems { get; set; }
-
}
}
diff --git a/source/backend/api/Models/Concepts/InterestHolder/InterestHolderPropertyMap.cs b/source/backend/api/Models/Concepts/InterestHolder/InterestHolderPropertyMap.cs
index 3b1fe0d8ab..31a70a17de 100644
--- a/source/backend/api/Models/Concepts/InterestHolder/InterestHolderPropertyMap.cs
+++ b/source/backend/api/Models/Concepts/InterestHolder/InterestHolderPropertyMap.cs
@@ -1,6 +1,5 @@
using System.Linq;
using Mapster;
-using Pims.Dal.Entities;
using Entity = Pims.Dal.Entities;
namespace Pims.Api.Models.Concepts
diff --git a/source/backend/api/Models/Concepts/Lease/LeasePaymentReportMap.cs b/source/backend/api/Models/Concepts/Lease/LeasePaymentReportMap.cs
index d4f76b8933..e8e3baec3e 100644
--- a/source/backend/api/Models/Concepts/Lease/LeasePaymentReportMap.cs
+++ b/source/backend/api/Models/Concepts/Lease/LeasePaymentReportMap.cs
@@ -40,7 +40,7 @@ public void Register(TypeAdapterConfig config)
private static string GetFallbackPropertyIdentifier(PimsPropertyLease propertyLease)
{
PimsProperty property = propertyLease.Property;
- if(property?.Pid != null)
+ if (property?.Pid != null)
{
return property.Pid.ToString().ConvertPIDToDash();
}
diff --git a/source/backend/api/Models/Concepts/Note/EntityNoteModelMap.cs b/source/backend/api/Models/Concepts/Note/EntityNoteModelMap.cs
index 450a492e12..29ce135847 100644
--- a/source/backend/api/Models/Concepts/Note/EntityNoteModelMap.cs
+++ b/source/backend/api/Models/Concepts/Note/EntityNoteModelMap.cs
@@ -7,23 +7,6 @@ public class EntityNoteModelMap : IRegister
{
public void Register(TypeAdapterConfig config)
{
- // PimsActivityInstanceNote -> EntityNoteModel
- config.NewConfig()
- .Map(dest => dest.Id, src => src.PimsActivityInstanceNoteId)
- .Map(dest => dest.Note, src => src.Note)
- .Map(dest => dest.Parent, src => src)
- .Inherits();
-
- // PimsActivityInstanceNote <- EntityNoteModel
- config.NewConfig()
- .Map(dest => dest.PimsActivityInstanceNoteId, src => src.Id)
- .Map(dest => dest.Note, src => src.Note)
- .Map(dest => dest.ActivityInstanceId, src => src.Parent.Id)
- .Inherits();
-
- config.NewConfig()
- .ConstructUsing(src => new NoteParentModel { Id = src.ActivityInstanceId });
-
// PimsAcquisitionFileNote -> EntityNoteModel
config.NewConfig()
.Map(dest => dest.Id, src => src.AcquisitionFileNoteId)
diff --git a/source/backend/api/Models/Concepts/Property/PropertyContactModel.cs b/source/backend/api/Models/Concepts/Property/PropertyContactModel.cs
index 3e8e2aceb7..b9f2bcd615 100644
--- a/source/backend/api/Models/Concepts/Property/PropertyContactModel.cs
+++ b/source/backend/api/Models/Concepts/Property/PropertyContactModel.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
namespace Pims.Api.Models.Concepts
{
diff --git a/source/backend/api/Repositories/RestCommon/BaseRestRepository.cs b/source/backend/api/Repositories/RestCommon/BaseRestRepository.cs
index 87d162aba4..8c6ebce57e 100644
--- a/source/backend/api/Repositories/RestCommon/BaseRestRepository.cs
+++ b/source/backend/api/Repositories/RestCommon/BaseRestRepository.cs
@@ -216,7 +216,7 @@ private static string GetFileNameFromContentDisposition(string contentDispositio
const string fileNameFlag = "filename";
string[] parts = contentDisposition.Split("; ");
string fileNamePart = parts.FirstOrDefault(x => x.Contains(fileNameFlag));
- return fileNamePart[(fileNameFlag.Length + 1) ..].Replace("\"", string.Empty);
+ return fileNamePart[(fileNameFlag.Length + 1)..].Replace("\"", string.Empty);
}
private async Task> ProcessResponse(HttpResponseMessage response)
diff --git a/source/backend/api/Services/AcquisitionFileService.cs b/source/backend/api/Services/AcquisitionFileService.cs
index 5e3402e8f9..fbf3d7514a 100644
--- a/source/backend/api/Services/AcquisitionFileService.cs
+++ b/source/backend/api/Services/AcquisitionFileService.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
-using k8s.KubeConfigModels;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Pims.Api.Helpers.Exceptions;
@@ -287,7 +286,7 @@ public PimsAcquisitionFile UpdateProperties(PimsAcquisitionFile acquisitionFile,
foreach (var deletedProperty in differenceSet)
{
var acqFileProperties = _acquisitionFilePropertyRepository.GetPropertiesByAcquisitionFileId(acquisitionFile.Internal_Id).FirstOrDefault(ap => ap.PropertyId == deletedProperty.PropertyId);
- if (acqFileProperties.PimsActInstPropAcqFiles.Any() || acqFileProperties.PimsTakes.Any())
+ if (acqFileProperties.PimsTakes.Any())
{
throw new BusinessRuleViolationException();
}
diff --git a/source/backend/api/Services/DocumentService.cs b/source/backend/api/Services/DocumentService.cs
index d10706a335..e2e9ffe432 100644
--- a/source/backend/api/Services/DocumentService.cs
+++ b/source/backend/api/Services/DocumentService.cs
@@ -28,13 +28,8 @@ namespace Pims.Api.Services
///
public class DocumentService : BaseService, IDocumentService
{
- private readonly IDocumentRepository documentRepository;
- private readonly IEdmsDocumentRepository documentStorageRepository;
- private readonly IDocumentTypeRepository documentTypeRepository;
- private readonly IAvService avService;
- private readonly IMapper mapper;
-
- private static readonly string[] validExtensions = {
+ private static readonly string[] validExtensions =
+ {
"txt",
"pdf",
"docx",
@@ -56,6 +51,12 @@ public class DocumentService : BaseService, IDocumentService
"kmz",
};
+ private readonly IDocumentRepository documentRepository;
+ private readonly IEdmsDocumentRepository documentStorageRepository;
+ private readonly IDocumentTypeRepository documentTypeRepository;
+ private readonly IAvService avService;
+ private readonly IMapper mapper;
+
public DocumentService(
ClaimsPrincipal user,
ILogger logger,
@@ -306,7 +307,7 @@ public async Task> DownloadFileAsync(long mayanDocu
this.User.ThrowIfNotAuthorized(Permissions.DocumentView);
ExternalResult downloadResult = await documentStorageRepository.TryDownloadFileAsync(mayanDocumentId, mayanFileId);
- if (isValidDocumentExtension(downloadResult.Payload.FileName))
+ if (IsValidDocumentExtension(downloadResult.Payload.FileName))
{
return downloadResult;
}
@@ -330,7 +331,7 @@ public async Task> DownloadFileLatestAsync(long may
{
if (documentResult.Payload != null)
{
- if (isValidDocumentExtension(documentResult.Payload.FileLatest.FileName))
+ if (IsValidDocumentExtension(documentResult.Payload.FileLatest.FileName))
{
ExternalResult downloadResult = await documentStorageRepository.TryDownloadFileAsync(documentResult.Payload.Id, documentResult.Payload.FileLatest.Id);
return downloadResult;
@@ -364,13 +365,19 @@ public async Task> DownloadFileLatestAsync(long may
}
}
+ private static bool IsValidDocumentExtension(string fileName)
+ {
+ var fileNameExtension = Path.GetExtension(fileName).Replace(".", string.Empty).ToLower();
+ return validExtensions.Contains(fileNameExtension);
+ }
+
private async Task> UploadDocumentAsync(long documentType, IFormFile fileRaw)
{
this.Logger.LogInformation("Uploading storage document");
this.User.ThrowIfNotAuthorized(Permissions.DocumentAdd);
await this.avService.ScanAsync(fileRaw);
- if (isValidDocumentExtension(fileRaw.FileName))
+ if (IsValidDocumentExtension(fileRaw.FileName))
{
ExternalResult result = await documentStorageRepository.TryUploadDocumentAsync(documentType, fileRaw);
return result;
@@ -451,11 +458,5 @@ private async Task>> DeleteMetadata(long m
return result;
}
-
- private static bool isValidDocumentExtension(string fileName)
- {
- var fileNameExtension = Path.GetExtension(fileName).Replace(".", string.Empty).ToLower();
- return validExtensions.Contains(fileNameExtension);
- }
}
}
diff --git a/source/backend/api/Services/H120CategoryService.cs b/source/backend/api/Services/H120CategoryService.cs
index 5c1aa865a2..aae9e00be2 100644
--- a/source/backend/api/Services/H120CategoryService.cs
+++ b/source/backend/api/Services/H120CategoryService.cs
@@ -28,6 +28,5 @@ public IEnumerable GetAll()
return _h120CategoryRepository.GetAll();
}
-
}
}
diff --git a/source/backend/api/Services/IAcquisitionFileService.cs b/source/backend/api/Services/IAcquisitionFileService.cs
index 553f079d34..f684d477b2 100644
--- a/source/backend/api/Services/IAcquisitionFileService.cs
+++ b/source/backend/api/Services/IAcquisitionFileService.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using Pims.Api.Areas.Acquisition.Models.Search;
using Pims.Dal.Entities;
using Pims.Dal.Entities.Models;
using Pims.Dal.Exceptions;
diff --git a/source/backend/api/Services/ICompReqFinancialService.cs b/source/backend/api/Services/ICompReqFinancialService.cs
index bdef94c24f..5324121471 100644
--- a/source/backend/api/Services/ICompReqFinancialService.cs
+++ b/source/backend/api/Services/ICompReqFinancialService.cs
@@ -7,6 +7,7 @@ namespace Pims.Api.Services
public interface ICompReqFinancialService
{
IEnumerable GetAllByAcquisitionFileId(long acquisitionFileId, bool? finalOnly);
+
IEnumerable SearchCompensationRequisitionFinancials(AcquisitionReportFilterModel filter);
}
}
diff --git a/source/backend/api/Services/ICompensationRequisitionService.cs b/source/backend/api/Services/ICompensationRequisitionService.cs
index f20404206b..b8bcf666e5 100644
--- a/source/backend/api/Services/ICompensationRequisitionService.cs
+++ b/source/backend/api/Services/ICompensationRequisitionService.cs
@@ -6,8 +6,6 @@ public interface ICompensationRequisitionService
{
PimsCompensationRequisition GetById(long compensationRequisitionId);
- //PimsAcquisitionPayee GetPayeeByCompensationId(long compensationRequisitionId);
-
PimsCompensationRequisition Update(PimsCompensationRequisition compensationRequisition);
bool DeleteCompensation(long compensationId);
diff --git a/source/backend/api/Services/NoteService.cs b/source/backend/api/Services/NoteService.cs
index b4ce676d2e..9854e1d643 100644
--- a/source/backend/api/Services/NoteService.cs
+++ b/source/backend/api/Services/NoteService.cs
@@ -58,14 +58,6 @@ public EntityNoteModel Add(NoteType type, EntityNoteModel model)
switch (type)
{
- case NoteType.Activity:
- PimsActivityInstanceNote pimsEntity = _mapper.Map(model);
-
- PimsActivityInstanceNote createdEntity = _entityNoteRepository.Add(pimsEntity);
- _entityNoteRepository.CommitTransaction();
-
- result = _mapper.Map(createdEntity);
- break;
case NoteType.Acquisition_File:
PimsAcquisitionFileNote acqNoteEntity = _mapper.Map(model);
@@ -136,7 +128,6 @@ public bool DeleteNote(NoteType type, long noteId, bool commitTransaction = true
deleted = type switch
{
- NoteType.Activity => _entityNoteRepository.DeleteActivityNotes(noteId),
NoteType.Acquisition_File => _entityNoteRepository.DeleteAcquisitionFileNotes(noteId),
NoteType.Project => _entityNoteRepository.DeleteProjectNotes(noteId),
NoteType.Lease_File => _entityNoteRepository.DeleteLeaseFileNotes(noteId),
@@ -165,7 +156,6 @@ public IEnumerable GetNotes(NoteType type, long entityId)
List notes = type switch
{
- NoteType.Activity => _entityNoteRepository.GetAllActivityNotesById(entityId).ToList(),
NoteType.Acquisition_File => _entityNoteRepository.GetAllAcquisitionNotesById(entityId).ToList(),
NoteType.Project => _entityNoteRepository.GetAllProjectNotesById(entityId).ToList(),
NoteType.Lease_File => _entityNoteRepository.GetAllLeaseNotesById(entityId).ToList(),
diff --git a/source/backend/core/Exceptions/ContractorNotInTeamException.cs b/source/backend/core/Exceptions/ContractorNotInTeamException.cs
index 7064fcbe86..7bdca8f774 100644
--- a/source/backend/core/Exceptions/ContractorNotInTeamException.cs
+++ b/source/backend/core/Exceptions/ContractorNotInTeamException.cs
@@ -11,12 +11,11 @@ public class ContractorNotInTeamException : Exception
{
public ContractorNotInTeamException()
{
-
}
- public ContractorNotInTeamException(string message) : base(message)
+ public ContractorNotInTeamException(string message)
+ : base(message)
{
-
}
public ContractorNotInTeamException(string message, Exception innerException)
diff --git a/source/backend/dal/Helpers/Extensions/AcquisitionOwnerExtensions.cs b/source/backend/dal/Helpers/Extensions/AcquisitionOwnerExtensions.cs
index d8c5676814..c2b5b15011 100644
--- a/source/backend/dal/Helpers/Extensions/AcquisitionOwnerExtensions.cs
+++ b/source/backend/dal/Helpers/Extensions/AcquisitionOwnerExtensions.cs
@@ -7,7 +7,7 @@ public static class AcquisitionOwnerExtensions
{
public static string FormatOwnerName(this PimsAcquisitionOwner pimsOwner)
{
- if(pimsOwner is null)
+ if (pimsOwner is null)
{
return string.Empty;
}
diff --git a/source/backend/dal/Helpers/Extensions/PropertyExtensions.cs b/source/backend/dal/Helpers/Extensions/PropertyExtensions.cs
index 0d36ec8824..4dec9c0d68 100644
--- a/source/backend/dal/Helpers/Extensions/PropertyExtensions.cs
+++ b/source/backend/dal/Helpers/Extensions/PropertyExtensions.cs
@@ -67,7 +67,7 @@ public static class PropertyExtensions
if (!string.IsNullOrWhiteSpace(filter.PinOrPid))
{
- //note - 2 part search required. all matches found by removing leading 0's, then matches filtered in subsequent step. This is because EF core does not support an lpad method.
+ // note - 2 part search required. all matches found by removing leading 0's, then matches filtered in subsequent step. This is because EF core does not support an lpad method.
Regex nonInteger = new Regex("[^\\d]");
var formattedPidPin = Convert.ToInt32(nonInteger.Replace(filter.PinOrPid, string.Empty)).ToString();
query = query.
diff --git a/source/backend/dal/Helpers/Extensions/ServiceCollectionExtensions.cs b/source/backend/dal/Helpers/Extensions/ServiceCollectionExtensions.cs
index a57414c7fb..8ab8fd3aa9 100644
--- a/source/backend/dal/Helpers/Extensions/ServiceCollectionExtensions.cs
+++ b/source/backend/dal/Helpers/Extensions/ServiceCollectionExtensions.cs
@@ -45,8 +45,6 @@ public static IServiceCollection AddPimsDalRepositories(this IServiceCollection
repositories.AddScoped();
repositories.AddScoped();
repositories.AddScoped();
- repositories.AddScoped();
- repositories.AddScoped();
repositories.AddScoped();
repositories.AddScoped();
repositories.AddScoped();
diff --git a/source/backend/dal/Models/PageFilter.cs b/source/backend/dal/Models/PageFilter.cs
index cb10d107eb..2670d94528 100644
--- a/source/backend/dal/Models/PageFilter.cs
+++ b/source/backend/dal/Models/PageFilter.cs
@@ -78,7 +78,7 @@ public virtual bool IsValid()
}
///
- /// Convert a start index to a page for paging.
+ /// Convert a start index to a page for paging.
///
///
///
diff --git a/source/backend/dal/Repositories/AcquisitionFilePropertyRepository.cs b/source/backend/dal/Repositories/AcquisitionFilePropertyRepository.cs
index 220355e20f..9e32d05cb5 100644
--- a/source/backend/dal/Repositories/AcquisitionFilePropertyRepository.cs
+++ b/source/backend/dal/Repositories/AcquisitionFilePropertyRepository.cs
@@ -36,7 +36,6 @@ public List GetPropertiesByAcquisitionFileId(long a
{
return Context.PimsPropertyAcquisitionFiles
.Where(x => x.AcquisitionFileId == acquisitionFileId)
- .Include(rp => rp.PimsActInstPropAcqFiles)
.Include(rp => rp.PimsTakes)
.Include(rp => rp.Property)
.ThenInclude(rp => rp.RegionCodeNavigation)
@@ -80,11 +79,8 @@ public void Delete(PimsPropertyAcquisitionFile propertyAcquisitionFile)
var propertyAcquisitionFileToDelete = Context.PimsPropertyAcquisitionFiles
.Where(x => x.PropertyAcquisitionFileId == propertyAcquisitionFile.Internal_Id)
- .Include(rp => rp.PimsActInstPropAcqFiles)
.FirstOrDefault() ?? throw new KeyNotFoundException();
- propertyAcquisitionFileToDelete.PimsActInstPropAcqFiles.ForEach(s => Context.PimsActInstPropAcqFiles.Remove(s));
-
Context.PimsPropertyAcquisitionFiles.Remove(propertyAcquisitionFileToDelete);
}
diff --git a/source/backend/dal/Repositories/DocumentActivityRepository.cs b/source/backend/dal/Repositories/DocumentActivityRepository.cs
deleted file mode 100644
index 8bcc8a3cf3..0000000000
--- a/source/backend/dal/Repositories/DocumentActivityRepository.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Logging;
-using Pims.Core.Extensions;
-using Pims.Dal.Entities;
-
-namespace Pims.Dal.Repositories
-{
- ///
- /// DocumentActivityRepository class, provides a service layer to interact with document types within the datasource.
- ///
- public class DocumentActivityRepository : BaseRepository, IDocumentActivityRepository
- {
- #region Constructors
-
- ///
- /// Creates a new instance of a DocumentActivityRepository, and initializes it with the specified arguments.
- ///
- ///
- ///
- ///
- public DocumentActivityRepository(PimsContext dbContext, ClaimsPrincipal user, ILogger logger)
- : base(dbContext, user, logger)
- {
- }
- #endregion
-
- #region Methods
-
- ///
- /// Get a list of all the document activity relationships for a given document.
- ///
- ///
- public IList GetAllByDocument(long documentId)
- {
- return this.Context.PimsActivityInstanceDocuments
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentStatusTypeCodeNavigation)
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentType)
- .Where(ad => ad.DocumentId == documentId)
- .AsNoTracking()
- .ToList();
- }
-
- ///
- /// Get a list of all the document activity relationships for a given research file.
- ///
- ///
- public IList GetAllByResearchFileActivities(long fileId)
- {
- return this.Context.PimsActivityInstanceDocuments
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentStatusTypeCodeNavigation)
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentType)
- .Where(ad => ad.ActivityInstance.PimsResearchActivityInstances.Any(x => x.ResearchFileId == fileId))
- .AsNoTracking()
- .ToList();
- }
-
- ///
- /// Get a list of all the document activity relationships for a a given acquisition file.
- ///
- ///
- public IList GetAllByAcquisitionFileActivities(long fileId)
- {
- return this.Context.PimsActivityInstanceDocuments
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentStatusTypeCodeNavigation)
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentType)
- .Where(ad => ad.ActivityInstance.PimsAcquisitionActivityInstances.Any(x => x.AcquisitionFileId == fileId))
- .AsNoTracking()
- .ToList();
- }
-
- ///
- /// Get a list of all the document relationships for a given activity.
- ///
- ///
- public IList GetAllByActivity(long activityId)
- {
- return this.Context.PimsActivityInstanceDocuments
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentStatusTypeCodeNavigation)
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentType)
- .Where(ad => ad.ActivityInstanceId == activityId)
- .AsNoTracking()
- .ToList();
- }
-
- ///
- /// Adds the passed document activity to the database.
- ///
- ///
- ///
- public PimsActivityInstanceDocument Add(PimsActivityInstanceDocument activityDocument)
- {
- activityDocument.ThrowIfNull(nameof(activityDocument));
-
- var newEntry = this.Context.PimsActivityInstanceDocuments.Add(activityDocument);
- if (newEntry.State == EntityState.Added)
- {
- return newEntry.Entity;
- }
- else
- {
- throw new InvalidOperationException("Could not create document");
- }
- }
-
- ///
- /// Deletes the passed document activity to the database.
- ///
- ///
- ///
- public bool Delete(PimsActivityInstanceDocument activityDocument)
- {
- if (activityDocument == null)
- {
- throw new ArgumentNullException(nameof(activityDocument), "activityDocument cannot be null.");
- }
-
- this.Context.PimsActivityInstanceDocuments.Remove(new PimsActivityInstanceDocument() { ActivityInstanceDocumentId = activityDocument.ActivityInstanceDocumentId });
- return true;
- }
-
- #endregion
- }
-}
diff --git a/source/backend/dal/Repositories/DocumentActivityTemplateRepository.cs b/source/backend/dal/Repositories/DocumentActivityTemplateRepository.cs
deleted file mode 100644
index f035fb0b85..0000000000
--- a/source/backend/dal/Repositories/DocumentActivityTemplateRepository.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Logging;
-using Pims.Core.Extensions;
-using Pims.Dal.Entities;
-
-namespace Pims.Dal.Repositories
-{
- ///
- /// DocumentActivityTemplateRepository class, provides a service layer to interact with activity template documents within the datasource.
- ///
- public class DocumentActivityTemplateRepository : BaseRepository, IDocumentActivityTemplateRepository
- {
- #region Constructors
-
- ///
- /// Creates a new instance of a DocumentActivityTemplateRepository, and initializes it with the specified arguments.
- ///
- ///
- ///
- ///
- public DocumentActivityTemplateRepository(PimsContext dbContext, ClaimsPrincipal user, ILogger logger)
- : base(dbContext, user, logger)
- {
- }
- #endregion
-
- #region Methods
-
- ///
- /// Get a list of all the document activity template relationships for a given document.
- ///
- ///
- public IList GetAllByDocument(long documentId)
- {
- return this.Context.PimsActivityTemplateDocuments
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentStatusTypeCodeNavigation)
- .Include(ad => ad.Document)
- .ThenInclude(d => d.DocumentType)
- .Where(ad => ad.DocumentId == documentId)
- .AsNoTracking()
- .ToList();
- }
-
- ///
- /// Get a list of all the document relationships for a given activity template.
- ///
- ///
- public IList GetAllByActivityTemplate(long activityTemplateId)
- {
- return this.Context.PimsActivityTemplateDocuments
- .Include(at => at.Document)
- .ThenInclude(d => d.DocumentStatusTypeCodeNavigation)
- .Include(at => at.Document)
- .ThenInclude(d => d.DocumentType)
- .Where(at => at.ActivityTemplateId == activityTemplateId)
- .AsNoTracking()
- .ToList();
- }
-
- ///
- /// Adds the passed document activity template to the database.
- ///
- ///
- ///
- public PimsActivityTemplateDocument Add(PimsActivityTemplateDocument activityTemplateDocument)
- {
- activityTemplateDocument.ThrowIfNull(nameof(activityTemplateDocument));
-
- var newEntry = this.Context.PimsActivityTemplateDocuments.Add(activityTemplateDocument);
- if (newEntry.State == EntityState.Added)
- {
- return newEntry.Entity;
- }
- else
- {
- throw new InvalidOperationException("Could not create activity template document");
- }
- }
-
- ///
- /// Deletes the passed document activity template to the database.
- ///
- ///
- ///
- public bool Delete(PimsActivityTemplateDocument activityTemplateDocument)
- {
- if (activityTemplateDocument == null)
- {
- throw new ArgumentNullException(nameof(activityTemplateDocument), "activityTemplateDocument cannot be null.");
- }
-
- this.Context.PimsActivityTemplateDocuments.Remove(new PimsActivityTemplateDocument()
- {
- ActivityTemplateId = activityTemplateDocument.ActivityTemplateId,
- });
- return true;
- }
-
- #endregion
- }
-}
diff --git a/source/backend/dal/Repositories/DocumentRepository.cs b/source/backend/dal/Repositories/DocumentRepository.cs
index 300c2925a8..fb78a95ce4 100644
--- a/source/backend/dal/Repositories/DocumentRepository.cs
+++ b/source/backend/dal/Repositories/DocumentRepository.cs
@@ -35,18 +35,6 @@ public DocumentRepository(
#region Methods
- public int GetTotalRelationCount(long documentId)
- {
- var document = this.Context.PimsDocuments.AsNoTracking()
- .Include(d => d.PimsActivityInstanceDocuments)
- .Where(d => d.DocumentId == documentId)
- .AsNoTracking()
- .FirstOrDefault();
-
- // Add all document relationships
- return document.PimsActivityInstanceDocuments.Count;
- }
-
///
/// Get the document from the database based on document id.
///
@@ -102,8 +90,6 @@ public bool Delete(PimsDocument document)
// Need to load required related entities otherwise the below foreach may fail.
var documentToDelete = this.Context.PimsDocuments.AsNoTracking()
- .Include(d => d.PimsActivityInstanceDocuments)
- .Include(d => d.PimsActivityTemplateDocuments)
.Include(d => d.PimsResearchFileDocuments)
.Include(d => d.PimsAcquisitionFileDocuments)
.Include(d => d.PimsProjectDocuments)
@@ -133,16 +119,6 @@ public bool Delete(PimsDocument document)
this.Context.PimsLeaseDocuments.Remove(new PimsLeaseDocument() { Internal_Id = pimsLeaseDocument.Internal_Id });
}
- foreach (var pimsActivityInstanceDocument in documentToDelete.PimsActivityInstanceDocuments)
- {
- this.Context.PimsActivityInstanceDocuments.Remove(new PimsActivityInstanceDocument() { Internal_Id = pimsActivityInstanceDocument.Internal_Id });
- }
-
- foreach (var pimsTemplateDocument in documentToDelete.PimsActivityTemplateDocuments)
- {
- this.Context.PimsActivityTemplateDocuments.Remove(new PimsActivityTemplateDocument() { Internal_Id = pimsTemplateDocument.Internal_Id });
- }
-
foreach (var pimsFormTypeDocument in documentToDelete.PimsFormTypes)
{
var updatedFormType = pimsFormTypeDocument;
@@ -168,8 +144,6 @@ public List GetAllByDocumentType(string documentType)
public int DocumentRelationshipCount(long documentId)
{
var documentRelationships = this.Context.PimsDocuments.AsNoTracking()
- .Include(d => d.PimsActivityInstanceDocuments)
- .Include(d => d.PimsActivityTemplateDocuments)
.Include(d => d.PimsResearchFileDocuments)
.Include(d => d.PimsAcquisitionFileDocuments)
.Include(d => d.PimsProjectDocuments)
@@ -182,8 +156,6 @@ public int DocumentRelationshipCount(long documentId)
return documentRelationships.PimsResearchFileDocuments.Count +
documentRelationships.PimsAcquisitionFileDocuments.Count +
documentRelationships.PimsProjectDocuments.Count +
- documentRelationships.PimsActivityInstanceDocuments.Count +
- documentRelationships.PimsActivityTemplateDocuments.Count +
documentRelationships.PimsFormTypes.Count +
documentRelationships.PimsLeaseDocuments.Count;
}
diff --git a/source/backend/dal/Repositories/EntityNoteRepository.cs b/source/backend/dal/Repositories/EntityNoteRepository.cs
index 4c5aae7d33..0b9a69d4a1 100644
--- a/source/backend/dal/Repositories/EntityNoteRepository.cs
+++ b/source/backend/dal/Repositories/EntityNoteRepository.cs
@@ -58,12 +58,6 @@ public IEnumerable GetAll(Func predicate)
return this.Context.Set().AsNoTracking().Where(predicate).ToArray();
}
- public IEnumerable GetAllActivityNotesById(long entityId)
- {
- return this.Context.PimsActivityInstanceNotes
- .Where(x => x.ActivityInstanceId == entityId).Select(x => x.Note).ToList();
- }
-
public IEnumerable GetAllAcquisitionNotesById(long acquisitionId)
{
return this.Context.PimsAcquisitionFileNotes
@@ -88,21 +82,6 @@ public IEnumerable GetAllResearchNotesById(long entityId)
.Where(x => x.ResearchFileId == entityId).Select(x => x.Note).ToList();
}
- public bool DeleteActivityNotes(long entityId)
- {
- var activityNotes = this.Context.PimsActivityInstanceNotes.Include(ai => ai.Note).Where(x => x.NoteId == entityId).ToList();
- if (activityNotes.Any())
- {
- foreach (var activityNote in activityNotes)
- {
- this.Context.PimsActivityInstanceNotes.Remove(activityNote);
- this.Context.PimsNotes.Remove(activityNote.Note);
- }
- return true;
- }
- return false;
- }
-
public bool DeleteAcquisitionFileNotes(long noteId)
{
var acquisitionFileNotes = this.Context.PimsAcquisitionFileNotes.
diff --git a/source/backend/dal/Repositories/Interfaces/ICompReqFinancialRepository.cs b/source/backend/dal/Repositories/Interfaces/ICompReqFinancialRepository.cs
index 3511994892..766d62837f 100644
--- a/source/backend/dal/Repositories/Interfaces/ICompReqFinancialRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/ICompReqFinancialRepository.cs
@@ -7,6 +7,7 @@ namespace Pims.Dal.Repositories
public interface ICompReqFinancialRepository : IRepository
{
IEnumerable GetAllByAcquisitionFileId(long acquisitionFileId, bool? finalOnly);
+
IEnumerable SearchCompensationRequisitionFinancials(AcquisitionReportFilterModel filter);
}
}
diff --git a/source/backend/dal/Repositories/Interfaces/IDocumentActivityRepository.cs b/source/backend/dal/Repositories/Interfaces/IDocumentActivityRepository.cs
deleted file mode 100644
index a84306e228..0000000000
--- a/source/backend/dal/Repositories/Interfaces/IDocumentActivityRepository.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Collections.Generic;
-using Pims.Dal.Entities;
-
-namespace Pims.Dal.Repositories
-{
- ///
- /// IDocumentActivityRepository interface, provides functions to interact with document activities within the datasource.
- ///
- public interface IDocumentActivityRepository : IRepository
- {
- IList GetAllByDocument(long documentId);
-
- IList GetAllByActivity(long activityId);
-
- IList GetAllByResearchFileActivities(long fileId);
-
- IList GetAllByAcquisitionFileActivities(long fileId);
-
- PimsActivityInstanceDocument Add(PimsActivityInstanceDocument activityDocument);
-
- bool Delete(PimsActivityInstanceDocument activityDocument);
- }
-}
diff --git a/source/backend/dal/Repositories/Interfaces/IDocumentActivityTemplateRepository.cs b/source/backend/dal/Repositories/Interfaces/IDocumentActivityTemplateRepository.cs
deleted file mode 100644
index 52091c45a7..0000000000
--- a/source/backend/dal/Repositories/Interfaces/IDocumentActivityTemplateRepository.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.Collections.Generic;
-using Pims.Dal.Entities;
-
-namespace Pims.Dal.Repositories
-{
- ///
- /// IDocumentActivityTemplateRepository interface, provides functions to interact with document activity templates within the datasource.
- ///
- public interface IDocumentActivityTemplateRepository : IRepository
- {
- IList GetAllByDocument(long documentId);
-
- IList GetAllByActivityTemplate(long activityTemplateId);
-
- PimsActivityTemplateDocument Add(PimsActivityTemplateDocument activityTemplateDocument);
-
- bool Delete(PimsActivityTemplateDocument activityTemplateDocument);
- }
-}
diff --git a/source/backend/dal/Repositories/Interfaces/IDocumentRepository.cs b/source/backend/dal/Repositories/Interfaces/IDocumentRepository.cs
index aad31c02cf..d4f2bb9340 100644
--- a/source/backend/dal/Repositories/Interfaces/IDocumentRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/IDocumentRepository.cs
@@ -8,8 +8,6 @@ namespace Pims.Dal.Repositories
///
public interface IDocumentRepository : IRepository
{
- int GetTotalRelationCount(long documentId);
-
PimsDocument Add(PimsDocument document);
PimsDocument TryGet(long documentId);
diff --git a/source/backend/dal/Repositories/Interfaces/IEntityNoteRepository.cs b/source/backend/dal/Repositories/Interfaces/IEntityNoteRepository.cs
index 7e3d9f0d6f..6d9018ac02 100644
--- a/source/backend/dal/Repositories/Interfaces/IEntityNoteRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/IEntityNoteRepository.cs
@@ -12,8 +12,6 @@ T Add(T entity)
IEnumerable GetAll(Func predicate)
where T : class;
- IEnumerable GetAllActivityNotesById(long entityId);
-
IEnumerable GetAllAcquisitionNotesById(long acquisitionId);
IEnumerable GetAllLeaseNotesById(long leaseId);
@@ -22,8 +20,6 @@ IEnumerable GetAll(Func predicate)
IEnumerable GetAllResearchNotesById(long entityId);
- bool DeleteActivityNotes(long entityId);
-
bool DeleteAcquisitionFileNotes(long noteId);
bool DeleteLeaseFileNotes(long noteId);
diff --git a/source/backend/dal/Repositories/Interfaces/ILeasePaymentRepository.cs b/source/backend/dal/Repositories/Interfaces/ILeasePaymentRepository.cs
index 78847e6d1a..b256983ab2 100644
--- a/source/backend/dal/Repositories/Interfaces/ILeasePaymentRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/ILeasePaymentRepository.cs
@@ -1,6 +1,6 @@
-using Pims.Dal.Entities;
using System;
using System.Collections.Generic;
+using Pims.Dal.Entities;
namespace Pims.Dal.Repositories
{
diff --git a/source/backend/dal/Repositories/Interfaces/ILeaseTenantRepository.cs b/source/backend/dal/Repositories/Interfaces/ILeaseTenantRepository.cs
index a3edb1ae6f..04950b62b0 100644
--- a/source/backend/dal/Repositories/Interfaces/ILeaseTenantRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/ILeaseTenantRepository.cs
@@ -12,6 +12,5 @@ public interface IPropertyImprovementRepository : IRepository GetByLeaseId(long leaseId);
IEnumerable Update(long leaseId, IEnumerable pimsPropertyImprovements);
-
}
}
diff --git a/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs b/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs
index a7ab65a5f7..b7ba741571 100644
--- a/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs
@@ -90,10 +90,6 @@ public interface ILookupRepository : IRepository
IEnumerable GetAllAcquisitionTypes();
- IEnumerable GetAllActivityTemplateTypes();
-
- IEnumerable GetAllActivityStatusTypes();
-
IEnumerable GetAllAcqFilePersonProfileTypes();
IEnumerable GetAllTenantTypes();
diff --git a/source/backend/dal/Repositories/Interfaces/IPropertyRepository.cs b/source/backend/dal/Repositories/Interfaces/IPropertyRepository.cs
index 52bce07c2a..ce3c6f2c37 100644
--- a/source/backend/dal/Repositories/Interfaces/IPropertyRepository.cs
+++ b/source/backend/dal/Repositories/Interfaces/IPropertyRepository.cs
@@ -11,6 +11,7 @@ namespace Pims.Dal.Repositories
public interface IPropertyRepository : IRepository
{
int Count();
+
Paged GetPage(PropertyFilter filter);
PimsProperty GetById(long id);
diff --git a/source/backend/dal/Repositories/LookupRepository.cs b/source/backend/dal/Repositories/LookupRepository.cs
index 5640c4dc1b..9f2400c5c3 100644
--- a/source/backend/dal/Repositories/LookupRepository.cs
+++ b/source/backend/dal/Repositories/LookupRepository.cs
@@ -279,16 +279,6 @@ public IEnumerable GetAllAcquisitionTypes()
return this.Context.PimsAcquisitionTypes.AsNoTracking().OrderBy(r => r.DisplayOrder).ToArray();
}
- public IEnumerable GetAllActivityTemplateTypes()
- {
- return this.Context.PimsActivityTemplateTypes.AsNoTracking().ToArray();
- }
-
- public IEnumerable GetAllActivityStatusTypes()
- {
- return this.Context.PimsActivityInstanceStatusTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToArray();
- }
-
public IEnumerable GetAllAcqFilePersonProfileTypes()
{
return this.Context.PimsAcqFlPersonProfileTypes.AsNoTracking().ToArray();
diff --git a/source/backend/dal/Repositories/ResearchFilePropertyRepository.cs b/source/backend/dal/Repositories/ResearchFilePropertyRepository.cs
index 2d27493acf..4b5c2c35cc 100644
--- a/source/backend/dal/Repositories/ResearchFilePropertyRepository.cs
+++ b/source/backend/dal/Repositories/ResearchFilePropertyRepository.cs
@@ -35,13 +35,12 @@ public List GetAllByResearchFileId(long researchFileId
return Context.PimsPropertyResearchFiles.AsNoTracking()
.Where(x => x.ResearchFileId == researchFileId)
.Include(rp => rp.PimsPrfPropResearchPurposeTypes)
- .Include(rp => rp.PimsActInstPropRsrchFiles)
.Include(rp => rp.Property)
- .ThenInclude(rp => rp.RegionCodeNavigation)
+ .ThenInclude(rp => rp.RegionCodeNavigation)
.Include(rp => rp.Property)
- .ThenInclude(rp => rp.DistrictCodeNavigation)
+ .ThenInclude(rp => rp.DistrictCodeNavigation)
.Include(rp => rp.Property)
- .ThenInclude(rp => rp.Address)
+ .ThenInclude(rp => rp.Address)
.ToList();
}
@@ -71,12 +70,10 @@ public void Delete(PimsPropertyResearchFile propertyResearchFile)
.Where(x => x.PropertyResearchFileId == propertyResearchFile.Internal_Id)
.Include(rp => rp.Property)
.Include(rp => rp.PimsPrfPropResearchPurposeTypes)
- .Include(rp => rp.PimsActInstPropRsrchFiles)
.FirstOrDefault() ?? throw new KeyNotFoundException();
// Delete any Property research purpose type associations
existingPropertyResearchFile.PimsPrfPropResearchPurposeTypes.ForEach(purposeType => Context.PimsPrfPropResearchPurposeTypes.Remove(new PimsPrfPropResearchPurposeType() { Internal_Id = purposeType.Internal_Id }));
- existingPropertyResearchFile.PimsActInstPropRsrchFiles.ForEach(s => Context.PimsActInstPropRsrchFiles.Remove(new PimsActInstPropRsrchFile() { Internal_Id = s.Internal_Id }));
Context.Remove(new PimsPropertyResearchFile() { Internal_Id = propertyResearchFile.Internal_Id });
}
diff --git a/source/backend/entities/Partials/ActInstPropAcqFile.cs b/source/backend/entities/Partials/ActInstPropAcqFile.cs
deleted file mode 100644
index 4b325f8e03..0000000000
--- a/source/backend/entities/Partials/ActInstPropAcqFile.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// ActInstPropAcqFile class, provides an entity for the datamodel to manage acquisition properties.
- ///
- public partial class PimsActInstPropAcqFile : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
- [NotMapped]
- public override long Internal_Id { get => this.ActInstPropAcqFileId; set => this.ActInstPropAcqFileId = value; }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActInstPropRsrchFile.cs b/source/backend/entities/Partials/ActInstPropRsrchFile.cs
deleted file mode 100644
index 70b8044cab..0000000000
--- a/source/backend/entities/Partials/ActInstPropRsrchFile.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// ActInstPropRsrchFile class, provides an entity for the datamodel to manage reseach properties.
- ///
- public partial class PimsActInstPropRsrchFile : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
- [NotMapped]
- public override long Internal_Id { get => this.ActInstPropRsrchFileId; set => this.ActInstPropRsrchFileId = value; }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityInstance.cs b/source/backend/entities/Partials/ActivityInstance.cs
deleted file mode 100644
index f687d76b75..0000000000
--- a/source/backend/entities/Partials/ActivityInstance.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// PimsActivityInstance class, provides an entity for the datamodel to manage activity instances.
- ///
- public partial class PimsActivityInstance : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
- [NotMapped]
- public override long Internal_Id { get => this.ActivityInstanceId; set => this.ActivityInstanceId = value; }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityInstanceDocument.cs b/source/backend/entities/Partials/ActivityInstanceDocument.cs
deleted file mode 100644
index cb99e98835..0000000000
--- a/source/backend/entities/Partials/ActivityInstanceDocument.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// PimsActivityInstanceDocument class, provides an entity for the datamodel to manage Activity document entities.
- ///
- public partial class PimsActivityInstanceDocument : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
- [NotMapped]
- public override long Internal_Id { get => this.ActivityInstanceDocumentId; set => this.ActivityInstanceDocumentId = value; }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityInstanceNote.cs b/source/backend/entities/Partials/ActivityInstanceNote.cs
deleted file mode 100644
index 02ed2d4213..0000000000
--- a/source/backend/entities/Partials/ActivityInstanceNote.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// PimsActivityInstanceNote class, provides an entity for the datamodel to manage activity notes.
- ///
- public partial class PimsActivityInstanceNote : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
- [NotMapped]
- public override long Internal_Id { get => this.PimsActivityInstanceNoteId; set => this.PimsActivityInstanceNoteId = value; }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityInstanceStatusType.cs b/source/backend/entities/Partials/ActivityInstanceStatusType.cs
deleted file mode 100644
index 3d51f16405..0000000000
--- a/source/backend/entities/Partials/ActivityInstanceStatusType.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// ActivityInstanceStatusType class, provides an entity for the datamodel to manage a list of lease types.
- ///
- public partial class PimsActivityInstanceStatusType : ITypeEntity
- {
- #region Properties
-
- ///
- /// get/set - Primary key to identify activity status type.
- ///
- [NotMapped]
- public string Id { get => ActivityInstanceStatusTypeCode; set => ActivityInstanceStatusTypeCode = value; }
- #endregion
-
- #region Constructors
-
- ///
- /// Create a new instance of a ActivityInstanceStatusType class.
- ///
- ///
- public PimsActivityInstanceStatusType(string id)
- : this()
- {
- }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityTemplate.cs b/source/backend/entities/Partials/ActivityTemplate.cs
deleted file mode 100644
index eb0da16a47..0000000000
--- a/source/backend/entities/Partials/ActivityTemplate.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// PimsActivityTemplate class, provides an entity for the datamodel to manage a list of activity template types.
- ///
- public partial class PimsActivityTemplate : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
-
- ///
- /// get/set - Primary key to identify volumetric type.
- ///
- [NotMapped]
- public override long Internal_Id { get => ActivityTemplateId; set => ActivityTemplateId = value; }
- #endregion
-
- #region Constructors
-
- ///
- /// Create a new instance of a PimsActivityTemplate class.
- ///
- ///
- public PimsActivityTemplate(long id, string activityTemplateTypeCode, PimsActivityTemplateType pimsActivityTemplateType)
- : this()
- {
- Internal_Id = id;
- this.ActivityTemplateTypeCode = activityTemplateTypeCode;
- this.ActivityTemplateTypeCodeNavigation = pimsActivityTemplateType;
- }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityTemplateDocument.cs b/source/backend/entities/Partials/ActivityTemplateDocument.cs
deleted file mode 100644
index e1019ce3e5..0000000000
--- a/source/backend/entities/Partials/ActivityTemplateDocument.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// PimsActivityTemplateDocument class, provides an entity for the datamodel to manage Activity template document entities.
- ///
- public partial class PimsActivityTemplateDocument : StandardIdentityBaseAppEntity, IBaseAppEntity
- {
- #region Properties
- [NotMapped]
- public override long Internal_Id { get => this.ActivityTemplateDocumentId; set => this.ActivityTemplateDocumentId = value; }
- #endregion
- }
-}
diff --git a/source/backend/entities/Partials/ActivityTemplateType.cs b/source/backend/entities/Partials/ActivityTemplateType.cs
deleted file mode 100644
index cea50515a2..0000000000
--- a/source/backend/entities/Partials/ActivityTemplateType.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Pims.Dal.Entities
-{
- ///
- /// PimsActivityTemplateType class, provides an entity for the datamodel to manage a list of activity template types.
- ///
- public partial class PimsActivityTemplateType : ITypeEntity
- {
- #region Properties
-
- ///
- /// get/set - Primary key to activity template type.
- ///
- [NotMapped]
- public string Id { get => ActivityTemplateTypeCode; set => ActivityTemplateTypeCode = value; }
- #endregion
-
- #region Constructors
-
- ///
- /// Create a new instance of a PimsVolumetricType class.
- ///
- ///
- public PimsActivityTemplateType(string id)
- : this()
- {
- Id = id;
- }
- #endregion
- }
-}
diff --git a/source/backend/entities/PimsBaseContext.cs b/source/backend/entities/PimsBaseContext.cs
index 6e1b995967..1496b61f34 100644
--- a/source/backend/entities/PimsBaseContext.cs
+++ b/source/backend/entities/PimsBaseContext.cs
@@ -28,8 +28,6 @@ public PimsBaseContext(DbContextOptions options)
public virtual DbSet PimsAcqChklstSectionTypes { get; set; }
public virtual DbSet PimsAcqFlPersonProfileTypes { get; set; }
public virtual DbSet PimsAcqPhysFileStatusTypes { get; set; }
- public virtual DbSet PimsAcquisitionActivityInstances { get; set; }
- public virtual DbSet PimsAcquisitionActivityInstanceHists { get; set; }
public virtual DbSet PimsAcquisitionChecklistItems { get; set; }
public virtual DbSet PimsAcquisitionChecklistItemHists { get; set; }
public virtual DbSet PimsAcquisitionFiles { get; set; }
@@ -47,22 +45,6 @@ public PimsBaseContext(DbContextOptions options)
public virtual DbSet PimsAcquisitionOwners { get; set; }
public virtual DbSet PimsAcquisitionOwnerHists { get; set; }
public virtual DbSet PimsAcquisitionTypes { get; set; }
- public virtual DbSet PimsActInstPropAcqFiles { get; set; }
- public virtual DbSet PimsActInstPropAcqFileHists { get; set; }
- public virtual DbSet PimsActInstPropRsrchFiles { get; set; }
- public virtual DbSet PimsActInstPropRsrchFileHists { get; set; }
- public virtual DbSet PimsActivityInstances { get; set; }
- public virtual DbSet PimsActivityInstanceDocuments { get; set; }
- public virtual DbSet PimsActivityInstanceDocumentHists { get; set; }
- public virtual DbSet PimsActivityInstanceHists { get; set; }
- public virtual DbSet PimsActivityInstanceNotes { get; set; }
- public virtual DbSet PimsActivityInstanceNoteHists { get; set; }
- public virtual DbSet PimsActivityInstanceStatusTypes { get; set; }
- public virtual DbSet PimsActivityTemplates { get; set; }
- public virtual DbSet PimsActivityTemplateDocuments { get; set; }
- public virtual DbSet PimsActivityTemplateDocumentHists { get; set; }
- public virtual DbSet PimsActivityTemplateHists { get; set; }
- public virtual DbSet PimsActivityTemplateTypes { get; set; }
public virtual DbSet PimsAddresses { get; set; }
public virtual DbSet PimsAddressHists { get; set; }
public virtual DbSet PimsAddressUsageTypes { get; set; }
@@ -121,8 +103,6 @@ public PimsBaseContext(DbContextOptions options)
public virtual DbSet PimsLandActTypes { get; set; }
public virtual DbSet PimsLandSurveyorTypes { get; set; }
public virtual DbSet PimsLeases { get; set; }
- public virtual DbSet PimsLeaseActivityInstances { get; set; }
- public virtual DbSet PimsLeaseActivityInstanceHists { get; set; }
public virtual DbSet PimsLeaseCategoryTypes { get; set; }
public virtual DbSet PimsLeaseConsultations { get; set; }
public virtual DbSet PimsLeaseConsultationHists { get; set; }
@@ -182,15 +162,21 @@ public PimsBaseContext(DbContextOptions options)
public virtual DbSet PimsProjectStatusTypes { get; set; }
public virtual DbSet PimsPropInthldrInterestTypes { get; set; }
public virtual DbSet PimsPropPropAnomalyTypes { get; set; }
+ public virtual DbSet PimsPropPropClassificationHists { get; set; }
+ public virtual DbSet PimsPropPropPurposes { get; set; }
+ public virtual DbSet PimsPropPropPurposeHists { get; set; }
public virtual DbSet PimsPropPropRoadTypes { get; set; }
public virtual DbSet PimsPropPropTenureTypes { get; set; }
public virtual DbSet PimsPropResearchPurposeTypes { get; set; }
public virtual DbSet PimsProperties { get; set; }
public virtual DbSet PimsPropertyAcquisitionFiles { get; set; }
public virtual DbSet PimsPropertyAcquisitionFileHists { get; set; }
+ public virtual DbSet PimsPropertyActivityHists { get; set; }
public virtual DbSet PimsPropertyAnomalyTypes { get; set; }
public virtual DbSet PimsPropertyBoundaryVws { get; set; }
public virtual DbSet PimsPropertyClassificationTypes { get; set; }
+ public virtual DbSet PimsPropertyContacts { get; set; }
+ public virtual DbSet PimsPropertyContactHists { get; set; }
public virtual DbSet PimsPropertyEvaluations { get; set; }
public virtual DbSet PimsPropertyEvaluationHists { get; set; }
public virtual DbSet PimsPropertyHists { get; set; }
@@ -204,6 +190,7 @@ public PimsBaseContext(DbContextOptions options)
public virtual DbSet PimsPropertyOrganizationHists { get; set; }
public virtual DbSet PimsPropertyPropertyServiceFiles { get; set; }
public virtual DbSet PimsPropertyPropertyServiceFileHists { get; set; }
+ public virtual DbSet PimsPropertyPurposeTypes { get; set; }
public virtual DbSet PimsPropertyResearchFiles { get; set; }
public virtual DbSet PimsPropertyResearchFileHists { get; set; }
public virtual DbSet PimsPropertyRoadTypes { get; set; }
@@ -221,8 +208,6 @@ public PimsBaseContext(DbContextOptions options)
public virtual DbSet PimsRegionUsers { get; set; }
public virtual DbSet PimsRegionUserHists { get; set; }
public virtual DbSet PimsRequestSourceTypes { get; set; }
- public virtual DbSet PimsResearchActivityInstances { get; set; }
- public virtual DbSet PimsResearchActivityInstanceHists { get; set; }
public virtual DbSet PimsResearchFiles { get; set; }
public virtual DbSet PimsResearchFileDocuments { get; set; }
public virtual DbSet PimsResearchFileDocumentHists { get; set; }
@@ -565,60 +550,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasComment("Indicates if the code value is inactive.");
});
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.AcquisitionActivityInstanceId)
- .HasName("ACQAIN_PK");
-
- entity.Property(e => e.AcquisitionActivityInstanceId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACQUISITION_ACTIVITY_INSTANCE_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship is active.");
-
- entity.HasOne(d => d.AcquisitionFile)
- .WithMany(p => p.PimsAcquisitionActivityInstances)
- .HasForeignKey(d => d.AcquisitionFileId)
- .HasConstraintName("PIM_ACQNFL_PIM_ACQAIN_FK");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsAcquisitionActivityInstances)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_ACQAIN_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.AcquisitionActivityInstanceHistId)
- .HasName("PIMS_ACQAIN_H_PK");
-
- entity.Property(e => e.AcquisitionActivityInstanceHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACQUISITION_ACTIVITY_INSTANCE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.AcquisitionChecklistItemId)
@@ -1189,465 +1120,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasComment("Indicates if the code value is inactive.");
});
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActInstPropAcqFileId)
- .HasName("AIPAFL_PK");
-
- entity.HasComment("File to associate an activity instance with a subset of properties associated with the superset of acquisition file properties.");
-
- entity.Property(e => e.ActInstPropAcqFileId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACT_INST_PROP_ACQ_FILE_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship has been disabled.");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsActInstPropAcqFiles)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_AIPAFL_FK");
-
- entity.HasOne(d => d.PropertyAcquisitionFile)
- .WithMany(p => p.PimsActInstPropAcqFiles)
- .HasForeignKey(d => d.PropertyAcquisitionFileId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_PRACQF_PIM_AIPAFL_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActInstPropAcqFileHistId)
- .HasName("PIMS_AIPAFL_H_PK");
-
- entity.Property(e => e.ActInstPropAcqFileHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACT_INST_PROP_ACQ_FILE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActInstPropRsrchFileId)
- .HasName("AIPRFL_PK");
-
- entity.HasComment("File to associate an activity instance with a subset of properties associated with the superset of research file properties.");
-
- entity.Property(e => e.ActInstPropRsrchFileId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACT_INST_PROP_RSRCH_FILE_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship has been disabled.");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsActInstPropRsrchFiles)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_AIPRFL_FK");
-
- entity.HasOne(d => d.PropertyResearchFile)
- .WithMany(p => p.PimsActInstPropRsrchFiles)
- .HasForeignKey(d => d.PropertyResearchFileId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_PRSCRC_PIM_AIPRFL_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActInstPropRsrchFileHistId)
- .HasName("PIMS_AIPRFL_H_PK");
-
- entity.Property(e => e.ActInstPropRsrchFileHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACT_INST_PROP_RSRCH_FILE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityInstanceId)
- .HasName("ACTINS_PK");
-
- entity.HasComment("Table to contain all applicable activity instances for the PIMS PSP system.");
-
- entity.Property(e => e.ActivityInstanceId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_INSTANCE_ID_SEQ])");
-
- entity.Property(e => e.ActivityDataJson)
- .HasDefaultValueSql("('')")
- .HasComment("JSON structure containing data specific to an activity instance.");
-
- entity.Property(e => e.ActivityInstanceStatusTypeCode).HasDefaultValueSql("('NOSTART')");
-
- entity.Property(e => e.ActivityTemplateId).HasDefaultValueSql("((-1))");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.Description).HasComment("Description of the activity instance.");
-
- entity.HasOne(d => d.ActivityInstanceStatusTypeCodeNavigation)
- .WithMany(p => p.PimsActivityInstances)
- .HasForeignKey(d => d.ActivityInstanceStatusTypeCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_ACTIST_PIM_ACTINS_FK");
-
- entity.HasOne(d => d.ActivityTemplate)
- .WithMany(p => p.PimsActivityInstances)
- .HasForeignKey(d => d.ActivityTemplateId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_ACTTMP_PIM_ACTINS_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityInstanceDocumentId)
- .HasName("ACTDOC_PK");
-
- entity.HasComment("Relates a document object to an activity instance.");
-
- entity.Property(e => e.ActivityInstanceDocumentId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_INSTANCE_DOCUMENT_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship has been disabled.");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsActivityInstanceDocuments)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_ACTDOC_FK");
-
- entity.HasOne(d => d.Document)
- .WithMany(p => p.PimsActivityInstanceDocuments)
- .HasForeignKey(d => d.DocumentId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_DOCMNT_PIM_ACTDOC_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityInstanceDocumentHistId)
- .HasName("PIMS_ACTDOC_H_PK");
-
- entity.Property(e => e.ActivityInstanceDocumentHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_INSTANCE_DOCUMENT_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityInstanceHistId)
- .HasName("PIMS_ACTINS_H_PK");
-
- entity.Property(e => e.ActivityInstanceHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_INSTANCE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasComment("Relates a note object to an activity instance.");
-
- entity.Property(e => e.PimsActivityInstanceNoteId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_INSTANCE_NOTE_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship has been disabled.");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsActivityInstanceNotes)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_ACTINN_FK");
-
- entity.HasOne(d => d.Note)
- .WithMany(p => p.PimsActivityInstanceNotes)
- .HasForeignKey(d => d.NoteId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_NOTE_PIM_ACTINN_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityInstanceNoteHistId)
- .HasName("PIMS_ACTINN_H_PK");
-
- entity.Property(e => e.ActivityInstanceNoteHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_INSTANCE_NOTE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityInstanceStatusTypeCode)
- .HasName("ACTIST_PK");
-
- entity.HasComment("Codified values for the activity instance status type.");
-
- entity.Property(e => e.ActivityInstanceStatusTypeCode).HasComment("Code value for the activity instance status type.");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.Description).HasComment("Description of the activity instance status type.");
-
- entity.Property(e => e.DisplayOrder).HasComment("Designates a preferred presentation order of the code descriptions.");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the code value is inactive.");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityTemplateId)
- .HasName("ACTTMP_PK");
-
- entity.Property(e => e.ActivityTemplateId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_TEMPLATE_ID_SEQ])");
-
- entity.Property(e => e.ActivityTemplateJson)
- .HasDefaultValueSql("('')")
- .HasComment("JSON structure desribing how to construct the activity UI.");
-
- entity.Property(e => e.ActivityTemplateTypeCode).HasDefaultValueSql("('GENERAL')");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the code value is inactive.");
-
- entity.HasOne(d => d.ActivityTemplateTypeCodeNavigation)
- .WithMany(p => p.PimsActivityTemplates)
- .HasForeignKey(d => d.ActivityTemplateTypeCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_ACTTTY_PIM_ACTTMP_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityTemplateDocumentId)
- .HasName("ACTMDO_PK");
-
- entity.HasComment("Associative relationship between an activity template and a document. Useful in determining with templates reference a document and conversely, which documents reference an activity template.");
-
- entity.Property(e => e.ActivityTemplateDocumentId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_TEMPLATE_DOCUMENT_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship has been disabled.");
-
- entity.HasOne(d => d.ActivityTemplate)
- .WithMany(p => p.PimsActivityTemplateDocuments)
- .HasForeignKey(d => d.ActivityTemplateId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_ACTTMP_PIM_ACTMDO_FK");
-
- entity.HasOne(d => d.Document)
- .WithMany(p => p.PimsActivityTemplateDocuments)
- .HasForeignKey(d => d.DocumentId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_DOCMNT_PIM_ACTMDO_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityTemplateDocumentHistId)
- .HasName("PIMS_ACTMDO_H_PK");
-
- entity.Property(e => e.ActivityTemplateDocumentHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_TEMPLATE_DOCUMENT_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityTemplateHistId)
- .HasName("PIMS_ACTTMP_H_PK");
-
- entity.Property(e => e.ActivityTemplateHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_ACTIVITY_TEMPLATE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActivityTemplateTypeCode)
- .HasName("ACTTTY_PK");
-
- entity.HasComment("Codified values for the activity type.");
-
- entity.Property(e => e.ActivityTemplateTypeCode).HasComment("Code value for the activity type.");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.Description).HasComment("Description of the activity type.");
-
- entity.Property(e => e.DisplayOrder).HasComment("Designates a preferred presentation order of the code descriptions.");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the code value is inactive.");
- });
-
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.AddressId)
@@ -2083,6 +1555,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.CompensationRequisitionId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_COMPENSATION_REQUISITION_ID_SEQ])");
+ entity.Property(e => e.AdvPmtServedDt).HasComment("Date that the advanced payment was made.");
+
entity.Property(e => e.AgreementDt).HasComment("Agreement date.");
entity.Property(e => e.AlternateProjectId).HasComment("Link a file to an \"Alternate Project\", so the user can make alternate payments that may be due after the original file's project closes.");
@@ -3151,7 +2625,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
- entity.Property(e => e.InterestHolderTypeCode).HasDefaultValueSql("(N'INTHLDR')");
+ entity.Property(e => e.InterestHolderTypeCode).HasDefaultValueSql("('INTHLDR')");
entity.Property(e => e.IsDisabled)
.HasDefaultValueSql("(CONVERT([bit],(0)))")
@@ -3493,79 +2967,26 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("PIM_LPRPTY_PIM_LEASE_FK");
- entity.HasOne(d => d.LeaseResponsibilityTypeCodeNavigation)
- .WithMany(p => p.PimsLeases)
- .HasForeignKey(d => d.LeaseResponsibilityTypeCode)
- .HasConstraintName("PIM_LRESPT_PIM_LEASE_FK");
-
- entity.HasOne(d => d.LeaseStatusTypeCodeNavigation)
- .WithMany(p => p.PimsLeases)
- .HasForeignKey(d => d.LeaseStatusTypeCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_LSSTYP_PIM_LEASE_FK");
-
- entity.HasOne(d => d.Project)
- .WithMany(p => p.PimsLeases)
- .HasForeignKey(d => d.ProjectId)
- .HasConstraintName("PIM_PROJCT_PIM_LEASE_FK");
-
- entity.HasOne(d => d.RegionCodeNavigation)
- .WithMany(p => p.PimsLeases)
- .HasForeignKey(d => d.RegionCode)
- .HasConstraintName("PIM_REGION_PIM_LEASE_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.LeaseActivityInstanceId)
- .HasName("LSACIN_PK");
-
- entity.HasComment("Associative entity between leases/licenses and activity instances.");
-
- entity.Property(e => e.LeaseActivityInstanceId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_LEASE_ACTIVITY_INSTANCE_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsLeaseActivityInstances)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_LSACIN_FK");
+ entity.HasOne(d => d.LeaseResponsibilityTypeCodeNavigation)
+ .WithMany(p => p.PimsLeases)
+ .HasForeignKey(d => d.LeaseResponsibilityTypeCode)
+ .HasConstraintName("PIM_LRESPT_PIM_LEASE_FK");
- entity.HasOne(d => d.Lease)
- .WithMany(p => p.PimsLeaseActivityInstances)
- .HasForeignKey(d => d.LeaseId)
+ entity.HasOne(d => d.LeaseStatusTypeCodeNavigation)
+ .WithMany(p => p.PimsLeases)
+ .HasForeignKey(d => d.LeaseStatusTypeCode)
.OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_LEASE_PIM_LSACIN_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.LeaseActivityInstanceHistId)
- .HasName("PIMS_LSACIN_H_PK");
+ .HasConstraintName("PIM_LSSTYP_PIM_LEASE_FK");
- entity.Property(e => e.LeaseActivityInstanceHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_LEASE_ACTIVITY_INSTANCE_H_ID_SEQ])");
+ entity.HasOne(d => d.Project)
+ .WithMany(p => p.PimsLeases)
+ .HasForeignKey(d => d.ProjectId)
+ .HasConstraintName("PIM_PROJCT_PIM_LEASE_FK");
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
+ entity.HasOne(d => d.RegionCodeNavigation)
+ .WithMany(p => p.PimsLeases)
+ .HasForeignKey(d => d.RegionCode)
+ .HasConstraintName("PIM_REGION_PIM_LEASE_FK");
});
modelBuilder.Entity(entity =>
@@ -5223,6 +4644,77 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasConstraintName("PIM_PRPRTY_PIM_PRPRAT_FK");
});
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropPropClassificationHistId)
+ .HasName("PIMS_PRPRCL_H_PK");
+
+ entity.Property(e => e.PropPropClassificationHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROP_PROP_CLASSIFICATION_H_ID_SEQ])");
+
+ entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropPropPurposeId)
+ .HasName("PRPRPU_PK");
+
+ entity.HasComment("Defines the contacts that are associated with this property.");
+
+ entity.Property(e => e.PropPropPurposeId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROP_PROP_PURPOSE_ID_SEQ])");
+
+ entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
+
+ entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.IsDisabled)
+ .HasDefaultValueSql("(CONVERT([bit],(0)))")
+ .HasComment("Indicates if the code is disabled.");
+
+ entity.Property(e => e.PropertyId).HasComment("Primary key of the associated property.");
+
+ entity.Property(e => e.PropertyPurposeTypeCode).HasComment("Primary key of the associated property purpose.");
+
+ entity.HasOne(d => d.Property)
+ .WithMany(p => p.PimsPropPropPurposes)
+ .HasForeignKey(d => d.PropertyId)
+ .OnDelete(DeleteBehavior.ClientSetNull)
+ .HasConstraintName("PIM_PRPRTY_PIM_PRPRPU_FK");
+
+ entity.HasOne(d => d.PropertyPurposeTypeCodeNavigation)
+ .WithMany(p => p.PimsPropPropPurposes)
+ .HasForeignKey(d => d.PropertyPurposeTypeCode)
+ .HasConstraintName("PIM_PRPPUR_PIM_PRPRPU_FK");
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropPropPurposeHistId)
+ .HasName("PIMS_PRPRPU_H_PK");
+
+ entity.Property(e => e.PropPropPurposeHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROP_PROP_PURPOSE_H_ID_SEQ])");
+
+ entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
+ });
+
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.PropPropRoadTypeId)
@@ -5350,6 +4842,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.PropertyId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_ID_SEQ])");
+ entity.Property(e => e.AdditionalDetails).HasComment("Additional details about the property.");
+
entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
@@ -5394,6 +4888,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasDefaultValueSql("(CONVERT([bit],(0)))")
.HasComment("Is this a sensitive property?");
+ entity.Property(e => e.IsTaxesPayable).HasComment("Indicates if the property taxes are being paid.");
+
+ entity.Property(e => e.IsUtilitiesPayable).HasComment("Indicates if the utilities are being paid.");
+
entity.Property(e => e.IsVisibleToOtherAgencies)
.HasDefaultValueSql("(CONVERT([bit],(0)))")
.HasComment("Is the property visible to other agencies?");
@@ -5424,6 +4922,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.PphStatusUpdateUserid).HasComment("Userid that updated the Provincial Public Highway status.");
+ entity.Property(e => e.PropertyClassificationTypeCode).HasDefaultValueSql("('UNKNOWN')");
+
entity.Property(e => e.PropertyDataSourceEffectiveDate).HasComment("Date the property was officially registered");
entity.Property(e => e.SurplusDeclarationComment).HasComment("Comment regarding the surplus declaration");
@@ -5577,6 +5077,16 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
});
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropertyActivityHistId)
+ .HasName("PIMS_PRPACT_H_PK");
+
+ entity.Property(e => e.PropertyActivityHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_ACTIVITY_H_ID_SEQ])");
+
+ entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
+ });
+
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.PropertyAnomalyTypeCode)
@@ -5630,6 +5140,83 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.IsDisabled).HasDefaultValueSql("(CONVERT([bit],(0)))");
});
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropertyContactId)
+ .HasName("PRPCNT_PK");
+
+ entity.HasComment("Defines the contacts that are associated with this property.");
+
+ entity.Property(e => e.PropertyContactId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_CONTACT_ID_SEQ])");
+
+ entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
+
+ entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.IsDisabled)
+ .HasDefaultValueSql("(CONVERT([bit],(0)))")
+ .HasComment("Indicates if the code is disabled.");
+
+ entity.Property(e => e.OrganizationId).HasComment("Organization ID of the property contact.");
+
+ entity.Property(e => e.PersonId).HasComment("Person ID of the property contact.");
+
+ entity.Property(e => e.PrimaryContactId).HasComment("Primary contact for the organization");
+
+ entity.Property(e => e.PropertyId).HasComment("Primary key of the associated property.");
+
+ entity.Property(e => e.Purpose).HasComment("Purpose of property contact");
+
+ entity.HasOne(d => d.Organization)
+ .WithMany(p => p.PimsPropertyContacts)
+ .HasForeignKey(d => d.OrganizationId)
+ .HasConstraintName("PIM_ORG_PIM_PRPCNT_FK");
+
+ entity.HasOne(d => d.Person)
+ .WithMany(p => p.PimsPropertyContactPeople)
+ .HasForeignKey(d => d.PersonId)
+ .HasConstraintName("PIM_PERSON_PIM_PRPCNT_FK");
+
+ entity.HasOne(d => d.PrimaryContact)
+ .WithMany(p => p.PimsPropertyContactPrimaryContacts)
+ .HasForeignKey(d => d.PrimaryContactId)
+ .HasConstraintName("PIM_PERSON_PIM_PRM_PRPCNT_FK");
+
+ entity.HasOne(d => d.Property)
+ .WithMany(p => p.PimsPropertyContacts)
+ .HasForeignKey(d => d.PropertyId)
+ .OnDelete(DeleteBehavior.ClientSetNull)
+ .HasConstraintName("PIM_PRPRTY_PIM_PRPCNT_FK");
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropertyContactHistId)
+ .HasName("PIMS_PRPCNT_H_PK");
+
+ entity.Property(e => e.PropertyContactHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_CONTACT_H_ID_SEQ])");
+
+ entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
+ });
+
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.PropertyEvaluationId)
@@ -5924,6 +5511,34 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
});
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.PropertyPurposeTypeCode)
+ .HasName("PRPPUR_PK");
+
+ entity.HasComment("Code table to describe the property purpose type.");
+
+ entity.Property(e => e.PropertyPurposeTypeCode).HasComment("Code representing the purpose of the property.");
+
+ entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
+
+ entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
+
+ entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
+
+ entity.Property(e => e.Description).HasComment("Description of the purpose of the property.");
+
+ entity.Property(e => e.DisplayOrder).HasComment("Force the display order of the codes.");
+
+ entity.Property(e => e.IsDisabled)
+ .HasDefaultValueSql("(CONVERT([bit],(0)))")
+ .HasComment("Indicates if the code is disabled.");
+ });
+
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.PropertyResearchFileId)
@@ -6364,63 +5979,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasComment("Indicates if the code is disabled.");
});
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ResearchActivityInstanceId)
- .HasName("RSCHAI_PK");
-
- entity.HasComment("Relates a research file to an activity instance.");
-
- entity.Property(e => e.ResearchActivityInstanceId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_RESEARCH_ACTIVITY_INSTANCE_ID_SEQ])");
-
- entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppCreateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.AppLastUpdateUserDirectory).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.AppLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValueSql("((1))");
-
- entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())");
-
- entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())");
-
- entity.Property(e => e.IsDisabled)
- .HasDefaultValueSql("(CONVERT([bit],(0)))")
- .HasComment("Indicates if the relationship has been disabled.");
-
- entity.HasOne(d => d.ActivityInstance)
- .WithMany(p => p.PimsResearchActivityInstances)
- .HasForeignKey(d => d.ActivityInstanceId)
- .HasConstraintName("PIM_ACTINS_PIM_RSCHAI_FK");
-
- entity.HasOne(d => d.ResearchFile)
- .WithMany(p => p.PimsResearchActivityInstances)
- .HasForeignKey(d => d.ResearchFileId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("PIM_RESRCH_PIM_RSCHAI_FK");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ResearchActivityInstanceHistId)
- .HasName("PIMS_RSCHAI_H_PK");
-
- entity.Property(e => e.ResearchActivityInstanceHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_RESEARCH_ACTIVITY_INSTANCE_H_ID_SEQ])");
-
- entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
- });
-
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.ResearchFileId)
@@ -7925,10 +7483,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACQUISITION_ACTIVITY_INSTANCE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACQUISITION_ACTIVITY_INSTANCE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
@@ -7995,42 +7549,22 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACT_INST_PROP_ACQ_FILE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACT_INST_PROP_ACQ_FILE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACT_INST_PROP_RSRCH_FILE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACT_INST_PROP_RSRCH_FILE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACTIVITY_INSTANCE_DOCUMENT_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACTIVITY_INSTANCE_DOCUMENT_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACTIVITY_INSTANCE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACTIVITY_INSTANCE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACTIVITY_INSTANCE_NOTE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACTIVITY_INSTANCE_NOTE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
@@ -8051,18 +7585,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACTIVITY_TEMPLATE_DOCUMENT_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACTIVITY_TEMPLATE_DOCUMENT_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_ACTIVITY_TEMPLATE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_ACTIVITY_TEMPLATE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
@@ -8263,10 +7789,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_LEASE_ACTIVITY_INSTANCE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_LEASE_ACTIVITY_INSTANCE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
@@ -8395,6 +7917,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
+ modelBuilder.HasSequence("PIMS_PIMS_PROPERTY_ACTIVITY_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
modelBuilder.HasSequence("PIMS_PRF_PROP_RESEARCH_PURPOSE_ID_SEQ")
.HasMin(1)
.HasMax(21474483647);
@@ -8479,6 +8005,22 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
+ modelBuilder.HasSequence("PIMS_PROP_PROP_CLASSIFICATION_H_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
+ modelBuilder.HasSequence("PIMS_PROP_PROP_CLASSIFICATION_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
+ modelBuilder.HasSequence("PIMS_PROP_PROP_PURPOSE_H_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
+ modelBuilder.HasSequence("PIMS_PROP_PROP_PURPOSE_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
modelBuilder.HasSequence("PIMS_PROP_PROP_ROAD_TYPE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
@@ -8495,10 +8037,22 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
+ modelBuilder.HasSequence("PIMS_PROPERTY_ACTIVITY_H_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
modelBuilder.HasSequence("PIMS_PROPERTY_ACTIVITY_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
+ modelBuilder.HasSequence("PIMS_PROPERTY_CONTACT_H_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
+ modelBuilder.HasSequence("PIMS_PROPERTY_CONTACT_ID_SEQ")
+ .HasMin(1)
+ .HasMax(2147483647);
+
modelBuilder.HasSequence("PIMS_PROPERTY_EVALUATION_H_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
@@ -8583,10 +8137,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMin(1)
.HasMax(2147483647);
- modelBuilder.HasSequence("PIMS_RESEARCH_ACTIVITY_INSTANCE_H_ID_SEQ")
- .HasMin(1)
- .HasMax(2147483647);
-
modelBuilder.HasSequence("PIMS_RESEARCH_ACTIVITY_INSTANCE_ID_SEQ")
.HasMin(1)
.HasMax(2147483647);
diff --git a/source/backend/entities/ef/PimsAcquisitionActivityInstance.cs b/source/backend/entities/ef/PimsAcquisitionActivityInstance.cs
deleted file mode 100644
index af9ba048b0..0000000000
--- a/source/backend/entities/ef/PimsAcquisitionActivityInstance.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Pims.Dal.Entities
-{
- [Table("PIMS_ACQUISITION_ACTIVITY_INSTANCE")]
- [Index(nameof(AcquisitionFileId), Name = "ACQAIN_ACQUISITION_FILE_ID_IDX")]
- [Index(nameof(ActivityInstanceId), nameof(AcquisitionFileId), Name = "ACQAIN_ACQ_ACTIVITY_TUC", IsUnique = true)]
- [Index(nameof(ActivityInstanceId), Name = "ACQAIN_ACTIVITY_INSTANCE_ID_IDX")]
- public partial class PimsAcquisitionActivityInstance
- {
- [Key]
- [Column("ACQUISITION_ACTIVITY_INSTANCE_ID")]
- public long AcquisitionActivityInstanceId { get; set; }
- [Column("ACQUISITION_FILE_ID")]
- public long AcquisitionFileId { get; set; }
- [Column("ACTIVITY_INSTANCE_ID")]
- public long ActivityInstanceId { get; set; }
- [Column("IS_DISABLED")]
- public bool? IsDisabled { get; set; }
- [Column("CONCURRENCY_CONTROL_NUMBER")]
- public long ConcurrencyControlNumber { get; set; }
- [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppCreateTimestamp { get; set; }
- [Required]
- [Column("APP_CREATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppCreateUserDirectory { get; set; }
- [Required]
- [Column("APP_CREATE_USERID")]
- [StringLength(30)]
- public string AppCreateUserid { get; set; }
- [Column("APP_CREATE_USER_GUID")]
- public Guid? AppCreateUserGuid { get; set; }
- [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppLastUpdateTimestamp { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string AppLastUpdateUserid { get; set; }
- [Column("APP_LAST_UPDATE_USER_GUID")]
- public Guid? AppLastUpdateUserGuid { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppLastUpdateUserDirectory { get; set; }
- [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbCreateTimestamp { get; set; }
- [Required]
- [Column("DB_CREATE_USERID")]
- [StringLength(30)]
- public string DbCreateUserid { get; set; }
- [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbLastUpdateTimestamp { get; set; }
- [Required]
- [Column("DB_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string DbLastUpdateUserid { get; set; }
-
- [ForeignKey(nameof(AcquisitionFileId))]
- [InverseProperty(nameof(PimsAcquisitionFile.PimsAcquisitionActivityInstances))]
- public virtual PimsAcquisitionFile AcquisitionFile { get; set; }
- [ForeignKey(nameof(ActivityInstanceId))]
- [InverseProperty(nameof(PimsActivityInstance.PimsAcquisitionActivityInstances))]
- public virtual PimsActivityInstance ActivityInstance { get; set; }
- }
-}
diff --git a/source/backend/entities/ef/PimsAcquisitionActivityInstanceHist.cs b/source/backend/entities/ef/PimsAcquisitionActivityInstanceHist.cs
deleted file mode 100644
index 723f39eea0..0000000000
--- a/source/backend/entities/ef/PimsAcquisitionActivityInstanceHist.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Pims.Dal.Entities
-{
- [Table("PIMS_ACQUISITION_ACTIVITY_INSTANCE_HIST")]
- [Index(nameof(AcquisitionActivityInstanceHistId), nameof(EndDateHist), Name = "PIMS_ACQAIN_H_UK", IsUnique = true)]
- public partial class PimsAcquisitionActivityInstanceHist
- {
- [Key]
- [Column("_ACQUISITION_ACTIVITY_INSTANCE_HIST_ID")]
- public long AcquisitionActivityInstanceHistId { get; set; }
- [Column("EFFECTIVE_DATE_HIST", TypeName = "datetime")]
- public DateTime EffectiveDateHist { get; set; }
- [Column("END_DATE_HIST", TypeName = "datetime")]
- public DateTime? EndDateHist { get; set; }
- [Column("ACQUISITION_ACTIVITY_INSTANCE_ID")]
- public long AcquisitionActivityInstanceId { get; set; }
- [Column("ACQUISITION_FILE_ID")]
- public long AcquisitionFileId { get; set; }
- [Column("ACTIVITY_INSTANCE_ID")]
- public long ActivityInstanceId { get; set; }
- [Column("IS_DISABLED")]
- public bool? IsDisabled { get; set; }
- [Column("CONCURRENCY_CONTROL_NUMBER")]
- public long ConcurrencyControlNumber { get; set; }
- [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppCreateTimestamp { get; set; }
- [Required]
- [Column("APP_CREATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppCreateUserDirectory { get; set; }
- [Required]
- [Column("APP_CREATE_USERID")]
- [StringLength(30)]
- public string AppCreateUserid { get; set; }
- [Column("APP_CREATE_USER_GUID")]
- public Guid? AppCreateUserGuid { get; set; }
- [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppLastUpdateTimestamp { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string AppLastUpdateUserid { get; set; }
- [Column("APP_LAST_UPDATE_USER_GUID")]
- public Guid? AppLastUpdateUserGuid { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppLastUpdateUserDirectory { get; set; }
- [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbCreateTimestamp { get; set; }
- [Required]
- [Column("DB_CREATE_USERID")]
- [StringLength(30)]
- public string DbCreateUserid { get; set; }
- [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbLastUpdateTimestamp { get; set; }
- [Required]
- [Column("DB_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string DbLastUpdateUserid { get; set; }
- }
-}
diff --git a/source/backend/entities/ef/PimsAcquisitionFile.cs b/source/backend/entities/ef/PimsAcquisitionFile.cs
index d5a6b0f18b..9fdfefcb89 100644
--- a/source/backend/entities/ef/PimsAcquisitionFile.cs
+++ b/source/backend/entities/ef/PimsAcquisitionFile.cs
@@ -22,7 +22,6 @@ public partial class PimsAcquisitionFile
{
public PimsAcquisitionFile()
{
- PimsAcquisitionActivityInstances = new HashSet();
PimsAcquisitionChecklistItems = new HashSet();
PimsAcquisitionFileDocuments = new HashSet();
PimsAcquisitionFileForms = new HashSet();
@@ -148,8 +147,6 @@ public PimsAcquisitionFile()
[ForeignKey(nameof(RegionCode))]
[InverseProperty(nameof(PimsRegion.PimsAcquisitionFiles))]
public virtual PimsRegion RegionCodeNavigation { get; set; }
- [InverseProperty(nameof(PimsAcquisitionActivityInstance.AcquisitionFile))]
- public virtual ICollection PimsAcquisitionActivityInstances { get; set; }
[InverseProperty(nameof(PimsAcquisitionChecklistItem.AcquisitionFile))]
public virtual ICollection PimsAcquisitionChecklistItems { get; set; }
[InverseProperty(nameof(PimsAcquisitionFileDocument.AcquisitionFile))]
diff --git a/source/backend/entities/ef/PimsActInstPropAcqFile.cs b/source/backend/entities/ef/PimsActInstPropAcqFile.cs
deleted file mode 100644
index e097496328..0000000000
--- a/source/backend/entities/ef/PimsActInstPropAcqFile.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Pims.Dal.Entities
-{
- [Table("PIMS_ACT_INST_PROP_ACQ_FILE")]
- [Index(nameof(ActivityInstanceId), Name = "AIPAFL_ACTIVITY_INSTANCE_ID_IDX")]
- [Index(nameof(PropertyAcquisitionFileId), nameof(ActivityInstanceId), Name = "AIPAFL_ACT_INST_PROP_ACQ_FL_TUC", IsUnique = true)]
- [Index(nameof(PropertyAcquisitionFileId), Name = "AIPAFL_PROPERTY_ACQUISITION_FILE_ID_IDX")]
- public partial class PimsActInstPropAcqFile
- {
- [Key]
- [Column("ACT_INST_PROP_ACQ_FILE_ID")]
- public long ActInstPropAcqFileId { get; set; }
- [Column("ACTIVITY_INSTANCE_ID")]
- public long ActivityInstanceId { get; set; }
- [Column("PROPERTY_ACQUISITION_FILE_ID")]
- public long PropertyAcquisitionFileId { get; set; }
- [Column("IS_DISABLED")]
- public bool? IsDisabled { get; set; }
- [Column("CONCURRENCY_CONTROL_NUMBER")]
- public long ConcurrencyControlNumber { get; set; }
- [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppCreateTimestamp { get; set; }
- [Required]
- [Column("APP_CREATE_USERID")]
- [StringLength(30)]
- public string AppCreateUserid { get; set; }
- [Column("APP_CREATE_USER_GUID")]
- public Guid? AppCreateUserGuid { get; set; }
- [Required]
- [Column("APP_CREATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppCreateUserDirectory { get; set; }
- [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppLastUpdateTimestamp { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string AppLastUpdateUserid { get; set; }
- [Column("APP_LAST_UPDATE_USER_GUID")]
- public Guid? AppLastUpdateUserGuid { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppLastUpdateUserDirectory { get; set; }
- [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbCreateTimestamp { get; set; }
- [Required]
- [Column("DB_CREATE_USERID")]
- [StringLength(30)]
- public string DbCreateUserid { get; set; }
- [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbLastUpdateTimestamp { get; set; }
- [Required]
- [Column("DB_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string DbLastUpdateUserid { get; set; }
-
- [ForeignKey(nameof(ActivityInstanceId))]
- [InverseProperty(nameof(PimsActivityInstance.PimsActInstPropAcqFiles))]
- public virtual PimsActivityInstance ActivityInstance { get; set; }
- [ForeignKey(nameof(PropertyAcquisitionFileId))]
- [InverseProperty(nameof(PimsPropertyAcquisitionFile.PimsActInstPropAcqFiles))]
- public virtual PimsPropertyAcquisitionFile PropertyAcquisitionFile { get; set; }
- }
-}
diff --git a/source/backend/entities/ef/PimsActInstPropRsrchFile.cs b/source/backend/entities/ef/PimsActInstPropRsrchFile.cs
deleted file mode 100644
index 7b7a688db2..0000000000
--- a/source/backend/entities/ef/PimsActInstPropRsrchFile.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Pims.Dal.Entities
-{
- [Table("PIMS_ACT_INST_PROP_RSRCH_FILE")]
- [Index(nameof(ActivityInstanceId), Name = "AIPRFL_ACTIVITY_INSTANCE_ID_IDX")]
- [Index(nameof(PropertyResearchFileId), nameof(ActivityInstanceId), Name = "AIPRFL_ACT_INST_PROP_RSRCH_FL_TUC", IsUnique = true)]
- [Index(nameof(PropertyResearchFileId), Name = "AIPRFL_PROPERTY_RESEARCH_FILE_ID_IDX")]
- public partial class PimsActInstPropRsrchFile
- {
- [Key]
- [Column("ACT_INST_PROP_RSRCH_FILE_ID")]
- public long ActInstPropRsrchFileId { get; set; }
- [Column("ACTIVITY_INSTANCE_ID")]
- public long ActivityInstanceId { get; set; }
- [Column("PROPERTY_RESEARCH_FILE_ID")]
- public long PropertyResearchFileId { get; set; }
- [Column("IS_DISABLED")]
- public bool? IsDisabled { get; set; }
- [Column("CONCURRENCY_CONTROL_NUMBER")]
- public long ConcurrencyControlNumber { get; set; }
- [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppCreateTimestamp { get; set; }
- [Required]
- [Column("APP_CREATE_USERID")]
- [StringLength(30)]
- public string AppCreateUserid { get; set; }
- [Column("APP_CREATE_USER_GUID")]
- public Guid? AppCreateUserGuid { get; set; }
- [Required]
- [Column("APP_CREATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppCreateUserDirectory { get; set; }
- [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppLastUpdateTimestamp { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string AppLastUpdateUserid { get; set; }
- [Column("APP_LAST_UPDATE_USER_GUID")]
- public Guid? AppLastUpdateUserGuid { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppLastUpdateUserDirectory { get; set; }
- [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbCreateTimestamp { get; set; }
- [Required]
- [Column("DB_CREATE_USERID")]
- [StringLength(30)]
- public string DbCreateUserid { get; set; }
- [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbLastUpdateTimestamp { get; set; }
- [Required]
- [Column("DB_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string DbLastUpdateUserid { get; set; }
-
- [ForeignKey(nameof(ActivityInstanceId))]
- [InverseProperty(nameof(PimsActivityInstance.PimsActInstPropRsrchFiles))]
- public virtual PimsActivityInstance ActivityInstance { get; set; }
- [ForeignKey(nameof(PropertyResearchFileId))]
- [InverseProperty(nameof(PimsPropertyResearchFile.PimsActInstPropRsrchFiles))]
- public virtual PimsPropertyResearchFile PropertyResearchFile { get; set; }
- }
-}
diff --git a/source/backend/entities/ef/PimsActInstPropRsrchFileHist.cs b/source/backend/entities/ef/PimsActInstPropRsrchFileHist.cs
deleted file mode 100644
index 0588e765e0..0000000000
--- a/source/backend/entities/ef/PimsActInstPropRsrchFileHist.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Pims.Dal.Entities
-{
- [Table("PIMS_ACT_INST_PROP_RSRCH_FILE_HIST")]
- [Index(nameof(ActInstPropRsrchFileHistId), nameof(EndDateHist), Name = "PIMS_AIPRFL_H_UK", IsUnique = true)]
- public partial class PimsActInstPropRsrchFileHist
- {
- [Key]
- [Column("_ACT_INST_PROP_RSRCH_FILE_HIST_ID")]
- public long ActInstPropRsrchFileHistId { get; set; }
- [Column("EFFECTIVE_DATE_HIST", TypeName = "datetime")]
- public DateTime EffectiveDateHist { get; set; }
- [Column("END_DATE_HIST", TypeName = "datetime")]
- public DateTime? EndDateHist { get; set; }
- [Column("ACT_INST_PROP_RSRCH_FILE_ID")]
- public long ActInstPropRsrchFileId { get; set; }
- [Column("ACTIVITY_INSTANCE_ID")]
- public long ActivityInstanceId { get; set; }
- [Column("PROPERTY_RESEARCH_FILE_ID")]
- public long PropertyResearchFileId { get; set; }
- [Column("IS_DISABLED")]
- public bool? IsDisabled { get; set; }
- [Column("CONCURRENCY_CONTROL_NUMBER")]
- public long ConcurrencyControlNumber { get; set; }
- [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppCreateTimestamp { get; set; }
- [Required]
- [Column("APP_CREATE_USERID")]
- [StringLength(30)]
- public string AppCreateUserid { get; set; }
- [Column("APP_CREATE_USER_GUID")]
- public Guid? AppCreateUserGuid { get; set; }
- [Required]
- [Column("APP_CREATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppCreateUserDirectory { get; set; }
- [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppLastUpdateTimestamp { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string AppLastUpdateUserid { get; set; }
- [Column("APP_LAST_UPDATE_USER_GUID")]
- public Guid? AppLastUpdateUserGuid { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppLastUpdateUserDirectory { get; set; }
- [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbCreateTimestamp { get; set; }
- [Required]
- [Column("DB_CREATE_USERID")]
- [StringLength(30)]
- public string DbCreateUserid { get; set; }
- [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbLastUpdateTimestamp { get; set; }
- [Required]
- [Column("DB_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string DbLastUpdateUserid { get; set; }
- }
-}
diff --git a/source/backend/entities/ef/PimsActivityInstance.cs b/source/backend/entities/ef/PimsActivityInstance.cs
deleted file mode 100644
index 2172ad1af2..0000000000
--- a/source/backend/entities/ef/PimsActivityInstance.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Pims.Dal.Entities
-{
- [Table("PIMS_ACTIVITY_INSTANCE")]
- [Index(nameof(ActivityInstanceStatusTypeCode), Name = "ACTINS_ACTIVITY_INSTANCE_STATUS_TYPE_CODE_IDX")]
- [Index(nameof(ActivityTemplateId), Name = "ACTINS_ACTIVITY_TEMPLATE_ID_IDX")]
- public partial class PimsActivityInstance
- {
- public PimsActivityInstance()
- {
- PimsAcquisitionActivityInstances = new HashSet();
- PimsActInstPropAcqFiles = new HashSet();
- PimsActInstPropRsrchFiles = new HashSet();
- PimsActivityInstanceDocuments = new HashSet();
- PimsActivityInstanceNotes = new HashSet();
- PimsLeaseActivityInstances = new HashSet();
- PimsResearchActivityInstances = new HashSet();
- }
-
- [Key]
- [Column("ACTIVITY_INSTANCE_ID")]
- public long ActivityInstanceId { get; set; }
- [Column("ACTIVITY_TEMPLATE_ID")]
- public long ActivityTemplateId { get; set; }
- [Required]
- [Column("ACTIVITY_INSTANCE_STATUS_TYPE_CODE")]
- [StringLength(20)]
- public string ActivityInstanceStatusTypeCode { get; set; }
- [Column("DESCRIPTION")]
- [StringLength(500)]
- public string Description { get; set; }
- [Required]
- [Column("ACTIVITY_DATA_JSON")]
- public string ActivityDataJson { get; set; }
- [Column("CONCURRENCY_CONTROL_NUMBER")]
- public long ConcurrencyControlNumber { get; set; }
- [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppCreateTimestamp { get; set; }
- [Required]
- [Column("APP_CREATE_USERID")]
- [StringLength(30)]
- public string AppCreateUserid { get; set; }
- [Column("APP_CREATE_USER_GUID")]
- public Guid? AppCreateUserGuid { get; set; }
- [Required]
- [Column("APP_CREATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppCreateUserDirectory { get; set; }
- [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime AppLastUpdateTimestamp { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string AppLastUpdateUserid { get; set; }
- [Column("APP_LAST_UPDATE_USER_GUID")]
- public Guid? AppLastUpdateUserGuid { get; set; }
- [Required]
- [Column("APP_LAST_UPDATE_USER_DIRECTORY")]
- [StringLength(30)]
- public string AppLastUpdateUserDirectory { get; set; }
- [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbCreateTimestamp { get; set; }
- [Required]
- [Column("DB_CREATE_USERID")]
- [StringLength(30)]
- public string DbCreateUserid { get; set; }
- [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")]
- public DateTime DbLastUpdateTimestamp { get; set; }
- [Required]
- [Column("DB_LAST_UPDATE_USERID")]
- [StringLength(30)]
- public string DbLastUpdateUserid { get; set; }
-
- [ForeignKey(nameof(ActivityInstanceStatusTypeCode))]
- [InverseProperty(nameof(PimsActivityInstanceStatusType.PimsActivityInstances))]
- public virtual PimsActivityInstanceStatusType ActivityInstanceStatusTypeCodeNavigation { get; set; }
- [ForeignKey(nameof(ActivityTemplateId))]
- [InverseProperty(nameof(PimsActivityTemplate.PimsActivityInstances))]
- public virtual PimsActivityTemplate ActivityTemplate { get; set; }
- [InverseProperty(nameof(PimsAcquisitionActivityInstance.ActivityInstance))]
- public virtual ICollection PimsAcquisitionActivityInstances { get; set; }
- [InverseProperty(nameof(PimsActInstPropAcqFile.ActivityInstance))]
- public virtual ICollection PimsActInstPropAcqFiles { get; set; }
- [InverseProperty(nameof(PimsActInstPropRsrchFile.ActivityInstance))]
- public virtual ICollection PimsActInstPropRsrchFiles { get; set; }
- [InverseProperty(nameof(PimsActivityInstanceDocument.ActivityInstance))]
- public virtual ICollection