diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0b6b018 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.AppImage filter=lfs diff=lfs merge=lfs -text +*.exe filter=lfs diff=lfs merge=lfs -text diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260104205822_InitialCreate.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260104205822_InitialCreate.Designer.cs deleted file mode 100644 index 0a34aa3..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260104205822_InitialCreate.Designer.cs +++ /dev/null @@ -1,4033 +0,0 @@ -// -using System; -using Aquiis.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260104205822_InitialCreate")] - partial class InitialCreate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.11"); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("CreditCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreditScore") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OverallResult") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("ResultNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OverallResult"); - - b.HasIndex("RentalApplicationId") - .IsUnique(); - - b.ToTable("ApplicationScreenings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Color") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("EndOn") - .HasColumnType("TEXT"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Location") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("StartOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("EventType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("SourceEntityId"); - - b.HasIndex("StartOn"); - - b.HasIndex("SourceEntityType", "SourceEntityId"); - - b.ToTable("CalendarEvents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AutoCreateEvents") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultColor") - .HasColumnType("TEXT"); - - b.Property("DefaultIcon") - .HasColumnType("TEXT"); - - b.Property("DisplayOrder") - .HasColumnType("INTEGER"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ShowOnCalendar") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationId", "EntityType") - .IsUnique(); - - b.ToTable("CalendarSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("ChecklistType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.HasIndex("ChecklistType"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("Status"); - - b.ToTable("Checklists"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsChecked") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhotoUrl") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.Property("Value") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.ToTable("ChecklistItems"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSystemTemplate") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("OrganizationId"); - - b.ToTable("ChecklistTemplates"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0001-000000000001"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Standard property showing checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Property Tour", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000002"), - Category = "MoveIn", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-in inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-In", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000003"), - Category = "MoveOut", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-out inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-Out", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000004"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Open house event checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Open House", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowsNotes") - .HasColumnType("INTEGER"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRequired") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.ToTable("ChecklistTemplateItems"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0002-000000000001"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Greeted prospect and verified appointment", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000002"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Reviewed property exterior and curb appeal", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000003"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Showed parking area/garage", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000004"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 4, - ItemText = "Toured living room/common areas", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000005"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 5, - ItemText = "Showed all bedrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000006"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 6, - ItemText = "Showed all bathrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000007"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 7, - ItemText = "Toured kitchen and demonstrated appliances", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000008"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 8, - ItemText = "Explained which appliances are included", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000009"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 9, - ItemText = "Explained HVAC system and thermostat controls", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000010"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 10, - ItemText = "Reviewed utility responsibilities (tenant vs landlord)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000011"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 11, - ItemText = "Showed water heater location", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000012"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 12, - ItemText = "Showed storage areas (closets, attic, basement)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000013"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 13, - ItemText = "Showed laundry facilities", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000014"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 14, - ItemText = "Showed outdoor space (yard, patio, balcony)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000015"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 15, - ItemText = "Discussed monthly rent amount", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000016"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 16, - ItemText = "Explained security deposit and move-in costs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000017"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 17, - ItemText = "Reviewed lease term length and start date", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000018"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 18, - ItemText = "Explained pet policy", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000019"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 19, - ItemText = "Explained application process and requirements", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000020"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 20, - ItemText = "Reviewed screening process (background, credit check)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000021"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 21, - ItemText = "Answered all prospect questions", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000022"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 22, - ItemText = "Prospect Interest Level", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = true, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000023"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 23, - ItemText = "Overall showing feedback and notes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000024"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Document property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000025"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect keys and access codes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000026"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Review lease terms with tenant", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000027"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Inspect property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000028"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect all keys and access devices", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000029"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Document damages and needed repairs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000030"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Set up signage and directional markers", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000031"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Prepare information packets", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000032"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Set up visitor sign-in sheet", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("DocumentType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("FileData") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FilePath") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FileSize") - .HasColumnType("INTEGER"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PaymentId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActionItemsRequired") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("BathroomSinkGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomSinkNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomToiletGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomToiletNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomTubShowerGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomTubShowerNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomVentilationGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomVentilationNotes") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CarbonMonoxideDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("CarbonMonoxideDetectorsNotes") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("ElectricalSystemGood") - .HasColumnType("INTEGER"); - - b.Property("ElectricalSystemNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorFoundationGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorFoundationNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorGuttersGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorGuttersNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorRoofGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorRoofNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorSidingGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorSidingNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("HvacSystemGood") - .HasColumnType("INTEGER"); - - b.Property("HvacSystemNotes") - .HasColumnType("TEXT"); - - b.Property("InspectedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InspectionType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InteriorCeilingsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorCeilingsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorFloorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorFloorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWallsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWallsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCabinetsGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCabinetsNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCountersGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCountersNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenSinkPlumbingGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenSinkPlumbingNotes") - .HasColumnType("TEXT"); - - b.Property("LandscapingGood") - .HasColumnType("INTEGER"); - - b.Property("LandscapingNotes") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OverallCondition") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PlumbingSystemGood") - .HasColumnType("INTEGER"); - - b.Property("PlumbingSystemNotes") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SmokeDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("SmokeDetectorsNotes") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.ToTable("Inspections"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AmountPaid") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("DueOn") - .HasColumnType("TEXT"); - - b.Property("InvoiceNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InvoicedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("LateFeeApplied") - .HasColumnType("INTEGER"); - - b.Property("LateFeeAppliedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("ReminderSent") - .HasColumnType("INTEGER"); - - b.Property("ReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceNumber") - .IsUnique(); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DeclinedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpectedMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseOfferId") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PreviousLeaseId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProposedRenewalRent") - .HasColumnType("decimal(18,2)"); - - b.Property("RenewalNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("RenewalNotificationSent") - .HasColumnType("INTEGER"); - - b.Property("RenewalNotificationSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalNumber") - .HasColumnType("INTEGER"); - - b.Property("RenewalOfferedOn") - .HasColumnType("TEXT"); - - b.Property("RenewalReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalResponseOn") - .HasColumnType("TEXT"); - - b.Property("RenewalStatus") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("SignedOn") - .HasColumnType("TEXT"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TerminationNoticedOn") - .HasColumnType("TEXT"); - - b.Property("TerminationReason") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConvertedLeaseId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("RespondedOn") - .HasColumnType("TEXT"); - - b.Property("ResponseNotes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasColumnType("decimal(18,2)"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("RentalApplicationId"); - - b.ToTable("LeaseOffers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AssignedTo") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("EstimatedCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RequestedBy") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequestedByEmail") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("RequestedByPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("RequestedOn") - .HasColumnType("TEXT"); - - b.Property("ResolutionNotes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("LeaseId"); - - b.HasIndex("Priority"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RequestedOn"); - - b.HasIndex("Status"); - - b.ToTable("MaintenanceRequests"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Note", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(5000) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UserFullName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Notes"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyDigestTime") - .HasColumnType("TEXT"); - - b.Property("EmailAddress") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmailApplicationStatusChange") - .HasColumnType("INTEGER"); - - b.Property("EmailInspectionScheduled") - .HasColumnType("INTEGER"); - - b.Property("EmailLeaseExpiring") - .HasColumnType("INTEGER"); - - b.Property("EmailMaintenanceUpdate") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentReceived") - .HasColumnType("INTEGER"); - - b.Property("EnableDailyDigest") - .HasColumnType("INTEGER"); - - b.Property("EnableEmailNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableInAppNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableSMSNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableWeeklyDigest") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("SMSLeaseExpiringUrgent") - .HasColumnType("INTEGER"); - - b.Property("SMSMaintenanceEmergency") - .HasColumnType("INTEGER"); - - b.Property("SMSPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("WeeklyDigestDay") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("NotificationPreferences"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DisplayName") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OwnerId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("DailyLimit") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentToday") - .HasColumnType("INTEGER"); - - b.Property("EnableSsl") - .HasColumnType("INTEGER"); - - b.Property("FromEmail") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FromName") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsEmailEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastEmailSentOn") - .HasColumnType("TEXT"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastErrorOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyLimit") - .HasColumnType("INTEGER"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PlanType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("SendGridApiKeyEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("SmtpPort") - .HasColumnType("INTEGER"); - - b.Property("SmtpServer") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("Username") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationEmailSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccountBalance") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("AccountType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CostPerSMS") - .HasPrecision(18, 4) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSMSEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastSMSSentOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("SMSSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("SMSSentToday") - .HasColumnType("INTEGER"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("TwilioAccountSidEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioAuthTokenEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioPhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSMSSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowTenantDividendChoice") - .HasColumnType("INTEGER"); - - b.Property("ApplicationExpirationDays") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("AutoCalculateSecurityDeposit") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("DefaultDividendPaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("DividendDistributionMonth") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAutoApply") - .HasColumnType("INTEGER"); - - b.Property("LateFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("LateFeeGracePeriodDays") - .HasColumnType("INTEGER"); - - b.Property("LateFeePercentage") - .HasPrecision(5, 4) - .HasColumnType("TEXT"); - - b.Property("MaxLateFeeAmount") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("PaymentReminderDaysBefore") - .HasColumnType("INTEGER"); - - b.Property("PaymentReminderEnabled") - .HasColumnType("INTEGER"); - - b.Property("RefundProcessingDays") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositInvestmentEnabled") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositMultiplier") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TourNoShowGracePeriodHours") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Bathrooms") - .HasMaxLength(3) - .HasColumnType("decimal(3,1)"); - - b.Property("Bedrooms") - .HasMaxLength(3) - .HasColumnType("INTEGER"); - - b.Property("City") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("IsAvailable") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastRoutineInspectionDate") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("NextRoutineInspectionDueDate") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RoutineInspectionIntervalMonths") - .HasColumnType("INTEGER"); - - b.Property("SquareFeet") - .HasMaxLength(7) - .HasColumnType("INTEGER"); - - b.Property("State") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("UnitNumber") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Address"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Properties"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("DesiredMoveInDate") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FirstContactedOn") - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationState") - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("InterestedPropertyId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Source") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("InterestedPropertyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.ToTable("ProspectiveTenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ApplicationFeePaid") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeePaidOn") - .HasColumnType("TEXT"); - - b.Property("ApplicationFeePaymentMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CurrentAddress") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("CurrentCity") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CurrentRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrentState") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("CurrentZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("DecidedOn") - .HasColumnType("TEXT"); - - b.Property("DecisionBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DenialReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("EmployerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmploymentLengthMonths") - .HasColumnType("INTEGER"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("JobTitle") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LandlordName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LandlordPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyIncome") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("Reference1Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference1Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference1Relationship") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Reference2Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference2Phone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference2Relationship") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AppliedOn"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("Status"); - - b.ToTable("RentalApplications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SchemaVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("SchemaVersions"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateReceived") - .HasColumnType("TEXT"); - - b.Property("DeductionsAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DeductionsReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("InInvestmentPool") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PoolEntryDate") - .HasColumnType("TEXT"); - - b.Property("PoolExitDate") - .HasColumnType("TEXT"); - - b.Property("RefundAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("RefundMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RefundProcessedDate") - .HasColumnType("TEXT"); - - b.Property("RefundReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TransactionReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InInvestmentPool"); - - b.HasIndex("LeaseId") - .IsUnique(); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.ToTable("SecurityDeposits"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BaseDividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ChoiceMadeOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("InvestmentPoolId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MailingAddress") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("MonthsInPool") - .HasColumnType("INTEGER"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentProcessedOn") - .HasColumnType("TEXT"); - - b.Property("PaymentReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProrationFactor") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("SecurityDepositId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("InvestmentPoolId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("SecurityDepositId"); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.HasIndex("Year"); - - b.ToTable("SecurityDepositDividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveLeaseCount") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendPerLease") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DividendsCalculatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendsDistributedOn") - .HasColumnType("TEXT"); - - b.Property("EndingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OrganizationShare") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ReturnRate") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("StartingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantShareTotal") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TotalEarnings") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.HasIndex("Year") - .IsUnique(); - - b.ToTable("SecurityDepositInvestmentPools"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactPhone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("IdentificationNumber") - .IsUnique(); - - b.HasIndex("OrganizationId"); - - b.ToTable("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("ConductedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("Feedback") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("InterestLevel") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("ScheduledOn"); - - b.HasIndex("Status"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("GrantedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("GrantedOn") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RevokedOn") - .HasColumnType("TEXT"); - - b.Property("Role") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Role"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.WorkflowAuditLog", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Action") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FromStatus") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Metadata") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PerformedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PerformedOn") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("ToStatus") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Action"); - - b.HasIndex("EntityId"); - - b.HasIndex("EntityType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PerformedBy"); - - b.HasIndex("PerformedOn"); - - b.HasIndex("EntityType", "EntityId"); - - b.ToTable("WorkflowAuditLogs"); - }); - - modelBuilder.Entity("Notification", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EmailError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("EmailSent") - .HasColumnType("INTEGER"); - - b.Property("EmailSentOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRead") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ReadOn") - .HasColumnType("TEXT"); - - b.Property("RecipientUserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RelatedEntityId") - .HasColumnType("TEXT"); - - b.Property("RelatedEntityType") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SMSError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SMSSent") - .HasColumnType("INTEGER"); - - b.Property("SMSSentOn") - .HasColumnType("TEXT"); - - b.Property("SendEmail") - .HasColumnType("INTEGER"); - - b.Property("SendInApp") - .HasColumnType("INTEGER"); - - b.Property("SendSMS") - .HasColumnType("INTEGER"); - - b.Property("SentOn") - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsRead"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("SentOn"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithOne("Screening") - .HasForeignKey("Aquiis.Core.Entities.ApplicationScreening", "RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Checklists") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ChecklistTemplate"); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany("Items") - .HasForeignKey("ChecklistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Checklist"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Items") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ChecklistTemplate"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany() - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Documents") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Payment", "Payment") - .WithMany() - .HasForeignKey("PaymentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Documents") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Invoice"); - - b.Navigation("Lease"); - - b.Navigation("Payment"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Invoices") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Leases") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Leases") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany("Leases") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany() - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithMany() - .HasForeignKey("RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany("Payments") - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Invoice"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Properties") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "InterestedProperty") - .WithMany() - .HasForeignKey("InterestedPropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("InterestedProperty"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Applications") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.HasOne("Aquiis.Core.Entities.SecurityDepositInvestmentPool", "InvestmentPool") - .WithMany("Dividends") - .HasForeignKey("InvestmentPoolId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.SecurityDeposit", "SecurityDeposit") - .WithMany("Dividends") - .HasForeignKey("SecurityDepositId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvestmentPool"); - - b.Navigation("Lease"); - - b.Navigation("SecurityDeposit"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Tenants") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany() - .HasForeignKey("ChecklistId"); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Tours") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checklist"); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany("OrganizationUsers") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Notification", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Navigation("Checklists"); - - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Navigation("Documents"); - - b.Navigation("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Navigation("Leases"); - - b.Navigation("Properties"); - - b.Navigation("Tenants"); - - b.Navigation("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Navigation("Documents"); - - b.Navigation("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Navigation("Applications"); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Navigation("Screening"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Navigation("Leases"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260114233331_AddUserProfileTable.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260114233331_AddUserProfileTable.Designer.cs deleted file mode 100644 index 2cb376c..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260114233331_AddUserProfileTable.Designer.cs +++ /dev/null @@ -1,4097 +0,0 @@ -// -using System; -using Aquiis.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260114233331_AddUserProfileTable")] - partial class AddUserProfileTable - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "10.0.1"); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("CreditCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreditScore") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OverallResult") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("ResultNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OverallResult"); - - b.HasIndex("RentalApplicationId") - .IsUnique(); - - b.ToTable("ApplicationScreenings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Color") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("EndOn") - .HasColumnType("TEXT"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Location") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("StartOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("EventType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("SourceEntityId"); - - b.HasIndex("StartOn"); - - b.HasIndex("SourceEntityType", "SourceEntityId"); - - b.ToTable("CalendarEvents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AutoCreateEvents") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultColor") - .HasColumnType("TEXT"); - - b.Property("DefaultIcon") - .HasColumnType("TEXT"); - - b.Property("DisplayOrder") - .HasColumnType("INTEGER"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ShowOnCalendar") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationId", "EntityType") - .IsUnique(); - - b.ToTable("CalendarSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("ChecklistType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.HasIndex("ChecklistType"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("Status"); - - b.ToTable("Checklists"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsChecked") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhotoUrl") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.Property("Value") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.ToTable("ChecklistItems"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSystemTemplate") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("OrganizationId"); - - b.ToTable("ChecklistTemplates"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0001-000000000001"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Standard property showing checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Property Tour", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000002"), - Category = "MoveIn", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-in inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-In", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000003"), - Category = "MoveOut", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-out inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-Out", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000004"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Open house event checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Open House", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowsNotes") - .HasColumnType("INTEGER"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRequired") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.ToTable("ChecklistTemplateItems"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0002-000000000001"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Greeted prospect and verified appointment", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000002"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Reviewed property exterior and curb appeal", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000003"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Showed parking area/garage", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000004"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 4, - ItemText = "Toured living room/common areas", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000005"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 5, - ItemText = "Showed all bedrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000006"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 6, - ItemText = "Showed all bathrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000007"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 7, - ItemText = "Toured kitchen and demonstrated appliances", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000008"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 8, - ItemText = "Explained which appliances are included", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000009"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 9, - ItemText = "Explained HVAC system and thermostat controls", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000010"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 10, - ItemText = "Reviewed utility responsibilities (tenant vs landlord)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000011"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 11, - ItemText = "Showed water heater location", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000012"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 12, - ItemText = "Showed storage areas (closets, attic, basement)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000013"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 13, - ItemText = "Showed laundry facilities", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000014"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 14, - ItemText = "Showed outdoor space (yard, patio, balcony)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000015"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 15, - ItemText = "Discussed monthly rent amount", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000016"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 16, - ItemText = "Explained security deposit and move-in costs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000017"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 17, - ItemText = "Reviewed lease term length and start date", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000018"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 18, - ItemText = "Explained pet policy", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000019"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 19, - ItemText = "Explained application process and requirements", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000020"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 20, - ItemText = "Reviewed screening process (background, credit check)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000021"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 21, - ItemText = "Answered all prospect questions", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000022"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 22, - ItemText = "Prospect Interest Level", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = true, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000023"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 23, - ItemText = "Overall showing feedback and notes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000024"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Document property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000025"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect keys and access codes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000026"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Review lease terms with tenant", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000027"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Inspect property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000028"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect all keys and access devices", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000029"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Document damages and needed repairs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000030"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Set up signage and directional markers", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000031"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Prepare information packets", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000032"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Set up visitor sign-in sheet", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("DocumentType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("FileData") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FilePath") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FileSize") - .HasColumnType("INTEGER"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PaymentId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActionItemsRequired") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("BathroomSinkGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomSinkNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomToiletGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomToiletNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomTubShowerGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomTubShowerNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomVentilationGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomVentilationNotes") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CarbonMonoxideDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("CarbonMonoxideDetectorsNotes") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("ElectricalSystemGood") - .HasColumnType("INTEGER"); - - b.Property("ElectricalSystemNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorFoundationGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorFoundationNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorGuttersGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorGuttersNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorRoofGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorRoofNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorSidingGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorSidingNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("HvacSystemGood") - .HasColumnType("INTEGER"); - - b.Property("HvacSystemNotes") - .HasColumnType("TEXT"); - - b.Property("InspectedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InspectionType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InteriorCeilingsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorCeilingsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorFloorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorFloorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWallsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWallsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCabinetsGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCabinetsNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCountersGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCountersNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenSinkPlumbingGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenSinkPlumbingNotes") - .HasColumnType("TEXT"); - - b.Property("LandscapingGood") - .HasColumnType("INTEGER"); - - b.Property("LandscapingNotes") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OverallCondition") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PlumbingSystemGood") - .HasColumnType("INTEGER"); - - b.Property("PlumbingSystemNotes") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SmokeDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("SmokeDetectorsNotes") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.ToTable("Inspections"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AmountPaid") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("DueOn") - .HasColumnType("TEXT"); - - b.Property("InvoiceNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InvoicedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("LateFeeApplied") - .HasColumnType("INTEGER"); - - b.Property("LateFeeAppliedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("ReminderSent") - .HasColumnType("INTEGER"); - - b.Property("ReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceNumber") - .IsUnique(); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DeclinedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpectedMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseOfferId") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PreviousLeaseId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProposedRenewalRent") - .HasColumnType("decimal(18,2)"); - - b.Property("RenewalNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("RenewalNotificationSent") - .HasColumnType("INTEGER"); - - b.Property("RenewalNotificationSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalNumber") - .HasColumnType("INTEGER"); - - b.Property("RenewalOfferedOn") - .HasColumnType("TEXT"); - - b.Property("RenewalReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalResponseOn") - .HasColumnType("TEXT"); - - b.Property("RenewalStatus") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("SignedOn") - .HasColumnType("TEXT"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TerminationNoticedOn") - .HasColumnType("TEXT"); - - b.Property("TerminationReason") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConvertedLeaseId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("RespondedOn") - .HasColumnType("TEXT"); - - b.Property("ResponseNotes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasColumnType("decimal(18,2)"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("RentalApplicationId"); - - b.ToTable("LeaseOffers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AssignedTo") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("EstimatedCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RequestedBy") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequestedByEmail") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("RequestedByPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("RequestedOn") - .HasColumnType("TEXT"); - - b.Property("ResolutionNotes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("LeaseId"); - - b.HasIndex("Priority"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RequestedOn"); - - b.HasIndex("Status"); - - b.ToTable("MaintenanceRequests"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Note", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(5000) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UserFullName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Notes"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyDigestTime") - .HasColumnType("TEXT"); - - b.Property("EmailAddress") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmailApplicationStatusChange") - .HasColumnType("INTEGER"); - - b.Property("EmailInspectionScheduled") - .HasColumnType("INTEGER"); - - b.Property("EmailLeaseExpiring") - .HasColumnType("INTEGER"); - - b.Property("EmailMaintenanceUpdate") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentReceived") - .HasColumnType("INTEGER"); - - b.Property("EnableDailyDigest") - .HasColumnType("INTEGER"); - - b.Property("EnableEmailNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableInAppNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableSMSNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableWeeklyDigest") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("SMSLeaseExpiringUrgent") - .HasColumnType("INTEGER"); - - b.Property("SMSMaintenanceEmergency") - .HasColumnType("INTEGER"); - - b.Property("SMSPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("WeeklyDigestDay") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("NotificationPreferences"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DisplayName") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OwnerId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("DailyLimit") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentToday") - .HasColumnType("INTEGER"); - - b.Property("EnableSsl") - .HasColumnType("INTEGER"); - - b.Property("FromEmail") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FromName") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsEmailEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastEmailSentOn") - .HasColumnType("TEXT"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastErrorOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyLimit") - .HasColumnType("INTEGER"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PlanType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("SendGridApiKeyEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("SmtpPort") - .HasColumnType("INTEGER"); - - b.Property("SmtpServer") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("Username") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationEmailSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccountBalance") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("AccountType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CostPerSMS") - .HasPrecision(18, 4) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSMSEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastSMSSentOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("SMSSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("SMSSentToday") - .HasColumnType("INTEGER"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("TwilioAccountSidEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioAuthTokenEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioPhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSMSSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowTenantDividendChoice") - .HasColumnType("INTEGER"); - - b.Property("ApplicationExpirationDays") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("AutoCalculateSecurityDeposit") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("DefaultDividendPaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("DividendDistributionMonth") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAutoApply") - .HasColumnType("INTEGER"); - - b.Property("LateFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("LateFeeGracePeriodDays") - .HasColumnType("INTEGER"); - - b.Property("LateFeePercentage") - .HasPrecision(5, 4) - .HasColumnType("TEXT"); - - b.Property("MaxLateFeeAmount") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("PaymentReminderDaysBefore") - .HasColumnType("INTEGER"); - - b.Property("PaymentReminderEnabled") - .HasColumnType("INTEGER"); - - b.Property("RefundProcessingDays") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositInvestmentEnabled") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositMultiplier") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TourNoShowGracePeriodHours") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("GrantedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("GrantedOn") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RevokedOn") - .HasColumnType("TEXT"); - - b.Property("Role") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Role"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Bathrooms") - .HasMaxLength(3) - .HasColumnType("decimal(3,1)"); - - b.Property("Bedrooms") - .HasMaxLength(3) - .HasColumnType("INTEGER"); - - b.Property("City") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("IsAvailable") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastRoutineInspectionDate") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("NextRoutineInspectionDueDate") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RoutineInspectionIntervalMonths") - .HasColumnType("INTEGER"); - - b.Property("SquareFeet") - .HasMaxLength(7) - .HasColumnType("INTEGER"); - - b.Property("State") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("UnitNumber") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Address"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Properties"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("DesiredMoveInDate") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FirstContactedOn") - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationState") - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("InterestedPropertyId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Source") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("InterestedPropertyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.ToTable("ProspectiveTenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ApplicationFeePaid") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeePaidOn") - .HasColumnType("TEXT"); - - b.Property("ApplicationFeePaymentMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CurrentAddress") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("CurrentCity") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CurrentRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrentState") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("CurrentZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("DecidedOn") - .HasColumnType("TEXT"); - - b.Property("DecisionBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DenialReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("EmployerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmploymentLengthMonths") - .HasColumnType("INTEGER"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("JobTitle") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LandlordName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LandlordPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyIncome") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("Reference1Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference1Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference1Relationship") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Reference2Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference2Phone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference2Relationship") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AppliedOn"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("Status"); - - b.ToTable("RentalApplications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SchemaVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("SchemaVersions"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateReceived") - .HasColumnType("TEXT"); - - b.Property("DeductionsAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DeductionsReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("InInvestmentPool") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PoolEntryDate") - .HasColumnType("TEXT"); - - b.Property("PoolExitDate") - .HasColumnType("TEXT"); - - b.Property("RefundAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("RefundMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RefundProcessedDate") - .HasColumnType("TEXT"); - - b.Property("RefundReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TransactionReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InInvestmentPool"); - - b.HasIndex("LeaseId") - .IsUnique(); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.ToTable("SecurityDeposits"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BaseDividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ChoiceMadeOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("InvestmentPoolId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MailingAddress") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("MonthsInPool") - .HasColumnType("INTEGER"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentProcessedOn") - .HasColumnType("TEXT"); - - b.Property("PaymentReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProrationFactor") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("SecurityDepositId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("InvestmentPoolId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("SecurityDepositId"); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.HasIndex("Year"); - - b.ToTable("SecurityDepositDividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveLeaseCount") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendPerLease") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DividendsCalculatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendsDistributedOn") - .HasColumnType("TEXT"); - - b.Property("EndingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OrganizationShare") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ReturnRate") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("StartingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantShareTotal") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TotalEarnings") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.HasIndex("Year") - .IsUnique(); - - b.ToTable("SecurityDepositInvestmentPools"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactPhone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("IdentificationNumber") - .IsUnique(); - - b.HasIndex("OrganizationId"); - - b.ToTable("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("ConductedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("Feedback") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("InterestLevel") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("ScheduledOn"); - - b.HasIndex("Status"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.UserProfile", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveOrganizationId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ActiveOrganizationId"); - - b.HasIndex("Email"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserProfiles"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.WorkflowAuditLog", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Action") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FromStatus") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Metadata") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PerformedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PerformedOn") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("ToStatus") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Action"); - - b.HasIndex("EntityId"); - - b.HasIndex("EntityType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PerformedBy"); - - b.HasIndex("PerformedOn"); - - b.HasIndex("EntityType", "EntityId"); - - b.ToTable("WorkflowAuditLogs"); - }); - - modelBuilder.Entity("Notification", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EmailError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("EmailSent") - .HasColumnType("INTEGER"); - - b.Property("EmailSentOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRead") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ReadOn") - .HasColumnType("TEXT"); - - b.Property("RecipientUserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RelatedEntityId") - .HasColumnType("TEXT"); - - b.Property("RelatedEntityType") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SMSError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SMSSent") - .HasColumnType("INTEGER"); - - b.Property("SMSSentOn") - .HasColumnType("TEXT"); - - b.Property("SendEmail") - .HasColumnType("INTEGER"); - - b.Property("SendInApp") - .HasColumnType("INTEGER"); - - b.Property("SendSMS") - .HasColumnType("INTEGER"); - - b.Property("SentOn") - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsRead"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("SentOn"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithOne("Screening") - .HasForeignKey("Aquiis.Core.Entities.ApplicationScreening", "RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Checklists") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ChecklistTemplate"); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany("Items") - .HasForeignKey("ChecklistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Checklist"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Items") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ChecklistTemplate"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany() - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Documents") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Payment", "Payment") - .WithMany() - .HasForeignKey("PaymentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Documents") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Invoice"); - - b.Navigation("Lease"); - - b.Navigation("Payment"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Invoices") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Leases") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Leases") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany("Leases") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany() - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithMany() - .HasForeignKey("RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany("OrganizationUsers") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany("Payments") - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Invoice"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Properties") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "InterestedProperty") - .WithMany() - .HasForeignKey("InterestedPropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("InterestedProperty"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Applications") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.HasOne("Aquiis.Core.Entities.SecurityDepositInvestmentPool", "InvestmentPool") - .WithMany("Dividends") - .HasForeignKey("InvestmentPoolId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.SecurityDeposit", "SecurityDeposit") - .WithMany("Dividends") - .HasForeignKey("SecurityDepositId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvestmentPool"); - - b.Navigation("Lease"); - - b.Navigation("SecurityDeposit"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Tenants") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany() - .HasForeignKey("ChecklistId"); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Tours") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checklist"); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Notification", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Navigation("Checklists"); - - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Navigation("Documents"); - - b.Navigation("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Navigation("Leases"); - - b.Navigation("OrganizationUsers"); - - b.Navigation("Properties"); - - b.Navigation("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Navigation("Documents"); - - b.Navigation("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Navigation("Applications"); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Navigation("Screening"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Navigation("Leases"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260114233331_AddUserProfileTable.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260114233331_AddUserProfileTable.cs deleted file mode 100644 index 1fc7e3b..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260114233331_AddUserProfileTable.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - /// - public partial class AddUserProfileTable : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "UserProfiles", - columns: table => new - { - Id = table.Column(type: "TEXT", nullable: false), - UserId = table.Column(type: "TEXT", nullable: false), - Email = table.Column(type: "TEXT", nullable: false), - FirstName = table.Column(type: "TEXT", nullable: false), - LastName = table.Column(type: "TEXT", nullable: false), - PhoneNumber = table.Column(type: "TEXT", nullable: true), - OrganizationId = table.Column(type: "TEXT", nullable: true), - ActiveOrganizationId = table.Column(type: "TEXT", nullable: true), - CreatedOn = table.Column(type: "TEXT", nullable: false), - CreatedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), - LastModifiedOn = table.Column(type: "TEXT", nullable: true), - LastModifiedBy = table.Column(type: "TEXT", maxLength: 100, nullable: true), - IsDeleted = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserProfiles", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_UserProfiles_ActiveOrganizationId", - table: "UserProfiles", - column: "ActiveOrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_UserProfiles_Email", - table: "UserProfiles", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_UserProfiles_IsDeleted", - table: "UserProfiles", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_UserProfiles_OrganizationId", - table: "UserProfiles", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_UserProfiles_UserId", - table: "UserProfiles", - column: "UserId", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "UserProfiles"); - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260117025048_AddPaymentNumberField.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260117025048_AddPaymentNumberField.Designer.cs deleted file mode 100644 index a8ad23e..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260117025048_AddPaymentNumberField.Designer.cs +++ /dev/null @@ -1,4102 +0,0 @@ -// -using System; -using Aquiis.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260117025048_AddPaymentNumberField")] - partial class AddPaymentNumberField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "10.0.1"); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("CreditCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreditScore") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OverallResult") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("ResultNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OverallResult"); - - b.HasIndex("RentalApplicationId") - .IsUnique(); - - b.ToTable("ApplicationScreenings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Color") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("EndOn") - .HasColumnType("TEXT"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Location") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("StartOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("EventType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("SourceEntityId"); - - b.HasIndex("StartOn"); - - b.HasIndex("SourceEntityType", "SourceEntityId"); - - b.ToTable("CalendarEvents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AutoCreateEvents") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultColor") - .HasColumnType("TEXT"); - - b.Property("DefaultIcon") - .HasColumnType("TEXT"); - - b.Property("DisplayOrder") - .HasColumnType("INTEGER"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ShowOnCalendar") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationId", "EntityType") - .IsUnique(); - - b.ToTable("CalendarSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("ChecklistType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.HasIndex("ChecklistType"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("Status"); - - b.ToTable("Checklists"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsChecked") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhotoUrl") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.Property("Value") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.ToTable("ChecklistItems"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSystemTemplate") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("OrganizationId"); - - b.ToTable("ChecklistTemplates"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0001-000000000001"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Standard property showing checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Property Tour", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000002"), - Category = "MoveIn", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-in inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-In", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000003"), - Category = "MoveOut", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-out inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-Out", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000004"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Open house event checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Open House", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowsNotes") - .HasColumnType("INTEGER"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRequired") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.ToTable("ChecklistTemplateItems"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0002-000000000001"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Greeted prospect and verified appointment", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000002"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Reviewed property exterior and curb appeal", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000003"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Showed parking area/garage", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000004"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 4, - ItemText = "Toured living room/common areas", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000005"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 5, - ItemText = "Showed all bedrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000006"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 6, - ItemText = "Showed all bathrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000007"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 7, - ItemText = "Toured kitchen and demonstrated appliances", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000008"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 8, - ItemText = "Explained which appliances are included", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000009"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 9, - ItemText = "Explained HVAC system and thermostat controls", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000010"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 10, - ItemText = "Reviewed utility responsibilities (tenant vs landlord)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000011"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 11, - ItemText = "Showed water heater location", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000012"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 12, - ItemText = "Showed storage areas (closets, attic, basement)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000013"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 13, - ItemText = "Showed laundry facilities", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000014"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 14, - ItemText = "Showed outdoor space (yard, patio, balcony)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000015"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 15, - ItemText = "Discussed monthly rent amount", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000016"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 16, - ItemText = "Explained security deposit and move-in costs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000017"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 17, - ItemText = "Reviewed lease term length and start date", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000018"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 18, - ItemText = "Explained pet policy", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000019"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 19, - ItemText = "Explained application process and requirements", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000020"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 20, - ItemText = "Reviewed screening process (background, credit check)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000021"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 21, - ItemText = "Answered all prospect questions", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000022"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 22, - ItemText = "Prospect Interest Level", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = true, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000023"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 23, - ItemText = "Overall showing feedback and notes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000024"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Document property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000025"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect keys and access codes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000026"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Review lease terms with tenant", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000027"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Inspect property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000028"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect all keys and access devices", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000029"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Document damages and needed repairs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000030"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Set up signage and directional markers", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000031"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Prepare information packets", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000032"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Set up visitor sign-in sheet", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("DocumentType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("FileData") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FilePath") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FileSize") - .HasColumnType("INTEGER"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PaymentId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActionItemsRequired") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("BathroomSinkGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomSinkNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomToiletGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomToiletNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomTubShowerGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomTubShowerNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomVentilationGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomVentilationNotes") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CarbonMonoxideDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("CarbonMonoxideDetectorsNotes") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("ElectricalSystemGood") - .HasColumnType("INTEGER"); - - b.Property("ElectricalSystemNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorFoundationGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorFoundationNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorGuttersGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorGuttersNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorRoofGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorRoofNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorSidingGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorSidingNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("HvacSystemGood") - .HasColumnType("INTEGER"); - - b.Property("HvacSystemNotes") - .HasColumnType("TEXT"); - - b.Property("InspectedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InspectionType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InteriorCeilingsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorCeilingsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorFloorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorFloorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWallsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWallsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCabinetsGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCabinetsNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCountersGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCountersNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenSinkPlumbingGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenSinkPlumbingNotes") - .HasColumnType("TEXT"); - - b.Property("LandscapingGood") - .HasColumnType("INTEGER"); - - b.Property("LandscapingNotes") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OverallCondition") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PlumbingSystemGood") - .HasColumnType("INTEGER"); - - b.Property("PlumbingSystemNotes") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SmokeDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("SmokeDetectorsNotes") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.ToTable("Inspections"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AmountPaid") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("DueOn") - .HasColumnType("TEXT"); - - b.Property("InvoiceNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InvoicedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("LateFeeApplied") - .HasColumnType("INTEGER"); - - b.Property("LateFeeAppliedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("ReminderSent") - .HasColumnType("INTEGER"); - - b.Property("ReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceNumber") - .IsUnique(); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DeclinedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpectedMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseOfferId") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PreviousLeaseId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProposedRenewalRent") - .HasColumnType("decimal(18,2)"); - - b.Property("RenewalNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("RenewalNotificationSent") - .HasColumnType("INTEGER"); - - b.Property("RenewalNotificationSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalNumber") - .HasColumnType("INTEGER"); - - b.Property("RenewalOfferedOn") - .HasColumnType("TEXT"); - - b.Property("RenewalReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalResponseOn") - .HasColumnType("TEXT"); - - b.Property("RenewalStatus") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("SignedOn") - .HasColumnType("TEXT"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TerminationNoticedOn") - .HasColumnType("TEXT"); - - b.Property("TerminationReason") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConvertedLeaseId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("RespondedOn") - .HasColumnType("TEXT"); - - b.Property("ResponseNotes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasColumnType("decimal(18,2)"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("RentalApplicationId"); - - b.ToTable("LeaseOffers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AssignedTo") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("EstimatedCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RequestedBy") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequestedByEmail") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("RequestedByPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("RequestedOn") - .HasColumnType("TEXT"); - - b.Property("ResolutionNotes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("LeaseId"); - - b.HasIndex("Priority"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RequestedOn"); - - b.HasIndex("Status"); - - b.ToTable("MaintenanceRequests"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Note", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(5000) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UserFullName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Notes"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyDigestTime") - .HasColumnType("TEXT"); - - b.Property("EmailAddress") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmailApplicationStatusChange") - .HasColumnType("INTEGER"); - - b.Property("EmailInspectionScheduled") - .HasColumnType("INTEGER"); - - b.Property("EmailLeaseExpiring") - .HasColumnType("INTEGER"); - - b.Property("EmailMaintenanceUpdate") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentReceived") - .HasColumnType("INTEGER"); - - b.Property("EnableDailyDigest") - .HasColumnType("INTEGER"); - - b.Property("EnableEmailNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableInAppNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableSMSNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableWeeklyDigest") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("SMSLeaseExpiringUrgent") - .HasColumnType("INTEGER"); - - b.Property("SMSMaintenanceEmergency") - .HasColumnType("INTEGER"); - - b.Property("SMSPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("WeeklyDigestDay") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("NotificationPreferences"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DisplayName") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OwnerId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("DailyLimit") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentToday") - .HasColumnType("INTEGER"); - - b.Property("EnableSsl") - .HasColumnType("INTEGER"); - - b.Property("FromEmail") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FromName") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsEmailEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastEmailSentOn") - .HasColumnType("TEXT"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastErrorOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyLimit") - .HasColumnType("INTEGER"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PlanType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("SendGridApiKeyEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("SmtpPort") - .HasColumnType("INTEGER"); - - b.Property("SmtpServer") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("Username") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationEmailSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccountBalance") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("AccountType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CostPerSMS") - .HasPrecision(18, 4) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSMSEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastSMSSentOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("SMSSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("SMSSentToday") - .HasColumnType("INTEGER"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("TwilioAccountSidEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioAuthTokenEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioPhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSMSSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowTenantDividendChoice") - .HasColumnType("INTEGER"); - - b.Property("ApplicationExpirationDays") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("AutoCalculateSecurityDeposit") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("DefaultDividendPaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("DividendDistributionMonth") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAutoApply") - .HasColumnType("INTEGER"); - - b.Property("LateFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("LateFeeGracePeriodDays") - .HasColumnType("INTEGER"); - - b.Property("LateFeePercentage") - .HasPrecision(5, 4) - .HasColumnType("TEXT"); - - b.Property("MaxLateFeeAmount") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("PaymentReminderDaysBefore") - .HasColumnType("INTEGER"); - - b.Property("PaymentReminderEnabled") - .HasColumnType("INTEGER"); - - b.Property("RefundProcessingDays") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositInvestmentEnabled") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositMultiplier") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TourNoShowGracePeriodHours") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("GrantedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("GrantedOn") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RevokedOn") - .HasColumnType("TEXT"); - - b.Property("Role") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Role"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Bathrooms") - .HasMaxLength(3) - .HasColumnType("decimal(3,1)"); - - b.Property("Bedrooms") - .HasMaxLength(3) - .HasColumnType("INTEGER"); - - b.Property("City") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("IsAvailable") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastRoutineInspectionDate") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("NextRoutineInspectionDueDate") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RoutineInspectionIntervalMonths") - .HasColumnType("INTEGER"); - - b.Property("SquareFeet") - .HasMaxLength(7) - .HasColumnType("INTEGER"); - - b.Property("State") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("UnitNumber") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Address"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Properties"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("DesiredMoveInDate") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FirstContactedOn") - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationState") - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("InterestedPropertyId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Source") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("InterestedPropertyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.ToTable("ProspectiveTenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ApplicationFeePaid") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeePaidOn") - .HasColumnType("TEXT"); - - b.Property("ApplicationFeePaymentMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CurrentAddress") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("CurrentCity") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CurrentRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrentState") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("CurrentZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("DecidedOn") - .HasColumnType("TEXT"); - - b.Property("DecisionBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DenialReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("EmployerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmploymentLengthMonths") - .HasColumnType("INTEGER"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("JobTitle") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LandlordName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LandlordPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyIncome") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("Reference1Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference1Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference1Relationship") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Reference2Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference2Phone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference2Relationship") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AppliedOn"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("Status"); - - b.ToTable("RentalApplications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SchemaVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("SchemaVersions"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateReceived") - .HasColumnType("TEXT"); - - b.Property("DeductionsAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DeductionsReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("InInvestmentPool") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PoolEntryDate") - .HasColumnType("TEXT"); - - b.Property("PoolExitDate") - .HasColumnType("TEXT"); - - b.Property("RefundAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("RefundMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RefundProcessedDate") - .HasColumnType("TEXT"); - - b.Property("RefundReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TransactionReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InInvestmentPool"); - - b.HasIndex("LeaseId") - .IsUnique(); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.ToTable("SecurityDeposits"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BaseDividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ChoiceMadeOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("InvestmentPoolId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MailingAddress") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("MonthsInPool") - .HasColumnType("INTEGER"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentProcessedOn") - .HasColumnType("TEXT"); - - b.Property("PaymentReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProrationFactor") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("SecurityDepositId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("InvestmentPoolId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("SecurityDepositId"); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.HasIndex("Year"); - - b.ToTable("SecurityDepositDividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveLeaseCount") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendPerLease") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DividendsCalculatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendsDistributedOn") - .HasColumnType("TEXT"); - - b.Property("EndingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OrganizationShare") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ReturnRate") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("StartingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantShareTotal") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TotalEarnings") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.HasIndex("Year") - .IsUnique(); - - b.ToTable("SecurityDepositInvestmentPools"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactPhone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("IdentificationNumber") - .IsUnique(); - - b.HasIndex("OrganizationId"); - - b.ToTable("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("ConductedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("Feedback") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("InterestLevel") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("ScheduledOn"); - - b.HasIndex("Status"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.UserProfile", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveOrganizationId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ActiveOrganizationId"); - - b.HasIndex("Email"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserProfiles"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.WorkflowAuditLog", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Action") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FromStatus") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Metadata") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PerformedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PerformedOn") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("ToStatus") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Action"); - - b.HasIndex("EntityId"); - - b.HasIndex("EntityType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PerformedBy"); - - b.HasIndex("PerformedOn"); - - b.HasIndex("EntityType", "EntityId"); - - b.ToTable("WorkflowAuditLogs"); - }); - - modelBuilder.Entity("Notification", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EmailError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("EmailSent") - .HasColumnType("INTEGER"); - - b.Property("EmailSentOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRead") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ReadOn") - .HasColumnType("TEXT"); - - b.Property("RecipientUserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RelatedEntityId") - .HasColumnType("TEXT"); - - b.Property("RelatedEntityType") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SMSError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SMSSent") - .HasColumnType("INTEGER"); - - b.Property("SMSSentOn") - .HasColumnType("TEXT"); - - b.Property("SendEmail") - .HasColumnType("INTEGER"); - - b.Property("SendInApp") - .HasColumnType("INTEGER"); - - b.Property("SendSMS") - .HasColumnType("INTEGER"); - - b.Property("SentOn") - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsRead"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("SentOn"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithOne("Screening") - .HasForeignKey("Aquiis.Core.Entities.ApplicationScreening", "RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Checklists") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ChecklistTemplate"); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany("Items") - .HasForeignKey("ChecklistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Checklist"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Items") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ChecklistTemplate"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany() - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Documents") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Payment", "Payment") - .WithMany() - .HasForeignKey("PaymentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Documents") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Invoice"); - - b.Navigation("Lease"); - - b.Navigation("Payment"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Invoices") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Leases") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Leases") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany("Leases") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany() - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithMany() - .HasForeignKey("RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany("OrganizationUsers") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany("Payments") - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Invoice"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Properties") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "InterestedProperty") - .WithMany() - .HasForeignKey("InterestedPropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("InterestedProperty"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Applications") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.HasOne("Aquiis.Core.Entities.SecurityDepositInvestmentPool", "InvestmentPool") - .WithMany("Dividends") - .HasForeignKey("InvestmentPoolId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.SecurityDeposit", "SecurityDeposit") - .WithMany("Dividends") - .HasForeignKey("SecurityDepositId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvestmentPool"); - - b.Navigation("Lease"); - - b.Navigation("SecurityDeposit"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Tenants") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany() - .HasForeignKey("ChecklistId"); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Tours") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checklist"); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Notification", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Navigation("Checklists"); - - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Navigation("Documents"); - - b.Navigation("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Navigation("Leases"); - - b.Navigation("OrganizationUsers"); - - b.Navigation("Properties"); - - b.Navigation("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Navigation("Documents"); - - b.Navigation("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Navigation("Applications"); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Navigation("Screening"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Navigation("Leases"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260117025048_AddPaymentNumberField.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260117025048_AddPaymentNumberField.cs deleted file mode 100644 index dcf4007..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260117025048_AddPaymentNumberField.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - /// - public partial class AddPaymentNumberField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "PaymentNumber", - table: "Payments", - type: "TEXT", - maxLength: 50, - nullable: false, - defaultValue: ""); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "PaymentNumber", - table: "Payments"); - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260122142531_AddRepairEntity.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260122142531_AddRepairEntity.Designer.cs deleted file mode 100644 index 07e1479..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260122142531_AddRepairEntity.Designer.cs +++ /dev/null @@ -1,4238 +0,0 @@ -// -using System; -using Aquiis.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260122142531_AddRepairEntity")] - partial class AddRepairEntity - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "10.0.1"); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("CreditCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreditScore") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OverallResult") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("ResultNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OverallResult"); - - b.HasIndex("RentalApplicationId") - .IsUnique(); - - b.ToTable("ApplicationScreenings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Color") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("EndOn") - .HasColumnType("TEXT"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Location") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("StartOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("EventType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("SourceEntityId"); - - b.HasIndex("StartOn"); - - b.HasIndex("SourceEntityType", "SourceEntityId"); - - b.ToTable("CalendarEvents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AutoCreateEvents") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultColor") - .HasColumnType("TEXT"); - - b.Property("DefaultIcon") - .HasColumnType("TEXT"); - - b.Property("DisplayOrder") - .HasColumnType("INTEGER"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ShowOnCalendar") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationId", "EntityType") - .IsUnique(); - - b.ToTable("CalendarSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("ChecklistType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.HasIndex("ChecklistType"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("Status"); - - b.ToTable("Checklists"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsChecked") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhotoUrl") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.Property("Value") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.ToTable("ChecklistItems"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSystemTemplate") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("OrganizationId"); - - b.ToTable("ChecklistTemplates"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0001-000000000001"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Standard property showing checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Property Tour", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000002"), - Category = "MoveIn", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-in inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-In", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000003"), - Category = "MoveOut", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-out inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-Out", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000004"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Open house event checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Open House", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowsNotes") - .HasColumnType("INTEGER"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRequired") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.ToTable("ChecklistTemplateItems"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0002-000000000001"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Greeted prospect and verified appointment", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000002"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Reviewed property exterior and curb appeal", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000003"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Showed parking area/garage", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000004"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 4, - ItemText = "Toured living room/common areas", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000005"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 5, - ItemText = "Showed all bedrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000006"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 6, - ItemText = "Showed all bathrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000007"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 7, - ItemText = "Toured kitchen and demonstrated appliances", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000008"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 8, - ItemText = "Explained which appliances are included", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000009"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 9, - ItemText = "Explained HVAC system and thermostat controls", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000010"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 10, - ItemText = "Reviewed utility responsibilities (tenant vs landlord)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000011"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 11, - ItemText = "Showed water heater location", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000012"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 12, - ItemText = "Showed storage areas (closets, attic, basement)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000013"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 13, - ItemText = "Showed laundry facilities", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000014"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 14, - ItemText = "Showed outdoor space (yard, patio, balcony)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000015"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 15, - ItemText = "Discussed monthly rent amount", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000016"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 16, - ItemText = "Explained security deposit and move-in costs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000017"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 17, - ItemText = "Reviewed lease term length and start date", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000018"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 18, - ItemText = "Explained pet policy", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000019"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 19, - ItemText = "Explained application process and requirements", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000020"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 20, - ItemText = "Reviewed screening process (background, credit check)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000021"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 21, - ItemText = "Answered all prospect questions", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000022"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 22, - ItemText = "Prospect Interest Level", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = true, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000023"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 23, - ItemText = "Overall showing feedback and notes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000024"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Document property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000025"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect keys and access codes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000026"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Review lease terms with tenant", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000027"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Inspect property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000028"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect all keys and access devices", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000029"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Document damages and needed repairs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000030"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Set up signage and directional markers", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000031"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Prepare information packets", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000032"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Set up visitor sign-in sheet", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("DocumentType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("FileData") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FilePath") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FileSize") - .HasColumnType("INTEGER"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PaymentId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActionItemsRequired") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("BathroomSinkGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomSinkNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomToiletGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomToiletNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomTubShowerGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomTubShowerNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomVentilationGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomVentilationNotes") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CarbonMonoxideDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("CarbonMonoxideDetectorsNotes") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("ElectricalSystemGood") - .HasColumnType("INTEGER"); - - b.Property("ElectricalSystemNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorFoundationGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorFoundationNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorGuttersGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorGuttersNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorRoofGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorRoofNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorSidingGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorSidingNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("HvacSystemGood") - .HasColumnType("INTEGER"); - - b.Property("HvacSystemNotes") - .HasColumnType("TEXT"); - - b.Property("InspectedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InspectionType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InteriorCeilingsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorCeilingsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorFloorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorFloorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWallsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWallsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCabinetsGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCabinetsNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCountersGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCountersNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenSinkPlumbingGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenSinkPlumbingNotes") - .HasColumnType("TEXT"); - - b.Property("LandscapingGood") - .HasColumnType("INTEGER"); - - b.Property("LandscapingNotes") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OverallCondition") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PlumbingSystemGood") - .HasColumnType("INTEGER"); - - b.Property("PlumbingSystemNotes") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SmokeDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("SmokeDetectorsNotes") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.ToTable("Inspections"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AmountPaid") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("DueOn") - .HasColumnType("TEXT"); - - b.Property("InvoiceNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InvoicedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("LateFeeApplied") - .HasColumnType("INTEGER"); - - b.Property("LateFeeAppliedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("ReminderSent") - .HasColumnType("INTEGER"); - - b.Property("ReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceNumber") - .IsUnique(); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DeclinedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpectedMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseOfferId") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PreviousLeaseId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProposedRenewalRent") - .HasColumnType("decimal(18,2)"); - - b.Property("RenewalNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("RenewalNotificationSent") - .HasColumnType("INTEGER"); - - b.Property("RenewalNotificationSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalNumber") - .HasColumnType("INTEGER"); - - b.Property("RenewalOfferedOn") - .HasColumnType("TEXT"); - - b.Property("RenewalReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalResponseOn") - .HasColumnType("TEXT"); - - b.Property("RenewalStatus") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("SignedOn") - .HasColumnType("TEXT"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TerminationNoticedOn") - .HasColumnType("TEXT"); - - b.Property("TerminationReason") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConvertedLeaseId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("RespondedOn") - .HasColumnType("TEXT"); - - b.Property("ResponseNotes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasColumnType("decimal(18,2)"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("RentalApplicationId"); - - b.ToTable("LeaseOffers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AssignedTo") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("EstimatedCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RequestedBy") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequestedByEmail") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("RequestedByPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("RequestedOn") - .HasColumnType("TEXT"); - - b.Property("ResolutionNotes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("LeaseId"); - - b.HasIndex("Priority"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RequestedOn"); - - b.HasIndex("Status"); - - b.ToTable("MaintenanceRequests"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Note", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(5000) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UserFullName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Notes"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyDigestTime") - .HasColumnType("TEXT"); - - b.Property("EmailAddress") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmailApplicationStatusChange") - .HasColumnType("INTEGER"); - - b.Property("EmailInspectionScheduled") - .HasColumnType("INTEGER"); - - b.Property("EmailLeaseExpiring") - .HasColumnType("INTEGER"); - - b.Property("EmailMaintenanceUpdate") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentReceived") - .HasColumnType("INTEGER"); - - b.Property("EnableDailyDigest") - .HasColumnType("INTEGER"); - - b.Property("EnableEmailNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableInAppNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableSMSNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableWeeklyDigest") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("SMSLeaseExpiringUrgent") - .HasColumnType("INTEGER"); - - b.Property("SMSMaintenanceEmergency") - .HasColumnType("INTEGER"); - - b.Property("SMSPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("WeeklyDigestDay") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("NotificationPreferences"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DisplayName") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OwnerId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("DailyLimit") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentToday") - .HasColumnType("INTEGER"); - - b.Property("EnableSsl") - .HasColumnType("INTEGER"); - - b.Property("FromEmail") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FromName") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsEmailEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastEmailSentOn") - .HasColumnType("TEXT"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastErrorOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyLimit") - .HasColumnType("INTEGER"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PlanType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("SendGridApiKeyEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("SmtpPort") - .HasColumnType("INTEGER"); - - b.Property("SmtpServer") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("Username") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationEmailSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccountBalance") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("AccountType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CostPerSMS") - .HasPrecision(18, 4) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSMSEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastSMSSentOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("SMSSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("SMSSentToday") - .HasColumnType("INTEGER"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("TwilioAccountSidEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioAuthTokenEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioPhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSMSSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowTenantDividendChoice") - .HasColumnType("INTEGER"); - - b.Property("ApplicationExpirationDays") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("AutoCalculateSecurityDeposit") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("DefaultDividendPaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("DividendDistributionMonth") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAutoApply") - .HasColumnType("INTEGER"); - - b.Property("LateFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("LateFeeGracePeriodDays") - .HasColumnType("INTEGER"); - - b.Property("LateFeePercentage") - .HasPrecision(5, 4) - .HasColumnType("TEXT"); - - b.Property("MaxLateFeeAmount") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("PaymentReminderDaysBefore") - .HasColumnType("INTEGER"); - - b.Property("PaymentReminderEnabled") - .HasColumnType("INTEGER"); - - b.Property("RefundProcessingDays") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositInvestmentEnabled") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositMultiplier") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TourNoShowGracePeriodHours") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("GrantedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("GrantedOn") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RevokedOn") - .HasColumnType("TEXT"); - - b.Property("Role") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Role"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Bathrooms") - .HasMaxLength(3) - .HasColumnType("decimal(3,1)"); - - b.Property("Bedrooms") - .HasMaxLength(3) - .HasColumnType("INTEGER"); - - b.Property("City") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("IsAvailable") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastRoutineInspectionDate") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("NextRoutineInspectionDueDate") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RoutineInspectionIntervalMonths") - .HasColumnType("INTEGER"); - - b.Property("SquareFeet") - .HasMaxLength(7) - .HasColumnType("INTEGER"); - - b.Property("State") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("UnitNumber") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Address"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Properties"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("DesiredMoveInDate") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FirstContactedOn") - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationState") - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("InterestedPropertyId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Source") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("InterestedPropertyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.ToTable("ProspectiveTenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ApplicationFeePaid") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeePaidOn") - .HasColumnType("TEXT"); - - b.Property("ApplicationFeePaymentMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CurrentAddress") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("CurrentCity") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CurrentRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrentState") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("CurrentZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("DecidedOn") - .HasColumnType("TEXT"); - - b.Property("DecisionBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DenialReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("EmployerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmploymentLengthMonths") - .HasColumnType("INTEGER"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("JobTitle") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LandlordName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LandlordPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyIncome") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("Reference1Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference1Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference1Relationship") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Reference2Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference2Phone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference2Relationship") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AppliedOn"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("Status"); - - b.ToTable("RentalApplications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Repair", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("ContactId") - .HasColumnType("TEXT"); - - b.Property("ContractorName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ContractorPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Cost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MaintenanceRequestId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PartsReplaced") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RepairType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("WarrantyApplies") - .HasColumnType("INTEGER"); - - b.Property("WarrantyExpiresOn") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("LeaseId"); - - b.HasIndex("MaintenanceRequestId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RepairType"); - - b.ToTable("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SchemaVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("SchemaVersions"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateReceived") - .HasColumnType("TEXT"); - - b.Property("DeductionsAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DeductionsReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("InInvestmentPool") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PoolEntryDate") - .HasColumnType("TEXT"); - - b.Property("PoolExitDate") - .HasColumnType("TEXT"); - - b.Property("RefundAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("RefundMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RefundProcessedDate") - .HasColumnType("TEXT"); - - b.Property("RefundReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TransactionReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InInvestmentPool"); - - b.HasIndex("LeaseId") - .IsUnique(); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.ToTable("SecurityDeposits"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BaseDividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ChoiceMadeOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("InvestmentPoolId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MailingAddress") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("MonthsInPool") - .HasColumnType("INTEGER"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentProcessedOn") - .HasColumnType("TEXT"); - - b.Property("PaymentReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProrationFactor") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("SecurityDepositId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("InvestmentPoolId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("SecurityDepositId"); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.HasIndex("Year"); - - b.ToTable("SecurityDepositDividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveLeaseCount") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendPerLease") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DividendsCalculatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendsDistributedOn") - .HasColumnType("TEXT"); - - b.Property("EndingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OrganizationShare") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ReturnRate") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("StartingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantShareTotal") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TotalEarnings") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.HasIndex("Year") - .IsUnique(); - - b.ToTable("SecurityDepositInvestmentPools"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactPhone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("IdentificationNumber") - .IsUnique(); - - b.HasIndex("OrganizationId"); - - b.ToTable("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("ConductedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("Feedback") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("InterestLevel") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("ScheduledOn"); - - b.HasIndex("Status"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.UserProfile", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveOrganizationId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ActiveOrganizationId"); - - b.HasIndex("Email"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserProfiles"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.WorkflowAuditLog", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Action") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FromStatus") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Metadata") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PerformedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PerformedOn") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("ToStatus") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Action"); - - b.HasIndex("EntityId"); - - b.HasIndex("EntityType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PerformedBy"); - - b.HasIndex("PerformedOn"); - - b.HasIndex("EntityType", "EntityId"); - - b.ToTable("WorkflowAuditLogs"); - }); - - modelBuilder.Entity("Notification", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EmailError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("EmailSent") - .HasColumnType("INTEGER"); - - b.Property("EmailSentOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRead") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ReadOn") - .HasColumnType("TEXT"); - - b.Property("RecipientUserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RelatedEntityId") - .HasColumnType("TEXT"); - - b.Property("RelatedEntityType") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SMSError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SMSSent") - .HasColumnType("INTEGER"); - - b.Property("SMSSentOn") - .HasColumnType("TEXT"); - - b.Property("SendEmail") - .HasColumnType("INTEGER"); - - b.Property("SendInApp") - .HasColumnType("INTEGER"); - - b.Property("SendSMS") - .HasColumnType("INTEGER"); - - b.Property("SentOn") - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsRead"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("SentOn"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithOne("Screening") - .HasForeignKey("Aquiis.Core.Entities.ApplicationScreening", "RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Checklists") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ChecklistTemplate"); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany("Items") - .HasForeignKey("ChecklistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Checklist"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Items") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ChecklistTemplate"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany() - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Documents") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Payment", "Payment") - .WithMany() - .HasForeignKey("PaymentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Documents") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Invoice"); - - b.Navigation("Lease"); - - b.Navigation("Payment"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Invoices") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Leases") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Leases") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany("Leases") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany() - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithMany() - .HasForeignKey("RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany("OrganizationUsers") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany("Payments") - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Invoice"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Properties") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "InterestedProperty") - .WithMany() - .HasForeignKey("InterestedPropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("InterestedProperty"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Applications") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Repair", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.MaintenanceRequest", "MaintenanceRequest") - .WithMany("Repairs") - .HasForeignKey("MaintenanceRequestId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("MaintenanceRequest"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.HasOne("Aquiis.Core.Entities.SecurityDepositInvestmentPool", "InvestmentPool") - .WithMany("Dividends") - .HasForeignKey("InvestmentPoolId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.SecurityDeposit", "SecurityDeposit") - .WithMany("Dividends") - .HasForeignKey("SecurityDepositId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvestmentPool"); - - b.Navigation("Lease"); - - b.Navigation("SecurityDeposit"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Tenants") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany() - .HasForeignKey("ChecklistId"); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Tours") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checklist"); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Notification", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Navigation("Checklists"); - - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Navigation("Documents"); - - b.Navigation("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Navigation("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Navigation("Leases"); - - b.Navigation("OrganizationUsers"); - - b.Navigation("Properties"); - - b.Navigation("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Navigation("Documents"); - - b.Navigation("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Navigation("Applications"); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Navigation("Screening"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Navigation("Leases"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260122142531_AddRepairEntity.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260122142531_AddRepairEntity.cs deleted file mode 100644 index d353785..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260122142531_AddRepairEntity.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - /// - public partial class AddRepairEntity : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Repairs", - columns: table => new - { - Id = table.Column(type: "TEXT", nullable: false), - OrganizationId = table.Column(type: "TEXT", nullable: false), - PropertyId = table.Column(type: "TEXT", nullable: false), - MaintenanceRequestId = table.Column(type: "TEXT", nullable: true), - LeaseId = table.Column(type: "TEXT", nullable: true), - Description = table.Column(type: "TEXT", maxLength: 200, nullable: false), - RepairType = table.Column(type: "TEXT", maxLength: 50, nullable: false), - CompletedOn = table.Column(type: "TEXT", nullable: true), - Cost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - DurationMinutes = table.Column(type: "INTEGER", nullable: false), - CompletedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), - ContractorName = table.Column(type: "TEXT", maxLength: 100, nullable: false), - ContractorPhone = table.Column(type: "TEXT", maxLength: 20, nullable: false), - ContactId = table.Column(type: "TEXT", nullable: true), - Notes = table.Column(type: "TEXT", maxLength: 2000, nullable: false), - PartsReplaced = table.Column(type: "TEXT", maxLength: 500, nullable: false), - WarrantyApplies = table.Column(type: "INTEGER", nullable: false), - WarrantyExpiresOn = table.Column(type: "TEXT", nullable: true), - CreatedOn = table.Column(type: "TEXT", nullable: false), - CreatedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), - LastModifiedOn = table.Column(type: "TEXT", nullable: true), - LastModifiedBy = table.Column(type: "TEXT", maxLength: 100, nullable: true), - IsDeleted = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Repairs", x => x.Id); - table.ForeignKey( - name: "FK_Repairs_Leases_LeaseId", - column: x => x.LeaseId, - principalTable: "Leases", - principalColumn: "Id", - onDelete: ReferentialAction.SetNull); - table.ForeignKey( - name: "FK_Repairs_MaintenanceRequests_MaintenanceRequestId", - column: x => x.MaintenanceRequestId, - principalTable: "MaintenanceRequests", - principalColumn: "Id", - onDelete: ReferentialAction.SetNull); - table.ForeignKey( - name: "FK_Repairs_Properties_PropertyId", - column: x => x.PropertyId, - principalTable: "Properties", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_Repairs_CompletedOn", - table: "Repairs", - column: "CompletedOn"); - - migrationBuilder.CreateIndex( - name: "IX_Repairs_LeaseId", - table: "Repairs", - column: "LeaseId"); - - migrationBuilder.CreateIndex( - name: "IX_Repairs_MaintenanceRequestId", - table: "Repairs", - column: "MaintenanceRequestId"); - - migrationBuilder.CreateIndex( - name: "IX_Repairs_OrganizationId", - table: "Repairs", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_Repairs_PropertyId", - table: "Repairs", - column: "PropertyId"); - - migrationBuilder.CreateIndex( - name: "IX_Repairs_RepairType", - table: "Repairs", - column: "RepairType"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Repairs"); - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260122152750_RenameCompletedByToContactPersonAndAddContractorId.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260122152750_RenameCompletedByToContactPersonAndAddContractorId.Designer.cs deleted file mode 100644 index 9c64e1d..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260122152750_RenameCompletedByToContactPersonAndAddContractorId.Designer.cs +++ /dev/null @@ -1,4241 +0,0 @@ -// -using System; -using Aquiis.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260122152750_RenameCompletedByToContactPersonAndAddContractorId")] - partial class RenameCompletedByToContactPersonAndAddContractorId - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "10.0.1"); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("CreditCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreditScore") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OverallResult") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("ResultNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OverallResult"); - - b.HasIndex("RentalApplicationId") - .IsUnique(); - - b.ToTable("ApplicationScreenings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Color") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("EndOn") - .HasColumnType("TEXT"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Location") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("StartOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("EventType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("SourceEntityId"); - - b.HasIndex("StartOn"); - - b.HasIndex("SourceEntityType", "SourceEntityId"); - - b.ToTable("CalendarEvents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AutoCreateEvents") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultColor") - .HasColumnType("TEXT"); - - b.Property("DefaultIcon") - .HasColumnType("TEXT"); - - b.Property("DisplayOrder") - .HasColumnType("INTEGER"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ShowOnCalendar") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationId", "EntityType") - .IsUnique(); - - b.ToTable("CalendarSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("ChecklistType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.HasIndex("ChecklistType"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("Status"); - - b.ToTable("Checklists"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsChecked") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhotoUrl") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.Property("Value") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.ToTable("ChecklistItems"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSystemTemplate") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("OrganizationId"); - - b.ToTable("ChecklistTemplates"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0001-000000000001"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Standard property showing checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Property Tour", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000002"), - Category = "MoveIn", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-in inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-In", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000003"), - Category = "MoveOut", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-out inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-Out", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000004"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Open house event checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Open House", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowsNotes") - .HasColumnType("INTEGER"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRequired") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.ToTable("ChecklistTemplateItems"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0002-000000000001"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Greeted prospect and verified appointment", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000002"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Reviewed property exterior and curb appeal", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000003"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Showed parking area/garage", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000004"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 4, - ItemText = "Toured living room/common areas", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000005"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 5, - ItemText = "Showed all bedrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000006"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 6, - ItemText = "Showed all bathrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000007"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 7, - ItemText = "Toured kitchen and demonstrated appliances", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000008"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 8, - ItemText = "Explained which appliances are included", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000009"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 9, - ItemText = "Explained HVAC system and thermostat controls", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000010"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 10, - ItemText = "Reviewed utility responsibilities (tenant vs landlord)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000011"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 11, - ItemText = "Showed water heater location", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000012"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 12, - ItemText = "Showed storage areas (closets, attic, basement)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000013"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 13, - ItemText = "Showed laundry facilities", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000014"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 14, - ItemText = "Showed outdoor space (yard, patio, balcony)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000015"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 15, - ItemText = "Discussed monthly rent amount", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000016"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 16, - ItemText = "Explained security deposit and move-in costs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000017"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 17, - ItemText = "Reviewed lease term length and start date", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000018"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 18, - ItemText = "Explained pet policy", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000019"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 19, - ItemText = "Explained application process and requirements", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000020"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 20, - ItemText = "Reviewed screening process (background, credit check)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000021"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 21, - ItemText = "Answered all prospect questions", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000022"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 22, - ItemText = "Prospect Interest Level", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = true, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000023"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 23, - ItemText = "Overall showing feedback and notes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000024"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Document property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000025"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect keys and access codes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000026"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Review lease terms with tenant", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000027"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Inspect property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000028"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect all keys and access devices", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000029"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Document damages and needed repairs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000030"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Set up signage and directional markers", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000031"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Prepare information packets", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000032"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Set up visitor sign-in sheet", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("DocumentType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("FileData") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FilePath") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FileSize") - .HasColumnType("INTEGER"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PaymentId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActionItemsRequired") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("BathroomSinkGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomSinkNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomToiletGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomToiletNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomTubShowerGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomTubShowerNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomVentilationGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomVentilationNotes") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CarbonMonoxideDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("CarbonMonoxideDetectorsNotes") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("ElectricalSystemGood") - .HasColumnType("INTEGER"); - - b.Property("ElectricalSystemNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorFoundationGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorFoundationNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorGuttersGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorGuttersNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorRoofGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorRoofNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorSidingGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorSidingNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("HvacSystemGood") - .HasColumnType("INTEGER"); - - b.Property("HvacSystemNotes") - .HasColumnType("TEXT"); - - b.Property("InspectedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InspectionType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InteriorCeilingsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorCeilingsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorFloorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorFloorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWallsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWallsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCabinetsGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCabinetsNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCountersGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCountersNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenSinkPlumbingGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenSinkPlumbingNotes") - .HasColumnType("TEXT"); - - b.Property("LandscapingGood") - .HasColumnType("INTEGER"); - - b.Property("LandscapingNotes") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OverallCondition") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PlumbingSystemGood") - .HasColumnType("INTEGER"); - - b.Property("PlumbingSystemNotes") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SmokeDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("SmokeDetectorsNotes") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.ToTable("Inspections"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AmountPaid") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("DueOn") - .HasColumnType("TEXT"); - - b.Property("InvoiceNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InvoicedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("LateFeeApplied") - .HasColumnType("INTEGER"); - - b.Property("LateFeeAppliedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("ReminderSent") - .HasColumnType("INTEGER"); - - b.Property("ReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceNumber") - .IsUnique(); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DeclinedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpectedMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseOfferId") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PreviousLeaseId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProposedRenewalRent") - .HasColumnType("decimal(18,2)"); - - b.Property("RenewalNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("RenewalNotificationSent") - .HasColumnType("INTEGER"); - - b.Property("RenewalNotificationSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalNumber") - .HasColumnType("INTEGER"); - - b.Property("RenewalOfferedOn") - .HasColumnType("TEXT"); - - b.Property("RenewalReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalResponseOn") - .HasColumnType("TEXT"); - - b.Property("RenewalStatus") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("SignedOn") - .HasColumnType("TEXT"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TerminationNoticedOn") - .HasColumnType("TEXT"); - - b.Property("TerminationReason") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConvertedLeaseId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("RespondedOn") - .HasColumnType("TEXT"); - - b.Property("ResponseNotes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasColumnType("decimal(18,2)"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("RentalApplicationId"); - - b.ToTable("LeaseOffers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AssignedTo") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("EstimatedCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RequestedBy") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequestedByEmail") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("RequestedByPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("RequestedOn") - .HasColumnType("TEXT"); - - b.Property("ResolutionNotes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("LeaseId"); - - b.HasIndex("Priority"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RequestedOn"); - - b.HasIndex("Status"); - - b.ToTable("MaintenanceRequests"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Note", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(5000) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UserFullName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Notes"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyDigestTime") - .HasColumnType("TEXT"); - - b.Property("EmailAddress") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmailApplicationStatusChange") - .HasColumnType("INTEGER"); - - b.Property("EmailInspectionScheduled") - .HasColumnType("INTEGER"); - - b.Property("EmailLeaseExpiring") - .HasColumnType("INTEGER"); - - b.Property("EmailMaintenanceUpdate") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentReceived") - .HasColumnType("INTEGER"); - - b.Property("EnableDailyDigest") - .HasColumnType("INTEGER"); - - b.Property("EnableEmailNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableInAppNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableSMSNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableWeeklyDigest") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("SMSLeaseExpiringUrgent") - .HasColumnType("INTEGER"); - - b.Property("SMSMaintenanceEmergency") - .HasColumnType("INTEGER"); - - b.Property("SMSPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("WeeklyDigestDay") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("NotificationPreferences"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DisplayName") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OwnerId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("DailyLimit") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentToday") - .HasColumnType("INTEGER"); - - b.Property("EnableSsl") - .HasColumnType("INTEGER"); - - b.Property("FromEmail") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FromName") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsEmailEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastEmailSentOn") - .HasColumnType("TEXT"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastErrorOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyLimit") - .HasColumnType("INTEGER"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PlanType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("SendGridApiKeyEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("SmtpPort") - .HasColumnType("INTEGER"); - - b.Property("SmtpServer") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("Username") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationEmailSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccountBalance") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("AccountType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CostPerSMS") - .HasPrecision(18, 4) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSMSEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastSMSSentOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("SMSSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("SMSSentToday") - .HasColumnType("INTEGER"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("TwilioAccountSidEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioAuthTokenEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioPhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSMSSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowTenantDividendChoice") - .HasColumnType("INTEGER"); - - b.Property("ApplicationExpirationDays") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("AutoCalculateSecurityDeposit") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("DefaultDividendPaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("DividendDistributionMonth") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAutoApply") - .HasColumnType("INTEGER"); - - b.Property("LateFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("LateFeeGracePeriodDays") - .HasColumnType("INTEGER"); - - b.Property("LateFeePercentage") - .HasPrecision(5, 4) - .HasColumnType("TEXT"); - - b.Property("MaxLateFeeAmount") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("PaymentReminderDaysBefore") - .HasColumnType("INTEGER"); - - b.Property("PaymentReminderEnabled") - .HasColumnType("INTEGER"); - - b.Property("RefundProcessingDays") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositInvestmentEnabled") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositMultiplier") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TourNoShowGracePeriodHours") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("GrantedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("GrantedOn") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RevokedOn") - .HasColumnType("TEXT"); - - b.Property("Role") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Role"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Bathrooms") - .HasMaxLength(3) - .HasColumnType("decimal(3,1)"); - - b.Property("Bedrooms") - .HasMaxLength(3) - .HasColumnType("INTEGER"); - - b.Property("City") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("IsAvailable") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastRoutineInspectionDate") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("NextRoutineInspectionDueDate") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RoutineInspectionIntervalMonths") - .HasColumnType("INTEGER"); - - b.Property("SquareFeet") - .HasMaxLength(7) - .HasColumnType("INTEGER"); - - b.Property("State") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("UnitNumber") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Address"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Properties"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("DesiredMoveInDate") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FirstContactedOn") - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationState") - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("InterestedPropertyId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Source") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("InterestedPropertyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.ToTable("ProspectiveTenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ApplicationFeePaid") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeePaidOn") - .HasColumnType("TEXT"); - - b.Property("ApplicationFeePaymentMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CurrentAddress") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("CurrentCity") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CurrentRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrentState") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("CurrentZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("DecidedOn") - .HasColumnType("TEXT"); - - b.Property("DecisionBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DenialReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("EmployerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmploymentLengthMonths") - .HasColumnType("INTEGER"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("JobTitle") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LandlordName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LandlordPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyIncome") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("Reference1Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference1Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference1Relationship") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Reference2Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference2Phone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference2Relationship") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AppliedOn"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("Status"); - - b.ToTable("RentalApplications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Repair", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("ContactId") - .HasColumnType("TEXT"); - - b.Property("ContactPerson") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ContractorId") - .HasColumnType("TEXT"); - - b.Property("ContractorName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ContractorPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Cost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MaintenanceRequestId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PartsReplaced") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RepairType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("WarrantyApplies") - .HasColumnType("INTEGER"); - - b.Property("WarrantyExpiresOn") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("LeaseId"); - - b.HasIndex("MaintenanceRequestId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RepairType"); - - b.ToTable("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SchemaVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("SchemaVersions"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateReceived") - .HasColumnType("TEXT"); - - b.Property("DeductionsAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DeductionsReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("InInvestmentPool") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PoolEntryDate") - .HasColumnType("TEXT"); - - b.Property("PoolExitDate") - .HasColumnType("TEXT"); - - b.Property("RefundAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("RefundMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RefundProcessedDate") - .HasColumnType("TEXT"); - - b.Property("RefundReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TransactionReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InInvestmentPool"); - - b.HasIndex("LeaseId") - .IsUnique(); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.ToTable("SecurityDeposits"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BaseDividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ChoiceMadeOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("InvestmentPoolId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MailingAddress") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("MonthsInPool") - .HasColumnType("INTEGER"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentProcessedOn") - .HasColumnType("TEXT"); - - b.Property("PaymentReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProrationFactor") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("SecurityDepositId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("InvestmentPoolId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("SecurityDepositId"); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.HasIndex("Year"); - - b.ToTable("SecurityDepositDividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveLeaseCount") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendPerLease") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DividendsCalculatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendsDistributedOn") - .HasColumnType("TEXT"); - - b.Property("EndingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OrganizationShare") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ReturnRate") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("StartingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantShareTotal") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TotalEarnings") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.HasIndex("Year") - .IsUnique(); - - b.ToTable("SecurityDepositInvestmentPools"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactPhone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("IdentificationNumber") - .IsUnique(); - - b.HasIndex("OrganizationId"); - - b.ToTable("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("ConductedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("Feedback") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("InterestLevel") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("ScheduledOn"); - - b.HasIndex("Status"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.UserProfile", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveOrganizationId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ActiveOrganizationId"); - - b.HasIndex("Email"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserProfiles"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.WorkflowAuditLog", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Action") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FromStatus") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Metadata") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PerformedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PerformedOn") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("ToStatus") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Action"); - - b.HasIndex("EntityId"); - - b.HasIndex("EntityType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PerformedBy"); - - b.HasIndex("PerformedOn"); - - b.HasIndex("EntityType", "EntityId"); - - b.ToTable("WorkflowAuditLogs"); - }); - - modelBuilder.Entity("Notification", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EmailError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("EmailSent") - .HasColumnType("INTEGER"); - - b.Property("EmailSentOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRead") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ReadOn") - .HasColumnType("TEXT"); - - b.Property("RecipientUserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RelatedEntityId") - .HasColumnType("TEXT"); - - b.Property("RelatedEntityType") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SMSError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SMSSent") - .HasColumnType("INTEGER"); - - b.Property("SMSSentOn") - .HasColumnType("TEXT"); - - b.Property("SendEmail") - .HasColumnType("INTEGER"); - - b.Property("SendInApp") - .HasColumnType("INTEGER"); - - b.Property("SendSMS") - .HasColumnType("INTEGER"); - - b.Property("SentOn") - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsRead"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("SentOn"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithOne("Screening") - .HasForeignKey("Aquiis.Core.Entities.ApplicationScreening", "RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Checklists") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ChecklistTemplate"); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany("Items") - .HasForeignKey("ChecklistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Checklist"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Items") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ChecklistTemplate"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany() - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Documents") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Payment", "Payment") - .WithMany() - .HasForeignKey("PaymentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Documents") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Invoice"); - - b.Navigation("Lease"); - - b.Navigation("Payment"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Invoices") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Leases") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Leases") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany("Leases") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany() - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithMany() - .HasForeignKey("RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany("OrganizationUsers") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany("Payments") - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Invoice"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Properties") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "InterestedProperty") - .WithMany() - .HasForeignKey("InterestedPropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("InterestedProperty"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Applications") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Repair", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.MaintenanceRequest", "MaintenanceRequest") - .WithMany("Repairs") - .HasForeignKey("MaintenanceRequestId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("MaintenanceRequest"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.HasOne("Aquiis.Core.Entities.SecurityDepositInvestmentPool", "InvestmentPool") - .WithMany("Dividends") - .HasForeignKey("InvestmentPoolId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.SecurityDeposit", "SecurityDeposit") - .WithMany("Dividends") - .HasForeignKey("SecurityDepositId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvestmentPool"); - - b.Navigation("Lease"); - - b.Navigation("SecurityDeposit"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Tenants") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany() - .HasForeignKey("ChecklistId"); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Tours") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checklist"); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Notification", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Navigation("Checklists"); - - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Navigation("Documents"); - - b.Navigation("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Navigation("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Navigation("Leases"); - - b.Navigation("OrganizationUsers"); - - b.Navigation("Properties"); - - b.Navigation("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Navigation("Documents"); - - b.Navigation("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Navigation("Applications"); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Navigation("Screening"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Navigation("Leases"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260122152750_RenameCompletedByToContactPersonAndAddContractorId.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260122152750_RenameCompletedByToContactPersonAndAddContractorId.cs deleted file mode 100644 index 5a7a776..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260122152750_RenameCompletedByToContactPersonAndAddContractorId.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - /// - public partial class RenameCompletedByToContactPersonAndAddContractorId : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "CompletedBy", - table: "Repairs", - newName: "ContactPerson"); - - migrationBuilder.AddColumn( - name: "ContractorId", - table: "Repairs", - type: "TEXT", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ContractorId", - table: "Repairs"); - - migrationBuilder.RenameColumn( - name: "ContactPerson", - table: "Repairs", - newName: "CompletedBy"); - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260127184357_AddTestEntityAndPropertyTestField.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260127184357_AddTestEntityAndPropertyTestField.Designer.cs deleted file mode 100644 index afd2770..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260127184357_AddTestEntityAndPropertyTestField.Designer.cs +++ /dev/null @@ -1,4314 +0,0 @@ -// -using System; -using Aquiis.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260127184357_AddTestEntityAndPropertyTestField")] - partial class AddTestEntityAndPropertyTestField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "10.0.1"); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("BackgroundCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("BackgroundCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckCompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreditCheckNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("CreditCheckPassed") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequested") - .HasColumnType("INTEGER"); - - b.Property("CreditCheckRequestedOn") - .HasColumnType("TEXT"); - - b.Property("CreditScore") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OverallResult") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("ResultNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OverallResult"); - - b.HasIndex("RentalApplicationId") - .IsUnique(); - - b.ToTable("ApplicationScreenings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Color") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("EndOn") - .HasColumnType("TEXT"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Location") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityId") - .HasColumnType("TEXT"); - - b.Property("SourceEntityType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("StartOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("EventType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("SourceEntityId"); - - b.HasIndex("StartOn"); - - b.HasIndex("SourceEntityType", "SourceEntityId"); - - b.ToTable("CalendarEvents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AutoCreateEvents") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultColor") - .HasColumnType("TEXT"); - - b.Property("DefaultIcon") - .HasColumnType("TEXT"); - - b.Property("DisplayOrder") - .HasColumnType("INTEGER"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ShowOnCalendar") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationId", "EntityType") - .IsUnique(); - - b.ToTable("CalendarSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("ChecklistType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CompletedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.HasIndex("ChecklistType"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("Status"); - - b.ToTable("Checklists"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsChecked") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhotoUrl") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.Property("Value") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.ToTable("ChecklistItems"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSystemTemplate") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("OrganizationId"); - - b.ToTable("ChecklistTemplates"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0001-000000000001"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Standard property showing checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Property Tour", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000002"), - Category = "MoveIn", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-in inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-In", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000003"), - Category = "MoveOut", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Move-out inspection checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Move-Out", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }, - new - { - Id = new Guid("00000000-0000-0000-0001-000000000004"), - Category = "Tour", - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - Description = "Open house event checklist", - IsDeleted = false, - IsSystemTemplate = true, - Name = "Open House", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000") - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowsNotes") - .HasColumnType("INTEGER"); - - b.Property("CategorySection") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ChecklistTemplateId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRequired") - .HasColumnType("INTEGER"); - - b.Property("ItemOrder") - .HasColumnType("INTEGER"); - - b.Property("ItemText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RequiresValue") - .HasColumnType("INTEGER"); - - b.Property("SectionOrder") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistTemplateId"); - - b.ToTable("ChecklistTemplateItems"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0002-000000000001"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Greeted prospect and verified appointment", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000002"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Reviewed property exterior and curb appeal", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000003"), - AllowsNotes = true, - CategorySection = "Arrival & Introduction", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Showed parking area/garage", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000004"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 4, - ItemText = "Toured living room/common areas", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000005"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 5, - ItemText = "Showed all bedrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000006"), - AllowsNotes = true, - CategorySection = "Interior Tour", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 6, - ItemText = "Showed all bathrooms", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000007"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 7, - ItemText = "Toured kitchen and demonstrated appliances", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000008"), - AllowsNotes = true, - CategorySection = "Kitchen & Appliances", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 8, - ItemText = "Explained which appliances are included", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000009"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 9, - ItemText = "Explained HVAC system and thermostat controls", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000010"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 10, - ItemText = "Reviewed utility responsibilities (tenant vs landlord)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000011"), - AllowsNotes = true, - CategorySection = "Utilities & Systems", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 11, - ItemText = "Showed water heater location", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000012"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 12, - ItemText = "Showed storage areas (closets, attic, basement)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000013"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 13, - ItemText = "Showed laundry facilities", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000014"), - AllowsNotes = true, - CategorySection = "Storage & Amenities", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 14, - ItemText = "Showed outdoor space (yard, patio, balcony)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000015"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 15, - ItemText = "Discussed monthly rent amount", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000016"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 16, - ItemText = "Explained security deposit and move-in costs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000017"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 17, - ItemText = "Reviewed lease term length and start date", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000018"), - AllowsNotes = true, - CategorySection = "Lease Terms", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 18, - ItemText = "Explained pet policy", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000019"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 19, - ItemText = "Explained application process and requirements", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000020"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 20, - ItemText = "Reviewed screening process (background, credit check)", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000021"), - AllowsNotes = true, - CategorySection = "Next Steps", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 21, - ItemText = "Answered all prospect questions", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000022"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 22, - ItemText = "Prospect Interest Level", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = true, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000023"), - AllowsNotes = true, - CategorySection = "Assessment", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000001"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 23, - ItemText = "Overall showing feedback and notes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000024"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Document property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000025"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect keys and access codes", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000026"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000002"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Review lease terms with tenant", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000027"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Inspect property condition", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000028"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Collect all keys and access devices", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000029"), - AllowsNotes = true, - CategorySection = "General", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000003"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Document damages and needed repairs", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000030"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 1, - ItemText = "Set up signage and directional markers", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000031"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 2, - ItemText = "Prepare information packets", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0002-000000000032"), - AllowsNotes = true, - CategorySection = "Preparation", - ChecklistTemplateId = new Guid("00000000-0000-0000-0001-000000000004"), - CreatedBy = "", - CreatedOn = new DateTime(2025, 11, 30, 0, 0, 0, 0, DateTimeKind.Utc), - IsDeleted = false, - IsRequired = true, - ItemOrder = 3, - ItemText = "Set up visitor sign-in sheet", - OrganizationId = new Guid("00000000-0000-0000-0000-000000000000"), - RequiresValue = false, - SectionOrder = 1 - }); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("DocumentType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("FileData") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FilePath") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("FileSize") - .HasColumnType("INTEGER"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PaymentId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActionItemsRequired") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("BathroomSinkGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomSinkNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomToiletGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomToiletNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomTubShowerGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomTubShowerNotes") - .HasColumnType("TEXT"); - - b.Property("BathroomVentilationGood") - .HasColumnType("INTEGER"); - - b.Property("BathroomVentilationNotes") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CarbonMonoxideDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("CarbonMonoxideDetectorsNotes") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("ElectricalSystemGood") - .HasColumnType("INTEGER"); - - b.Property("ElectricalSystemNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorFoundationGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorFoundationNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorGuttersGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorGuttersNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorRoofGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorRoofNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorSidingGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorSidingNotes") - .HasColumnType("TEXT"); - - b.Property("ExteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("ExteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("GeneralNotes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("HvacSystemGood") - .HasColumnType("INTEGER"); - - b.Property("HvacSystemNotes") - .HasColumnType("TEXT"); - - b.Property("InspectedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("InspectionType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InteriorCeilingsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorCeilingsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorDoorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorDoorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorFloorsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorFloorsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWallsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWallsNotes") - .HasColumnType("TEXT"); - - b.Property("InteriorWindowsGood") - .HasColumnType("INTEGER"); - - b.Property("InteriorWindowsNotes") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenAppliancesNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCabinetsGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCabinetsNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenCountersGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenCountersNotes") - .HasColumnType("TEXT"); - - b.Property("KitchenSinkPlumbingGood") - .HasColumnType("INTEGER"); - - b.Property("KitchenSinkPlumbingNotes") - .HasColumnType("TEXT"); - - b.Property("LandscapingGood") - .HasColumnType("INTEGER"); - - b.Property("LandscapingNotes") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OverallCondition") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PlumbingSystemGood") - .HasColumnType("INTEGER"); - - b.Property("PlumbingSystemNotes") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("SmokeDetectorsGood") - .HasColumnType("INTEGER"); - - b.Property("SmokeDetectorsNotes") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("PropertyId"); - - b.ToTable("Inspections"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AmountPaid") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("DueOn") - .HasColumnType("TEXT"); - - b.Property("InvoiceNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("InvoicedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("LateFeeApplied") - .HasColumnType("INTEGER"); - - b.Property("LateFeeAppliedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("ReminderSent") - .HasColumnType("INTEGER"); - - b.Property("ReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceNumber") - .IsUnique(); - - b.HasIndex("LeaseId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DeclinedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpectedMoveOutDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseOfferId") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PreviousLeaseId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProposedRenewalRent") - .HasColumnType("decimal(18,2)"); - - b.Property("RenewalNotes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("RenewalNotificationSent") - .HasColumnType("INTEGER"); - - b.Property("RenewalNotificationSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalNumber") - .HasColumnType("INTEGER"); - - b.Property("RenewalOfferedOn") - .HasColumnType("TEXT"); - - b.Property("RenewalReminderSentOn") - .HasColumnType("TEXT"); - - b.Property("RenewalResponseOn") - .HasColumnType("TEXT"); - - b.Property("RenewalStatus") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("SignedOn") - .HasColumnType("TEXT"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TerminationNoticedOn") - .HasColumnType("TEXT"); - - b.Property("TerminationReason") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("TenantId"); - - b.ToTable("Leases"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConvertedLeaseId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EndDate") - .HasColumnType("TEXT"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasColumnType("decimal(18,2)"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OfferedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("RentalApplicationId") - .HasColumnType("TEXT"); - - b.Property("RespondedOn") - .HasColumnType("TEXT"); - - b.Property("ResponseNotes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SecurityDeposit") - .HasColumnType("decimal(18,2)"); - - b.Property("StartDate") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Terms") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("RentalApplicationId"); - - b.ToTable("LeaseOffers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActualCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("AssignedTo") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("EstimatedCost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RequestedBy") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("RequestedByEmail") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("RequestedByPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("RequestedOn") - .HasColumnType("TEXT"); - - b.Property("ResolutionNotes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("LeaseId"); - - b.HasIndex("Priority"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RequestedOn"); - - b.HasIndex("Status"); - - b.ToTable("MaintenanceRequests"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Note", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(5000) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UserFullName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Notes"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyDigestTime") - .HasColumnType("TEXT"); - - b.Property("EmailAddress") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmailApplicationStatusChange") - .HasColumnType("INTEGER"); - - b.Property("EmailInspectionScheduled") - .HasColumnType("INTEGER"); - - b.Property("EmailLeaseExpiring") - .HasColumnType("INTEGER"); - - b.Property("EmailMaintenanceUpdate") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("EmailPaymentReceived") - .HasColumnType("INTEGER"); - - b.Property("EnableDailyDigest") - .HasColumnType("INTEGER"); - - b.Property("EnableEmailNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableInAppNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableSMSNotifications") - .HasColumnType("INTEGER"); - - b.Property("EnableWeeklyDigest") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("SMSLeaseExpiringUrgent") - .HasColumnType("INTEGER"); - - b.Property("SMSMaintenanceEmergency") - .HasColumnType("INTEGER"); - - b.Property("SMSPaymentDue") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("WeeklyDigestDay") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("NotificationPreferences"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DisplayName") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OwnerId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("DailyLimit") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("EmailsSentToday") - .HasColumnType("INTEGER"); - - b.Property("EnableSsl") - .HasColumnType("INTEGER"); - - b.Property("FromEmail") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FromName") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsEmailEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastEmailSentOn") - .HasColumnType("TEXT"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastErrorOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyLimit") - .HasColumnType("INTEGER"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PlanType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("SendGridApiKeyEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("SmtpPort") - .HasColumnType("INTEGER"); - - b.Property("SmtpServer") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("Username") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationEmailSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccountBalance") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("AccountType") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CostPerSMS") - .HasPrecision(18, 4) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DailyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsSMSEnabled") - .HasColumnType("INTEGER"); - - b.Property("IsVerified") - .HasColumnType("INTEGER"); - - b.Property("LastError") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastSMSSentOn") - .HasColumnType("TEXT"); - - b.Property("LastVerifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyCountResetOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ProviderName") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("SMSSentThisMonth") - .HasColumnType("INTEGER"); - - b.Property("SMSSentToday") - .HasColumnType("INTEGER"); - - b.Property("StatsLastUpdatedOn") - .HasColumnType("TEXT"); - - b.Property("TwilioAccountSidEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioAuthTokenEncrypted") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("TwilioPhoneNumber") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSMSSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSettings", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AllowTenantDividendChoice") - .HasColumnType("INTEGER"); - - b.Property("ApplicationExpirationDays") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("AutoCalculateSecurityDeposit") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DefaultApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("DefaultDividendPaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("DividendDistributionMonth") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LateFeeAutoApply") - .HasColumnType("INTEGER"); - - b.Property("LateFeeEnabled") - .HasColumnType("INTEGER"); - - b.Property("LateFeeGracePeriodDays") - .HasColumnType("INTEGER"); - - b.Property("LateFeePercentage") - .HasPrecision(5, 4) - .HasColumnType("TEXT"); - - b.Property("MaxLateFeeAmount") - .HasPrecision(18, 2) - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("PaymentReminderDaysBefore") - .HasColumnType("INTEGER"); - - b.Property("PaymentReminderEnabled") - .HasColumnType("INTEGER"); - - b.Property("RefundProcessingDays") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositInvestmentEnabled") - .HasColumnType("INTEGER"); - - b.Property("SecurityDepositMultiplier") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TourNoShowGracePeriodHours") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationSettings"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("GrantedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("GrantedOn") - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("RevokedOn") - .HasColumnType("TEXT"); - - b.Property("Role") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IsActive"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Role"); - - b.HasIndex("UserId", "OrganizationId") - .IsUnique(); - - b.ToTable("OrganizationUsers"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DocumentId") - .HasColumnType("TEXT"); - - b.Property("InvoiceId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaidOn") - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InvoiceId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Bathrooms") - .HasMaxLength(3) - .HasColumnType("decimal(3,1)"); - - b.Property("Bedrooms") - .HasMaxLength(3) - .HasColumnType("INTEGER"); - - b.Property("City") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("IsAvailable") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastRoutineInspectionDate") - .HasColumnType("TEXT"); - - b.Property("MonthlyRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("NextRoutineInspectionDueDate") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RoutineInspectionIntervalMonths") - .HasColumnType("INTEGER"); - - b.Property("SquareFeet") - .HasMaxLength(7) - .HasColumnType("INTEGER"); - - b.Property("State") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TestField") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("UnitNumber") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Address"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Properties"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("DesiredMoveInDate") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("FirstContactedOn") - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationState") - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("InterestedPropertyId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Source") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("InterestedPropertyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.ToTable("ProspectiveTenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ApplicationFee") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ApplicationFeePaid") - .HasColumnType("INTEGER"); - - b.Property("ApplicationFeePaidOn") - .HasColumnType("TEXT"); - - b.Property("ApplicationFeePaymentMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("CurrentAddress") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("CurrentCity") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CurrentRent") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrentState") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("TEXT"); - - b.Property("CurrentZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("TEXT"); - - b.Property("DecidedOn") - .HasColumnType("TEXT"); - - b.Property("DecisionBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("DenialReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("EmployerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmploymentLengthMonths") - .HasColumnType("INTEGER"); - - b.Property("ExpiresOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("JobTitle") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LandlordName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LandlordPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("MonthlyIncome") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("Reference1Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference1Phone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference1Relationship") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Reference2Name") - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Reference2Phone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Reference2Relationship") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AppliedOn"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("Status"); - - b.ToTable("RentalApplications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Repair", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CompletedOn") - .HasColumnType("TEXT"); - - b.Property("ContactId") - .HasColumnType("TEXT"); - - b.Property("ContactPerson") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ContractorId") - .HasColumnType("TEXT"); - - b.Property("ContractorName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ContractorPhone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("Cost") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MaintenanceRequestId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PartsReplaced") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("RepairType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("WarrantyApplies") - .HasColumnType("INTEGER"); - - b.Property("WarrantyExpiresOn") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("CompletedOn"); - - b.HasIndex("LeaseId"); - - b.HasIndex("MaintenanceRequestId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("RepairType"); - - b.ToTable("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SchemaVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AppliedOn") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("SchemaVersions"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Amount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateReceived") - .HasColumnType("TEXT"); - - b.Property("DeductionsAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DeductionsReason") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("InInvestmentPool") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PoolEntryDate") - .HasColumnType("TEXT"); - - b.Property("PoolExitDate") - .HasColumnType("TEXT"); - - b.Property("RefundAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("RefundMethod") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("RefundProcessedDate") - .HasColumnType("TEXT"); - - b.Property("RefundReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("TransactionReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("InInvestmentPool"); - - b.HasIndex("LeaseId") - .IsUnique(); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.ToTable("SecurityDeposits"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BaseDividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("ChoiceMadeOn") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendAmount") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("InvestmentPoolId") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LeaseId") - .HasColumnType("TEXT"); - - b.Property("MailingAddress") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("MonthsInPool") - .HasColumnType("INTEGER"); - - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("PaymentProcessedOn") - .HasColumnType("TEXT"); - - b.Property("PaymentReference") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("ProrationFactor") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("SecurityDepositId") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantId") - .HasColumnType("TEXT"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("InvestmentPoolId"); - - b.HasIndex("LeaseId"); - - b.HasIndex("SecurityDepositId"); - - b.HasIndex("Status"); - - b.HasIndex("TenantId"); - - b.HasIndex("Year"); - - b.ToTable("SecurityDepositDividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveLeaseCount") - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendPerLease") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("DividendsCalculatedOn") - .HasColumnType("TEXT"); - - b.Property("DividendsDistributedOn") - .HasColumnType("TEXT"); - - b.Property("EndingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("OrganizationShare") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("OrganizationSharePercentage") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ReturnRate") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("StartingBalance") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("TenantShareTotal") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("TotalEarnings") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("Year") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("Status"); - - b.HasIndex("Year") - .IsUnique(); - - b.ToTable("SecurityDepositInvestmentPools"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DateOfBirth") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("EmergencyContactPhone") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IdentificationNumber") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("IsActive") - .HasColumnType("INTEGER"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Notes") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("IdentificationNumber") - .IsUnique(); - - b.HasIndex("OrganizationId"); - - b.ToTable("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.TestEntity", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("TestDate") - .HasColumnType("TEXT"); - - b.Property("TestDescription") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("TestFlag") - .HasColumnType("INTEGER"); - - b.Property("TestName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("TestNumber") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("TestName"); - - b.ToTable("TestEntities"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CalendarEventId") - .HasColumnType("TEXT"); - - b.Property("ChecklistId") - .HasColumnType("TEXT"); - - b.Property("ConductedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("DurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("Feedback") - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("InterestLevel") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PropertyId") - .HasColumnType("TEXT"); - - b.Property("ProspectiveTenantId") - .HasColumnType("TEXT"); - - b.Property("ScheduledOn") - .HasColumnType("TEXT"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ChecklistId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PropertyId"); - - b.HasIndex("ProspectiveTenantId"); - - b.HasIndex("ScheduledOn"); - - b.HasIndex("Status"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.UserProfile", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ActiveOrganizationId") - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("Email") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ActiveOrganizationId"); - - b.HasIndex("Email"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserProfiles"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.WorkflowAuditLog", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Action") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EntityId") - .HasColumnType("TEXT"); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("FromStatus") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Metadata") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("PerformedBy") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PerformedOn") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("ToStatus") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Action"); - - b.HasIndex("EntityId"); - - b.HasIndex("EntityType"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PerformedBy"); - - b.HasIndex("PerformedOn"); - - b.HasIndex("EntityType", "EntityId"); - - b.ToTable("WorkflowAuditLogs"); - }); - - modelBuilder.Entity("Notification", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("CreatedBy") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("EmailError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("EmailSent") - .HasColumnType("INTEGER"); - - b.Property("EmailSentOn") - .HasColumnType("TEXT"); - - b.Property("IsDeleted") - .HasColumnType("INTEGER"); - - b.Property("IsRead") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("ReadOn") - .HasColumnType("TEXT"); - - b.Property("RecipientUserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RelatedEntityId") - .HasColumnType("TEXT"); - - b.Property("RelatedEntityType") - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.Property("SMSError") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("SMSSent") - .HasColumnType("INTEGER"); - - b.Property("SMSSentOn") - .HasColumnType("TEXT"); - - b.Property("SendEmail") - .HasColumnType("INTEGER"); - - b.Property("SendInApp") - .HasColumnType("INTEGER"); - - b.Property("SendSMS") - .HasColumnType("INTEGER"); - - b.Property("SentOn") - .HasColumnType("TEXT"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsRead"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("SentOn"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ApplicationScreening", b => - { - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithOne("Screening") - .HasForeignKey("Aquiis.Core.Entities.ApplicationScreening", "RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.CalendarEvent", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Checklists") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ChecklistTemplate"); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistItem", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany("Items") - .HasForeignKey("ChecklistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Checklist"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplateItem", b => - { - b.HasOne("Aquiis.Core.Entities.ChecklistTemplate", "ChecklistTemplate") - .WithMany("Items") - .HasForeignKey("ChecklistTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ChecklistTemplate"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Document", b => - { - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany() - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Documents") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Payment", "Payment") - .WithMany() - .HasForeignKey("PaymentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Documents") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Invoice"); - - b.Navigation("Lease"); - - b.Navigation("Payment"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Inspection", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany("Invoices") - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Lease"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Leases") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Leases") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany("Leases") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Property"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.LeaseOffer", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany() - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.RentalApplication", "RentalApplication") - .WithMany() - .HasForeignKey("RentalApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - - b.Navigation("RentalApplication"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("MaintenanceRequests") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.NotificationPreferences", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationEmailSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationSMSSettings", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.OrganizationUser", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany("OrganizationUsers") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Payment", b => - { - b.HasOne("Aquiis.Core.Entities.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Invoice", "Invoice") - .WithMany("Payments") - .HasForeignKey("InvoiceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Invoice"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Properties") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "InterestedProperty") - .WithMany() - .HasForeignKey("InterestedPropertyId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("InterestedProperty"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Applications") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Repair", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.MaintenanceRequest", "MaintenanceRequest") - .WithMany("Repairs") - .HasForeignKey("MaintenanceRequestId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany("Repairs") - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("MaintenanceRequest"); - - b.Navigation("Property"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Lease"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositDividend", b => - { - b.HasOne("Aquiis.Core.Entities.SecurityDepositInvestmentPool", "InvestmentPool") - .WithMany("Dividends") - .HasForeignKey("InvestmentPoolId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Lease", "Lease") - .WithMany() - .HasForeignKey("LeaseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.SecurityDeposit", "SecurityDeposit") - .WithMany("Dividends") - .HasForeignKey("SecurityDepositId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.Tenant", "Tenant") - .WithMany() - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvestmentPool"); - - b.Navigation("Lease"); - - b.Navigation("SecurityDeposit"); - - b.Navigation("Tenant"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany("Tenants") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.TestEntity", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tour", b => - { - b.HasOne("Aquiis.Core.Entities.Checklist", "Checklist") - .WithMany() - .HasForeignKey("ChecklistId"); - - b.HasOne("Aquiis.Core.Entities.Property", "Property") - .WithMany() - .HasForeignKey("PropertyId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Aquiis.Core.Entities.ProspectiveTenant", "ProspectiveTenant") - .WithMany("Tours") - .HasForeignKey("ProspectiveTenantId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checklist"); - - b.Navigation("Property"); - - b.Navigation("ProspectiveTenant"); - }); - - modelBuilder.Entity("Notification", b => - { - b.HasOne("Aquiis.Core.Entities.Organization", "Organization") - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Checklist", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ChecklistTemplate", b => - { - b.Navigation("Checklists"); - - b.Navigation("Items"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Invoice", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Lease", b => - { - b.Navigation("Documents"); - - b.Navigation("Invoices"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.MaintenanceRequest", b => - { - b.Navigation("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Organization", b => - { - b.Navigation("Leases"); - - b.Navigation("OrganizationUsers"); - - b.Navigation("Properties"); - - b.Navigation("Tenants"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Property", b => - { - b.Navigation("Documents"); - - b.Navigation("Leases"); - - b.Navigation("MaintenanceRequests"); - - b.Navigation("Repairs"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.ProspectiveTenant", b => - { - b.Navigation("Applications"); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.RentalApplication", b => - { - b.Navigation("Screening"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDeposit", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.SecurityDepositInvestmentPool", b => - { - b.Navigation("Dividends"); - }); - - modelBuilder.Entity("Aquiis.Core.Entities.Tenant", b => - { - b.Navigation("Leases"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260127184357_AddTestEntityAndPropertyTestField.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260127184357_AddTestEntityAndPropertyTestField.cs deleted file mode 100644 index 281ef18..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260127184357_AddTestEntityAndPropertyTestField.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - /// - public partial class AddTestEntityAndPropertyTestField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "TestField", - table: "Properties", - type: "TEXT", - maxLength: 100, - nullable: true); - - migrationBuilder.CreateTable( - name: "TestEntities", - columns: table => new - { - Id = table.Column(type: "TEXT", nullable: false), - OrganizationId = table.Column(type: "TEXT", maxLength: 100, nullable: false), - TestName = table.Column(type: "TEXT", maxLength: 200, nullable: false), - TestDescription = table.Column(type: "TEXT", maxLength: 500, nullable: true), - TestDate = table.Column(type: "TEXT", nullable: true), - TestNumber = table.Column(type: "INTEGER", nullable: false), - TestFlag = table.Column(type: "INTEGER", nullable: false), - CreatedOn = table.Column(type: "TEXT", nullable: false), - CreatedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), - LastModifiedOn = table.Column(type: "TEXT", nullable: true), - LastModifiedBy = table.Column(type: "TEXT", maxLength: 100, nullable: true), - IsDeleted = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_TestEntities", x => x.Id); - table.ForeignKey( - name: "FK_TestEntities_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_TestEntities_IsDeleted", - table: "TestEntities", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_TestEntities_OrganizationId", - table: "TestEntities", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_TestEntities_TestName", - table: "TestEntities", - column: "TestName"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "TestEntities"); - - migrationBuilder.DropColumn( - name: "TestField", - table: "Properties"); - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260127190738_RemoveTestEntityAndPropertyTestField.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260127190738_RemoveTestEntityAndPropertyTestField.cs deleted file mode 100644 index 8a1c80e..0000000 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260127190738_RemoveTestEntityAndPropertyTestField.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Aquiis.Infrastructure.Data.Migrations -{ - /// - public partial class RemoveTestEntityAndPropertyTestField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "TestEntities"); - - migrationBuilder.DropColumn( - name: "TestField", - table: "Properties"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "TestField", - table: "Properties", - type: "TEXT", - maxLength: 100, - nullable: true); - - migrationBuilder.CreateTable( - name: "TestEntities", - columns: table => new - { - Id = table.Column(type: "TEXT", nullable: false), - CreatedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), - CreatedOn = table.Column(type: "TEXT", nullable: false), - IsDeleted = table.Column(type: "INTEGER", nullable: false), - LastModifiedBy = table.Column(type: "TEXT", maxLength: 100, nullable: true), - LastModifiedOn = table.Column(type: "TEXT", nullable: true), - OrganizationId = table.Column(type: "TEXT", maxLength: 100, nullable: false), - TestDate = table.Column(type: "TEXT", nullable: true), - TestDescription = table.Column(type: "TEXT", maxLength: 500, nullable: true), - TestFlag = table.Column(type: "INTEGER", nullable: false), - TestName = table.Column(type: "TEXT", maxLength: 200, nullable: false), - TestNumber = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_TestEntities", x => x.Id); - table.ForeignKey( - name: "FK_TestEntities_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_TestEntities_IsDeleted", - table: "TestEntities", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_TestEntities_OrganizationId", - table: "TestEntities", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_TestEntities_TestName", - table: "TestEntities", - column: "TestName"); - } - } -} diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260127190738_RemoveTestEntityAndPropertyTestField.Designer.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260128153724_v1_0_0_InitialCreate.Designer.cs similarity index 99% rename from 1-Aquiis.Infrastructure/Data/Migrations/20260127190738_RemoveTestEntityAndPropertyTestField.Designer.cs rename to 1-Aquiis.Infrastructure/Data/Migrations/20260128153724_v1_0_0_InitialCreate.Designer.cs index da1b16c..339a1cb 100644 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260127190738_RemoveTestEntityAndPropertyTestField.Designer.cs +++ b/1-Aquiis.Infrastructure/Data/Migrations/20260128153724_v1_0_0_InitialCreate.Designer.cs @@ -8,11 +8,11 @@ #nullable disable -namespace Aquiis.Infrastructure.Data.Migrations +namespace Aquiis.Infrastructure.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20260127190738_RemoveTestEntityAndPropertyTestField")] - partial class RemoveTestEntityAndPropertyTestField + [Migration("20260128153724_v1_0_0_InitialCreate")] + partial class v1_0_0_InitialCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/1-Aquiis.Infrastructure/Data/Migrations/20260104205822_InitialCreate.cs b/1-Aquiis.Infrastructure/Data/Migrations/20260128153724_v1_0_0_InitialCreate.cs similarity index 94% rename from 1-Aquiis.Infrastructure/Data/Migrations/20260104205822_InitialCreate.cs rename to 1-Aquiis.Infrastructure/Data/Migrations/20260128153724_v1_0_0_InitialCreate.cs index cc241fc..0f72c57 100644 --- a/1-Aquiis.Infrastructure/Data/Migrations/20260104205822_InitialCreate.cs +++ b/1-Aquiis.Infrastructure/Data/Migrations/20260128153724_v1_0_0_InitialCreate.cs @@ -5,10 +5,10 @@ #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional -namespace Aquiis.Infrastructure.Data.Migrations +namespace Aquiis.Infrastructure.Migrations { /// - public partial class InitialCreate : Migration + public partial class v1_0_0_InitialCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -182,6 +182,29 @@ protected override void Up(MigrationBuilder migrationBuilder) table.PrimaryKey("PK_SecurityDepositInvestmentPools", x => x.Id); }); + migrationBuilder.CreateTable( + name: "UserProfiles", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + UserId = table.Column(type: "TEXT", nullable: false), + Email = table.Column(type: "TEXT", nullable: false), + FirstName = table.Column(type: "TEXT", nullable: false), + LastName = table.Column(type: "TEXT", nullable: false), + PhoneNumber = table.Column(type: "TEXT", nullable: true), + OrganizationId = table.Column(type: "TEXT", nullable: true), + ActiveOrganizationId = table.Column(type: "TEXT", nullable: true), + CreatedOn = table.Column(type: "TEXT", nullable: false), + CreatedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), + LastModifiedOn = table.Column(type: "TEXT", nullable: true), + LastModifiedBy = table.Column(type: "TEXT", maxLength: 100, nullable: true), + IsDeleted = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserProfiles", x => x.Id); + }); + migrationBuilder.CreateTable( name: "WorkflowAuditLogs", columns: table => new @@ -409,6 +432,35 @@ protected override void Up(MigrationBuilder migrationBuilder) onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "OrganizationUsers", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + UserId = table.Column(type: "TEXT", nullable: false), + OrganizationId = table.Column(type: "TEXT", nullable: false), + Role = table.Column(type: "TEXT", nullable: false), + GrantedBy = table.Column(type: "TEXT", nullable: false), + GrantedOn = table.Column(type: "TEXT", nullable: false), + RevokedOn = table.Column(type: "TEXT", nullable: true), + IsActive = table.Column(type: "INTEGER", nullable: false), + CreatedBy = table.Column(type: "TEXT", nullable: false), + CreatedOn = table.Column(type: "TEXT", nullable: false), + LastModifiedBy = table.Column(type: "TEXT", nullable: true), + LastModifiedOn = table.Column(type: "TEXT", nullable: true), + IsDeleted = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_OrganizationUsers", x => x.Id); + table.ForeignKey( + name: "FK_OrganizationUsers_Organizations_OrganizationId", + column: x => x.OrganizationId, + principalTable: "Organizations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "Properties", columns: table => new @@ -480,35 +532,6 @@ protected override void Up(MigrationBuilder migrationBuilder) principalColumn: "Id"); }); - migrationBuilder.CreateTable( - name: "OrganizationUsers", - columns: table => new - { - Id = table.Column(type: "TEXT", nullable: false), - UserId = table.Column(type: "TEXT", nullable: false), - OrganizationId = table.Column(type: "TEXT", nullable: false), - Role = table.Column(type: "TEXT", nullable: false), - GrantedBy = table.Column(type: "TEXT", nullable: false), - GrantedOn = table.Column(type: "TEXT", nullable: false), - RevokedOn = table.Column(type: "TEXT", nullable: true), - IsActive = table.Column(type: "INTEGER", nullable: false), - CreatedBy = table.Column(type: "TEXT", nullable: false), - CreatedOn = table.Column(type: "TEXT", nullable: false), - LastModifiedBy = table.Column(type: "TEXT", nullable: true), - LastModifiedOn = table.Column(type: "TEXT", nullable: true), - IsDeleted = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_OrganizationUsers", x => x.Id); - table.ForeignKey( - name: "FK_OrganizationUsers_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "CalendarEvents", columns: table => new @@ -1200,6 +1223,7 @@ protected override void Up(MigrationBuilder migrationBuilder) { Id = table.Column(type: "TEXT", nullable: false), OrganizationId = table.Column(type: "TEXT", maxLength: 100, nullable: false), + PaymentNumber = table.Column(type: "TEXT", maxLength: 50, nullable: false), InvoiceId = table.Column(type: "TEXT", nullable: false), PaidOn = table.Column(type: "TEXT", nullable: false), Amount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), @@ -1235,6 +1259,58 @@ protected override void Up(MigrationBuilder migrationBuilder) onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Repairs", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + OrganizationId = table.Column(type: "TEXT", nullable: false), + PropertyId = table.Column(type: "TEXT", nullable: false), + MaintenanceRequestId = table.Column(type: "TEXT", nullable: true), + LeaseId = table.Column(type: "TEXT", nullable: true), + Description = table.Column(type: "TEXT", maxLength: 200, nullable: false), + RepairType = table.Column(type: "TEXT", maxLength: 50, nullable: false), + CompletedOn = table.Column(type: "TEXT", nullable: true), + Cost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + DurationMinutes = table.Column(type: "INTEGER", nullable: false), + ContractorName = table.Column(type: "TEXT", maxLength: 100, nullable: false), + ContactPerson = table.Column(type: "TEXT", maxLength: 100, nullable: false), + ContractorPhone = table.Column(type: "TEXT", maxLength: 20, nullable: false), + ContractorId = table.Column(type: "TEXT", nullable: true), + ContactId = table.Column(type: "TEXT", nullable: true), + Notes = table.Column(type: "TEXT", maxLength: 2000, nullable: false), + PartsReplaced = table.Column(type: "TEXT", maxLength: 500, nullable: false), + WarrantyApplies = table.Column(type: "INTEGER", nullable: false), + WarrantyExpiresOn = table.Column(type: "TEXT", nullable: true), + CreatedOn = table.Column(type: "TEXT", nullable: false), + CreatedBy = table.Column(type: "TEXT", maxLength: 100, nullable: false), + LastModifiedOn = table.Column(type: "TEXT", nullable: true), + LastModifiedBy = table.Column(type: "TEXT", maxLength: 100, nullable: true), + IsDeleted = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Repairs", x => x.Id); + table.ForeignKey( + name: "FK_Repairs_Leases_LeaseId", + column: x => x.LeaseId, + principalTable: "Leases", + principalColumn: "Id", + onDelete: ReferentialAction.SetNull); + table.ForeignKey( + name: "FK_Repairs_MaintenanceRequests_MaintenanceRequestId", + column: x => x.MaintenanceRequestId, + principalTable: "MaintenanceRequests", + principalColumn: "Id", + onDelete: ReferentialAction.SetNull); + table.ForeignKey( + name: "FK_Repairs_Properties_PropertyId", + column: x => x.PropertyId, + principalTable: "Properties", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "SecurityDepositDividends", columns: table => new @@ -1654,6 +1730,27 @@ protected override void Up(MigrationBuilder migrationBuilder) column: "OrganizationId", unique: true); + migrationBuilder.CreateIndex( + name: "IX_OrganizationUsers_IsActive", + table: "OrganizationUsers", + column: "IsActive"); + + migrationBuilder.CreateIndex( + name: "IX_OrganizationUsers_OrganizationId", + table: "OrganizationUsers", + column: "OrganizationId"); + + migrationBuilder.CreateIndex( + name: "IX_OrganizationUsers_Role", + table: "OrganizationUsers", + column: "Role"); + + migrationBuilder.CreateIndex( + name: "IX_OrganizationUsers_UserId_OrganizationId", + table: "OrganizationUsers", + columns: new[] { "UserId", "OrganizationId" }, + unique: true); + migrationBuilder.CreateIndex( name: "IX_Payments_DocumentId", table: "Payments", @@ -1724,6 +1821,36 @@ protected override void Up(MigrationBuilder migrationBuilder) table: "RentalApplications", column: "Status"); + migrationBuilder.CreateIndex( + name: "IX_Repairs_CompletedOn", + table: "Repairs", + column: "CompletedOn"); + + migrationBuilder.CreateIndex( + name: "IX_Repairs_LeaseId", + table: "Repairs", + column: "LeaseId"); + + migrationBuilder.CreateIndex( + name: "IX_Repairs_MaintenanceRequestId", + table: "Repairs", + column: "MaintenanceRequestId"); + + migrationBuilder.CreateIndex( + name: "IX_Repairs_OrganizationId", + table: "Repairs", + column: "OrganizationId"); + + migrationBuilder.CreateIndex( + name: "IX_Repairs_PropertyId", + table: "Repairs", + column: "PropertyId"); + + migrationBuilder.CreateIndex( + name: "IX_Repairs_RepairType", + table: "Repairs", + column: "RepairType"); + migrationBuilder.CreateIndex( name: "IX_SecurityDepositDividends_InvestmentPoolId", table: "SecurityDepositDividends", @@ -1839,24 +1966,29 @@ protected override void Up(MigrationBuilder migrationBuilder) column: "Status"); migrationBuilder.CreateIndex( - name: "IX_OrganizationUsers_IsActive", - table: "OrganizationUsers", - column: "IsActive"); + name: "IX_UserProfiles_ActiveOrganizationId", + table: "UserProfiles", + column: "ActiveOrganizationId"); migrationBuilder.CreateIndex( - name: "IX_OrganizationUsers_OrganizationId", - table: "OrganizationUsers", - column: "OrganizationId"); + name: "IX_UserProfiles_Email", + table: "UserProfiles", + column: "Email"); migrationBuilder.CreateIndex( - name: "IX_OrganizationUsers_Role", - table: "OrganizationUsers", - column: "Role"); + name: "IX_UserProfiles_IsDeleted", + table: "UserProfiles", + column: "IsDeleted"); migrationBuilder.CreateIndex( - name: "IX_OrganizationUsers_UserId_OrganizationId", - table: "OrganizationUsers", - columns: new[] { "UserId", "OrganizationId" }, + name: "IX_UserProfiles_OrganizationId", + table: "UserProfiles", + column: "OrganizationId"); + + migrationBuilder.CreateIndex( + name: "IX_UserProfiles_UserId", + table: "UserProfiles", + column: "UserId", unique: true); migrationBuilder.CreateIndex( @@ -1987,9 +2119,6 @@ protected override void Down(MigrationBuilder migrationBuilder) migrationBuilder.DropTable( name: "LeaseOffers"); - migrationBuilder.DropTable( - name: "MaintenanceRequests"); - migrationBuilder.DropTable( name: "Notes"); @@ -2008,6 +2137,12 @@ protected override void Down(MigrationBuilder migrationBuilder) migrationBuilder.DropTable( name: "OrganizationSMSSettings"); + migrationBuilder.DropTable( + name: "OrganizationUsers"); + + migrationBuilder.DropTable( + name: "Repairs"); + migrationBuilder.DropTable( name: "SchemaVersions"); @@ -2018,7 +2153,7 @@ protected override void Down(MigrationBuilder migrationBuilder) name: "Tours"); migrationBuilder.DropTable( - name: "OrganizationUsers"); + name: "UserProfiles"); migrationBuilder.DropTable( name: "WorkflowAuditLogs"); @@ -2026,6 +2161,9 @@ protected override void Down(MigrationBuilder migrationBuilder) migrationBuilder.DropTable( name: "RentalApplications"); + migrationBuilder.DropTable( + name: "MaintenanceRequests"); + migrationBuilder.DropTable( name: "SecurityDepositInvestmentPools"); diff --git a/1-Aquiis.Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/1-Aquiis.Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs index 095e216..87d374f 100644 --- a/1-Aquiis.Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/1-Aquiis.Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs @@ -7,7 +7,7 @@ #nullable disable -namespace Aquiis.Infrastructure.Data.Migrations +namespace Aquiis.Infrastructure.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot diff --git a/4-Aquiis.SimpleStart/Aquiis.SimpleStart.csproj b/4-Aquiis.SimpleStart/Aquiis.SimpleStart.csproj index 1f49b85..b4e4f6d 100644 --- a/4-Aquiis.SimpleStart/Aquiis.SimpleStart.csproj +++ b/4-Aquiis.SimpleStart/Aquiis.SimpleStart.csproj @@ -9,10 +9,10 @@ Data/Migrations - 0.2.0 - 0.2.0.0 - 0.2.0.0 - 0.2.0 + 1.0.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 @@ -25,6 +25,13 @@ PreserveNewest Assets\splash.svg + + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/4-Aquiis.SimpleStart/Assets/aquiis.desktop b/4-Aquiis.SimpleStart/Assets/aquiis.desktop new file mode 100644 index 0000000..818a790 --- /dev/null +++ b/4-Aquiis.SimpleStart/Assets/aquiis.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=Aquiis Property Management +Comment=Multi-tenant property management system for small landlords +Exec=AquiisPropertyManagement.AppImage +Icon=aquiis +Type=Application +Categories=Office;Finance; +Terminal=false +StartupWMClass=Aquiis Property Management +X-AppImage-Version=1.0.0 +X-AppImage-Name=Aquiis Property Management +X-AppImage-Arch=x86_64 +Keywords=property;management;landlord;rental;lease;tenant;invoice; diff --git a/4-Aquiis.SimpleStart/Assets/diagnose-startup.sh b/4-Aquiis.SimpleStart/Assets/diagnose-startup.sh new file mode 100755 index 0000000..b780a09 --- /dev/null +++ b/4-Aquiis.SimpleStart/Assets/diagnose-startup.sh @@ -0,0 +1,149 @@ +#!/bin/bash +# +# Aquiis Startup Performance Diagnostic Tool +# Profiles AppImage startup to identify bottlenecks +# + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +APPIMAGE="${1:-$HOME/Applications/AquiisPropertyManagement-1.0.0.AppImage}" + +if [ ! -f "$APPIMAGE" ]; then + echo -e "${RED}Error: AppImage not found at: $APPIMAGE${NC}" + echo "Usage: $0 [path-to-appimage]" + exit 1 +fi + +echo -e "${BLUE}Aquiis Startup Performance Diagnostic${NC}" +echo "==========================================" +echo "" +echo "AppImage: $(basename "$APPIMAGE")" +echo "Size: $(du -h "$APPIMAGE" | cut -f1)" +echo "" + +# Test 1: AppImage Mount Time +echo -e "${YELLOW}Test 1: AppImage FUSE Mount Time${NC}" +START=$(date +%s.%N) +"$APPIMAGE" --appimage-help > /dev/null 2>&1 +END=$(date +%s.%N) +MOUNT_TIME=$(echo "$END - $START" | bc) +echo " Mount time: ${MOUNT_TIME}s" +echo "" + +# Test 2: .NET Runtime Initialization +echo -e "${YELLOW}Test 2: .NET Runtime Startup${NC}" +echo " Starting AppImage with timestamps..." +START=$(date +%s.%N) + +# Launch AppImage and capture its PID +"$APPIMAGE" > /tmp/aquiis-startup.log 2>&1 & +APPIMAGE_PID=$! + +# Monitor for process start +DOTNET_PID="" +ELAPSED=0 +while [ -z "$DOTNET_PID" ] && [ $ELAPSED -lt 60 ]; do + sleep 0.5 + DOTNET_PID=$(pgrep -P $APPIMAGE_PID | head -1) + ELAPSED=$((ELAPSED + 1)) +done + +if [ -n "$DOTNET_PID" ]; then + DOTNET_START=$(date +%s.%N) + DOTNET_LAUNCH=$(echo "$DOTNET_START - $START" | bc) + echo " .NET process spawned: ${DOTNET_LAUNCH}s" + + # Wait for Kestrel to start (check for port 8888) + KESTREL_READY=0 + KESTREL_ELAPSED=0 + while [ $KESTREL_READY -eq 0 ] && [ $KESTREL_ELAPSED -lt 120 ]; do + if netstat -tunl 2>/dev/null | grep -q ":8888 " || ss -tunl 2>/dev/null | grep -q ":8888 "; then + KESTREL_READY=1 + KESTREL_END=$(date +%s.%N) + KESTREL_TIME=$(echo "$KESTREL_END - $DOTNET_START" | bc) + echo " Kestrel listening on port 8888: ${KESTREL_TIME}s" + fi + sleep 0.5 + KESTREL_ELAPSED=$((KESTREL_ELAPSED + 1)) + done + + if [ $KESTREL_READY -eq 0 ]; then + echo " ${RED}Warning: Kestrel did not start within 60s${NC}" + fi + + # Wait for Electron window + ELECTRON_PID="" + ELECTRON_ELAPSED=0 + while [ -z "$ELECTRON_PID" ] && [ $ELECTRON_ELAPSED -lt 120 ]; do + ELECTRON_PID=$(pgrep -f "electron.*aquiis" | head -1) + if [ -z "$ELECTRON_PID" ]; then + sleep 0.5 + ELECTRON_ELAPSED=$((ELECTRON_ELAPSED + 1)) + fi + done + + if [ -n "$ELECTRON_PID" ]; then + ELECTRON_END=$(date +%s.%N) + ELECTRON_TIME=$(echo "$ELECTRON_END - $START" | bc) + echo " Electron window opened: ${ELECTRON_TIME}s" + fi + + # Total startup time + TOTAL_END=$(date +%s.%N) + TOTAL_TIME=$(echo "$TOTAL_END - $START" | bc) + + echo "" + echo -e "${GREEN}Startup Timeline:${NC}" + echo " 1. AppImage mount: ${MOUNT_TIME}s" + echo " 2. .NET launch: ${DOTNET_LAUNCH}s" + echo " 3. Kestrel ready: ${KESTREL_TIME}s (at ${KESTREL_END}s total)" + echo " 4. Window open: ${ELECTRON_TIME}s" + echo "" + echo -e "${BLUE}Total startup: ${TOTAL_TIME}s${NC}" + + # Kill the test instance + echo "" + echo -e "${YELLOW}Stopping test instance...${NC}" + kill $APPIMAGE_PID 2>/dev/null + sleep 2 + pkill -9 -f "Aquiis" 2>/dev/null +else + echo " ${RED}Error: .NET process did not start${NC}" + kill $APPIMAGE_PID 2>/dev/null +fi + +echo "" +echo -e "${YELLOW}Test 3: System Information${NC}" +echo " CPU: $(grep "model name" /proc/cpuinfo | head -1 | cut -d: -f2 | xargs)" +echo " RAM: $(free -h | awk '/^Mem:/ {print $2}')" +echo " Disk (AppImage): $(df -h "$APPIMAGE" | tail -1 | awk '{print $1 " (" $4 " free)"}')" +echo " Disk (Config): $(df -h ~/.config/Aquiis 2>/dev/null | tail -1 | awk '{print $1 " (" $4 " free)")' || echo "Not initialized"}" + +echo "" +echo -e "${YELLOW}Test 4: Database Check${NC}" +if [ -f ~/.config/Aquiis/Data/app_v1.0.0.db ]; then + DB_SIZE=$(du -h ~/.config/Aquiis/Data/app_v1.0.0.db | cut -f1) + echo " Database size: $DB_SIZE" + echo " Database location: ~/.config/Aquiis/Data/app_v1.0.0.db" +else + echo " Database: Not initialized (first run will be slower)" +fi + +echo "" +echo -e "${YELLOW}Test 5: AppImage Properties${NC}" +"$APPIMAGE" --appimage-version 2>/dev/null || echo " AppImage runtime: Type 2" +echo " Compression: $(file "$APPIMAGE" | grep -o "gzip\|xz\|zstd" || echo "unknown")" + +echo "" +echo -e "${GREEN}Diagnostic complete!${NC}" +echo "" +echo "If startup is still slow (>20s), check:" +echo " 1. Antivirus/security software scanning AppImage" +echo " 2. Slow disk (HDD vs SSD)" +echo " 3. Check /tmp/aquiis-startup.log for .NET errors" +echo " 4. Try: export ELECTRON_NO_ASAR=1 (before running)" +echo "" diff --git a/4-Aquiis.SimpleStart/Assets/icon.ico b/4-Aquiis.SimpleStart/Assets/icon.ico new file mode 100644 index 0000000..5a2f520 Binary files /dev/null and b/4-Aquiis.SimpleStart/Assets/icon.ico differ diff --git a/4-Aquiis.SimpleStart/Assets/icon.png b/4-Aquiis.SimpleStart/Assets/icon.png new file mode 100644 index 0000000..013f46d Binary files /dev/null and b/4-Aquiis.SimpleStart/Assets/icon.png differ diff --git a/4-Aquiis.SimpleStart/Assets/install-desktop-integration.sh b/4-Aquiis.SimpleStart/Assets/install-desktop-integration.sh new file mode 100755 index 0000000..1682457 --- /dev/null +++ b/4-Aquiis.SimpleStart/Assets/install-desktop-integration.sh @@ -0,0 +1,135 @@ +#!/bin/bash +# +# Aquiis Desktop Integration Installer +# Automatically creates desktop entry for Aquiis Property Management AppImage +# +# Usage: ./install-desktop-integration.sh /path/to/AquiisPropertyManagement.AppImage +# + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Check if AppImage path provided +if [ $# -eq 0 ]; then + echo -e "${RED}Error: No AppImage path provided${NC}" + echo "Usage: $0 /path/to/AquiisPropertyManagement.AppImage" + exit 1 +fi + +APPIMAGE_PATH="$1" + +# Check if AppImage exists +if [ ! -f "$APPIMAGE_PATH" ]; then + echo -e "${RED}Error: AppImage not found at: $APPIMAGE_PATH${NC}" + exit 1 +fi + +# Get absolute path +APPIMAGE_PATH="$(readlink -f "$APPIMAGE_PATH")" +APPIMAGE_DIR="$(dirname "$APPIMAGE_PATH")" +APPIMAGE_NAME="$(basename "$APPIMAGE_PATH")" + +echo -e "${GREEN}Aquiis Desktop Integration Installer${NC}" +echo "========================================" +echo "" +echo "AppImage: $APPIMAGE_NAME" +echo "Location: $APPIMAGE_DIR" +echo "" + +# Create Applications directory +mkdir -p ~/Applications + +# Move AppImage to ~/Applications/ if not already there +if [[ "$APPIMAGE_DIR" != "$HOME/Applications" ]]; then + echo "Moving AppImage to ~/Applications/..." + mv "$APPIMAGE_PATH" ~/Applications/ + APPIMAGE_PATH="$HOME/Applications/$APPIMAGE_NAME" + APPIMAGE_DIR="$HOME/Applications" + echo -e "${GREEN}✓ Moved to: $APPIMAGE_PATH${NC}" +else + echo "✓ AppImage already in ~/Applications/" +fi + +echo "" + +# Create directories +mkdir -p ~/.local/share/applications +mkdir -p ~/.local/share/icons/hicolor/512x512/apps + +# Check if icon exists in same directory +ICON_PATH="${APPIMAGE_DIR}/aquiis-icon.png" +if [ ! -f "$ICON_PATH" ]; then + # Try to find icon.png in same directory + ICON_PATH="${APPIMAGE_DIR}/icon.png" + + if [ ! -f "$ICON_PATH" ]; then + echo -e "${YELLOW}Warning: Icon file not found. Using generic AppImage icon.${NC}" + ICON_PATH="application-x-executable" + else + # Copy icon to system location + cp "$ICON_PATH" ~/.local/share/icons/hicolor/512x512/apps/aquiis.png + ICON_PATH="aquiis" + echo "✓ Copied icon to system icons directory" + fi +else + # Copy icon to system location + cp "$ICON_PATH" ~/.local/share/icons/hicolor/512x512/apps/aquiis.png + ICON_PATH="aquiis" + echo "✓ Copied icon to system icons directory" +fi + +# Create desktop entry +cat > ~/.local/share/applications/aquiis.desktop << EOF +[Desktop Entry] +Name=Aquiis Property Management +Comment=Multi-tenant property management system for small landlords +Exec=${APPIMAGE_PATH} +Icon=${ICON_PATH} +Type=Application +Categories=Office;Finance; +Terminal=false +StartupWMClass=Aquiis Property Management +X-AppImage-Version=1.0.0 +Keywords=property;management;landlord;rental;lease;tenant;invoice; +EOF + +echo "✓ Created desktop entry" + +# Make desktop file executable +chmod +x ~/.local/share/applications/aquiis.desktop +echo "✓ Made desktop entry executable" + +# Update desktop database +if command -v update-desktop-database &> /dev/null; then + update-desktop-database ~/.local/share/applications/ + echo "✓ Updated desktop database" +else + echo -e "${YELLOW}Warning: update-desktop-database not found. You may need to log out and back in.${NC}" +fi + +# Update icon cache +if command -v gtk-update-icon-cache &> /dev/null; then + gtk-update-icon-cache ~/.local/share/icons/hicolor/ 2>/dev/null || true + echo "✓ Updated icon cache" +fi + +echo "" +echo -e "${GREEN}Installation complete!${NC}" +echo "" +echo "AppImage location: $APPIMAGE_PATH" +echo "Aquiis Property Management should now appear in your application launcher." +echo "You can search for 'Aquiis' or find it in Office/Finance categories." +echo "" +echo "To uninstall desktop integration:" +echo " rm ~/.local/share/applications/aquiis.desktop" +echo " rm ~/.local/share/icons/hicolor/512x512/apps/aquiis.png" +echo " update-desktop-database ~/.local/share/applications/" +echo "" +echo "To completely remove Aquiis:" +echo " rm $APPIMAGE_PATH" +echo "" diff --git a/4-Aquiis.SimpleStart/ElectronHostHook/package.json b/4-Aquiis.SimpleStart/ElectronHostHook/package.json new file mode 100644 index 0000000..f727825 --- /dev/null +++ b/4-Aquiis.SimpleStart/ElectronHostHook/package.json @@ -0,0 +1,9 @@ +{ + "name": "aquiis-simplestart-electron", + "version": "1.0.0", + "description": "Aquiis SimpleStart Electron Host", + "main": "main.js", + "dependencies": { + "dasherize": "^2.0.0" + } +} diff --git a/4-Aquiis.SimpleStart/ElectronHostHook/tsconfig.json b/4-Aquiis.SimpleStart/ElectronHostHook/tsconfig.json new file mode 100644 index 0000000..4dbc186 --- /dev/null +++ b/4-Aquiis.SimpleStart/ElectronHostHook/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["ES2020"], + "outDir": "./dist", + "rootDir": "./", + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node", + "resolveJsonModule": true + }, + "include": ["**/*.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/4-Aquiis.SimpleStart/Features/Administration/Organizations/Pages/ManageUsers.razor b/4-Aquiis.SimpleStart/Features/Administration/Organizations/Pages/ManageUsers.razor index 164203c..8309472 100644 --- a/4-Aquiis.SimpleStart/Features/Administration/Organizations/Pages/ManageUsers.razor +++ b/4-Aquiis.SimpleStart/Features/Administration/Organizations/Pages/ManageUsers.razor @@ -479,6 +479,6 @@ private void Cancel() { - Navigation.NavigateTo($"/administration/organizations/view/{Id}"); + Navigation.NavigateTo($"/administration/organizations/{Id}"); } } diff --git a/4-Aquiis.SimpleStart/README.md b/4-Aquiis.SimpleStart/README.md index a8e944c..729cdf0 100644 --- a/4-Aquiis.SimpleStart/README.md +++ b/4-Aquiis.SimpleStart/README.md @@ -230,9 +230,9 @@ Aquiis.SimpleStart/ │ ├── PaymentPdfGenerator.cs │ └── ... │ -├── Features/ # Presentation Layer (Vertical Slices) -│ ├── PropertyManagement/ # Property management features -│ │ ├── Properties/ # Property CRUD & management +├── Features/ # Presentation Layer (Vertical Slices) +│ ├── PropertyManagement/ # Property management features +│ │ ├── Properties/ # Property CRUD & management │ │ ├── Tenants/ # Tenant management │ │ ├── Leases/ # Lease management │ │ ├── SecurityDeposits/ # Security deposit tracking @@ -245,47 +245,47 @@ Aquiis.SimpleStart/ │ │ ├── Checklists/ # Checklists & templates │ │ ├── Reports/ # Financial & operational reports │ │ └── Calendar.razor # Calendar view -│ └── Administration/ # Admin features +│ └── Administration/ # Admin features │ ├── Application/ # Application screening │ ├── PropertyManagement/ # Property admin │ ├── Settings/ # System settings │ ├── Users/ # User management │ └── Dashboard.razor │ -├── Shared/ # Shared UI Layer -│ ├── Layout/ # Layout components +├── Shared/ # Shared UI Layer +│ ├── Layout/ # Layout components │ │ ├── MainLayout.razor │ │ └── NavMenu.razor -│ ├── Components/ # Reusable UI components +│ ├── Components/ # Reusable UI components │ │ ├── Account/ # Authentication components │ │ ├── Pages/ # Shared pages (Home, About, Error) │ │ ├── NotesTimeline.razor │ │ ├── SessionTimeoutModal.razor │ │ └── ToastContainer.razor -│ └── Services/ # UI-specific services +│ └── Services/ # UI-specific services │ ├── ToastService.cs │ ├── ThemeService.cs │ ├── SessionTimeoutService.cs │ ├── UserContextService.cs │ └── DocumentService.cs │ -├── Components/ # Root Blazor components -│ ├── App.razor # App root component -│ ├── Routes.razor # Routing configuration -│ └── _Imports.razor # Global using directives +├── Components/ # Root Blazor components +│ ├── App.razor # App root component +│ ├── Routes.razor # Routing configuration +│ └── _Imports.razor # Global using directives │ -├── Utilities/ # Helper utilities +├── Utilities/ # Helper utilities │ ├── CalendarEventRouter.cs │ └── SchedulableEntityRegistry.cs │ -├── wwwroot/ # Static files -│ ├── assets/ # Images & static assets -│ ├── js/ # JavaScript files -│ └── lib/ # Client libraries +├── wwwroot/ # Static files +│ ├── assets/ # Images & static assets +│ ├── js/ # JavaScript files +│ └── lib/ # Client libraries │ -├── Program.cs # Application entry point -├── appsettings.json # Configuration -└── appsettings.Development.json # Development config +├── Program.cs # Application entry point +├── appsettings.json # Configuration +└── appsettings.Development.json # Development config ``` ### Architecture Principles diff --git a/4-Aquiis.SimpleStart/Shared/Components/Account/Pages/Login.razor b/4-Aquiis.SimpleStart/Shared/Components/Account/Pages/Login.razor index 160895f..797ea24 100644 --- a/4-Aquiis.SimpleStart/Shared/Components/Account/Pages/Login.razor +++ b/4-Aquiis.SimpleStart/Shared/Components/Account/Pages/Login.razor @@ -47,20 +47,20 @@

{ ["ReturnUrl"] = ReturnUrl }))">Register as a new user

-

+ @*

Resend email confirmation -

+

*@ -
+ @*

Use another service to log in.


-
+
*@ @code { diff --git a/4-Aquiis.SimpleStart/appsettings.json b/4-Aquiis.SimpleStart/appsettings.json index 68fd678..d04f5ae 100644 --- a/4-Aquiis.SimpleStart/appsettings.json +++ b/4-Aquiis.SimpleStart/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "DefaultConnection": "DataSource=Data/app_v0.3.0.db;Cache=Shared" + "DefaultConnection": "DataSource=Data/app_v1.0.0.db;Cache=Shared" }, "Logging": { "LogLevel": { @@ -13,14 +13,14 @@ "AllowedHosts": "*", "ApplicationSettings": { "AppName": "Aquiis", - "Version": "0.3.0", + "Version": "1.0.0", "Author": "CIS Guru", "Email": "cisguru@outlook.com", "Repository": "https://github.com/xnodeoncode/Aquiis", "SoftDeleteEnabled": true, - "DatabaseFileName": "app_v0.3.0.db", - "PreviousDatabaseFileName": "app_v0.0.0.db", - "SchemaVersion": "0.3.0", + "DatabaseFileName": "app_v1.0.0.db", + "PreviousDatabaseFileName": "", + "SchemaVersion": "1.0.0", "MaxOrganizationUsers": 3 }, "SessionTimeout": { diff --git a/4-Aquiis.SimpleStart/electron.manifest.json b/4-Aquiis.SimpleStart/electron.manifest.json index 771f66b..34cd034 100644 --- a/4-Aquiis.SimpleStart/electron.manifest.json +++ b/4-Aquiis.SimpleStart/electron.manifest.json @@ -3,7 +3,14 @@ "splashscreen": { "imageFile": "wwwroot/assets/splash.png" }, + "electronCLIFlags": [ + "--no-sandbox", + "--disable-gpu-sandbox", + "--enable-features=VaapiVideoDecoder", + "--disable-dev-shm-usage" + ], "name": "aquiis-property-management", + "description": "Desktop property management application for landlords managing up to 9 residential properties", "author": "Aquiis", "singleInstance": false, "environment": "Production", @@ -11,9 +18,9 @@ "build": { "appId": "com.aquiis.propertymanagement", "productName": "AquiisPropertyManagement", - "copyright": "Copyright © 2025", + "copyright": "Copyright © 2026", "buildVersion": "1.0.0", - "compression": "maximum", + "compression": "normal", "directories": { "output": "../../../bin/Desktop" }, @@ -34,16 +41,17 @@ ], "mac": { "target": "dmg", - "icon": "Assets/icon.icns", + "icon": "bin/Assets/icon.icns", "category": "public.app-category.business" }, "win": { - "target": "nsis", - "icon": "Assets/icon.ico" + "target": "portable", + "icon": "bin/Assets/icon.ico", + "signAndEditExecutable": false }, "linux": { "target": "AppImage", - "icon": "Assets/icon.png", + "icon": "bin/Assets/icon.png", "category": "Office" } } diff --git a/4-Aquiis.SimpleStart/wwwroot/android-chrome-256x256.png b/4-Aquiis.SimpleStart/wwwroot/android-chrome-256x256.png new file mode 100644 index 0000000..dda8d6b Binary files /dev/null and b/4-Aquiis.SimpleStart/wwwroot/android-chrome-256x256.png differ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..29f4b19 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,296 @@ +# Changelog + +All notable changes to **Aquiis SimpleStart** will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [1.0.0] - 2026-01-29 + +### 🎉 Initial Production Release + +**Aquiis SimpleStart v1.0.0** is the first production-ready release of our desktop property management application for landlords managing 1-9 residential properties. + +### Added + +#### Property Management + +- Property profiles supporting up to 9 residential properties +- Property photos and document attachments +- Property status tracking (Available, Occupied, Under Renovation, Off-Market) +- Property portfolio overview dashboard +- Property-specific settings and customization + +#### Tenant Management + +- Complete prospect-to-tenant lifecycle workflow +- Prospective tenant profiles with 9 status transitions +- Digital rental application system with online submission +- Application screening workflow (background checks, credit checks) +- Tenant conversion system with audit trail +- Tenant profiles with contact information and emergency contacts +- Multi-lease support (tenants can have multiple active leases) + +#### Lease Management + +- Digital lease creation and management +- Lease offer generation with expiration tracking (30-day validity) +- E-signature workflow with full audit trail (IP address, timestamp, user agent) +- Lease acceptance with security deposit collection +- Multi-lease support per tenant +- Security deposit investment pool with annual dividends +- Dividend distribution system (pro-rated, tenant choice: credit or check) +- Lease status tracking (Offered, Active, Declined, Terminated, Expired) +- Automatic lease expiration notifications +- Month-to-month rollover for unsigned lease offers + +#### Financial Management + +- Automated rent invoice generation +- Monthly recurring invoice support +- Payment tracking with multiple payment methods +- Late fee calculation after configurable grace period +- Automatic late fee application via background service (daily at 2 AM) +- Payment history and tracking +- Financial reports (income summary, payment history) +- Security deposit dividend calculations and distribution + +#### Maintenance & Inspections + +- Maintenance request tracking and management +- Vendor assignment and coordination +- Comprehensive 26-item inspection checklist (5 categories: Exterior, Interior, Kitchen, Bathroom, Systems) +- Move-in, Move-out, and Routine inspection types +- Scheduled routine inspections with automatic reminders +- PDF inspection report generation with QuestPDF +- Photo attachments for inspection items +- Inspection history and tracking + +#### Calendar & Scheduling + +- Calendar event management system +- Event types: Tours, Inspections, Maintenance, Payments, Lease Events, Other +- Automated recurring event creation +- Event reminders and notifications +- Property-specific event filtering +- Timeline view of upcoming events + +#### Notifications & Communication + +- Multi-channel notification system (in-app, email, SMS) +- Graceful degradation if external services unavailable +- Notification preferences per user +- Email notifications via SendGrid integration +- SMS notifications via Twilio integration +- Toast notifications for in-app feedback +- Automatic notifications for: late fees, lease expiration, inspection reminders, payment confirmations + +#### Database Management + +- SQLite file-based database (no server required) +- Automatic schema migration system +- Manual backup creation (on-demand) +- Scheduled automatic backups (daily/weekly/monthly at 2 AM) +- Staged restore with preview functionality +- Full restore with automatic application restart +- Database health checks (startup, hourly, before backup) +- Database optimization (VACUUM/ANALYZE) +- Database reset with safety confirmations +- Backup retention management +- External backup support (cloud sync, USB) +- 3-2-1 backup strategy recommended + +#### Background Automation + +- Scheduled task service running daily at 2 AM +- Automatic late fee application after grace period +- Lease expiration monitoring and notifications +- Security deposit dividend calculation and distribution +- Routine inspection scheduling +- Database cleanup and maintenance +- Cache refresh and optimization + +#### User Management + +- ASP.NET Core Identity integration +- Three user roles: Administrator, PropertyManager, Tenant +- Role-based access control (RBAC) +- User account creation and management +- Password policies and security +- Account lockout protection +- Session timeout after 18 minutes of inactivity +- Session timeout modal with extend/logout options +- User limit: 3 users maximum (1 system + 2 login users) + +#### Reports & Analytics + +- Financial reports (income summary, payment history) +- Property portfolio overview +- Maintenance summary reports +- Inspection history reports +- Payment tracking reports +- PDF report generation with QuestPDF +- Export capabilities for reports + +#### Desktop Application Features + +- ElectronNET desktop wrapper for native experience +- Cross-platform support (Linux and Windows) +- Offline-capable database (SQLite) +- Native file system integration +- System tray integration +- Application auto-updates (future) +- Single-instance enforcement + +#### Documentation + +- Comprehensive Release Notes (48 sections) +- Quick Start Guide (15-minute tutorial with 9 steps) +- Database Management Guide (10 chapters: backup, restore, troubleshooting) +- System Requirements documentation +- Installation guides (Linux AppImage/deb, Windows NSIS/portable) +- FAQ sections (15+ questions per guide) +- Troubleshooting guides (5+ scenarios per guide) + +### Known Limitations + +**Aquiis SimpleStart** is intentionally designed with the following constraints for simplified workflows and performance: + +| Limitation | Value | Reason | +| ----------------- | ------------------------------ | ------------------------------ | +| **Properties** | Maximum 9 | Simplified workflows | +| **Users** | Maximum 3 (1 system + 2 login) | Simplified access control | +| **Organizations** | 1 only | Desktop application scope | +| **File uploads** | 10MB per file | Performance management | +| **Calendar** | Uses legacy service | Technical debt (refactor v1.1) | + +**Need more capacity?** Watch for **Aquiis Professional** (v2.0.0, 2027) with unlimited properties and multi-organization support. + +### Technical Specifications + +- **Framework:** ASP.NET Core 10.0 + Blazor Server +- **Desktop:** ElectronNET 23.6.2 +- **Database:** SQLite (Microsoft.EntityFrameworkCore.Sqlite 10.0.1) +- **PDF Generation:** QuestPDF 2025.12.1 +- **Email:** SendGrid 9.29.3 +- **SMS:** Twilio 7.14.0 +- **UI:** Bootstrap 5.3, Material Design Icons +- **Architecture:** Clean Architecture with service layer pattern +- **Test Coverage:** 303 unit tests passing + +### System Requirements + +**Minimum:** + +- **OS:** Linux (Ubuntu 20.04+, Debian 11+) or Windows 10/11 (64-bit) +- **CPU:** 2-core, 1.5 GHz +- **RAM:** 2 GB +- **Disk:** 500 MB + +**Recommended:** + +- **CPU:** 4-core, 2.5 GHz +- **RAM:** 4 GB +- **Disk:** 1 GB +- **Display:** 1920x1080 + +### Installation Formats + +- **Linux:** AppImage (universal), .deb package (Debian/Ubuntu) +- **Windows:** NSIS installer, portable executable +- **macOS:** Coming in future release + +### Breaking Changes + +**N/A** - This is the first production release. + +**Note:** This is a clean v1.0.0 release. There is **no upgrade path** from pre-release versions (v0.x.x). All database migrations have been squashed into a single v1.0.0_Initial migration. Previous development databases cannot be migrated and must be recreated using the New Setup Wizard. + +### Changed + +**N/A** - This is the first production release. + +### Fixed + +**N/A** - This is the first production release. + +### Security + +**N/A** - This is the first production release. + +### Deprecated + +**N/A** - This is the first production release. + +--- + +## Release Notes + +For detailed information about this release, see: + +- 📖 [Full Release Notes](/home/cisguru/Documents/Orion/Projects/Aquiis/Documentation/v1.0.0/v1.0.0-Release-Notes.md) +- 🚀 [Quick Start Guide](/home/cisguru/Documents/Orion/Projects/Aquiis/Documentation/v1.0.0/v1.0.0-Quick-Start-Guide.md) +- 💾 [Database Management Guide](/home/cisguru/Documents/Orion/Projects/Aquiis/Documentation/v1.0.0/v1.0.0-Database-Management-Guide.md) + +--- + +## Roadmap + +### v1.1.0 (Planned - Q2 2026) + +**Tenant Portal & Mobile Enhancements** + +- Tenant self-service portal for online payments +- Maintenance request submission by tenants +- Document access for tenants +- Calendar refactoring (remove legacy service dependencies) +- Enhanced reporting and customization +- Mobile companion app (view-only) + +### v1.2.0 (Planned - Q3 2026) + +**Payment Processing & Analytics** + +- Online rent payment processing (Stripe integration) +- Automated ACH/credit card payments +- Payment scheduling and autopay +- Advanced analytics and forecasting +- Improved financial reporting + +### v2.0.0 (Planned - 2027) - Aquiis Professional + +**Enterprise Features** + +- 🏢 Unlimited properties +- 👥 Multi-organization support +- 🌐 Web-based deployment option +- 📱 Full-featured mobile app +- 🔐 Advanced security and audit logging +- 📊 Advanced reporting and business intelligence +- 🔌 API for third-party integrations + +--- + +## Support + +### Getting Help + +- 📧 **Email:** cisguru@outlook.com +- 🐛 **Bug Reports:** [GitHub Issues](https://github.com/xnodeoncode/Aquiis/issues) +- 💡 **Feature Requests:** [GitHub Discussions](https://github.com/xnodeoncode/Aquiis/discussions) +- 📖 **Documentation:** [/Documentation/v1.0.0/](Documentation/v1.0.0/) + +### Community + +- ⭐ Star this repository +- 🍴 Fork and contribute +- 💬 Join discussions +- 📢 Share feedback + +--- + +**Copyright © 2026 CIS Guru. All rights reserved.** + +Licensed under the **MIT License** - see [LICENSE](LICENSE) file for details. diff --git a/README.md b/README.md index a8e944c..7304dee 100644 --- a/README.md +++ b/README.md @@ -1,513 +1,349 @@ -# Aquiis - Property Management System +# Aquiis SimpleStart -![.NET 9.0](https://img.shields.io/badge/.NET-9.0-blue) -![ASP.NET Core](https://img.shields.io/badge/ASP.NET%20Core-9.0-blueviolet) -![Blazor Server](https://img.shields.io/badge/Blazor-Server-orange) -![Entity Framework](https://img.shields.io/badge/Entity%20Framework-9.0-green) -![SQLite](https://img.shields.io/badge/Database-SQLite-lightblue) +**Modern Property Management for Landlords** -A comprehensive web-based property management system built with ASP.NET Core 9.0 and Blazor Server. Aquiis streamlines rental property management for property owners, managers, and tenants with an intuitive interface and robust feature set. +[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/xnodeoncode/Aquiis/releases) +[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) +[![.NET](https://img.shields.io/badge/.NET-10.0-purple.svg)](https://dotnet.microsoft.com/) +[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20Windows-lightgrey.svg)](#installation) -## 🏢 Overview - -Aquiis is designed to simplify property management operations through a centralized platform that handles everything from property listings and tenant management to lease tracking and document storage. Built with modern web technologies, it provides a responsive, secure, and scalable solution for property management professionals. - -## ✨ Key Features - -### 🏠 Property Management - -- **Property Portfolio** - Comprehensive property listings with detailed information -- **Property Details** - Address, type, rent, bedrooms, bathrooms, square footage -- **Availability Tracking** - Real-time property availability status -- **Property Photos** - Image management and gallery support -- **Search & Filter** - Advanced property search and filtering capabilities -- **Property Analytics** - Dashboard with property performance metrics - -### 👥 Tenant Management - -- **Tenant Profiles** - Complete tenant information management -- **Contact Management** - Phone, email, emergency contacts -- **Tenant History** - Track tenant interactions and lease history -- **Tenant Portal** - Dedicated tenant dashboard and self-service features -- **Communication Tools** - Built-in messaging and notification system -- **Tenant Screening** - Application and background check workflow +--- -### 📄 Lease Management +**Aquiis SimpleStart** is a standalone desktop application designed for landlords managing 1-9 residential rental properties. Built with ASP.NET Core 10 and Blazor Server, wrapped in Electron for native desktop experience, it provides professional-grade property management features without the complexity or subscription costs of enterprise solutions. -- **Lease Creation** - Digital lease agreement generation -- **Lease Tracking** - Active, pending, expired, and terminated lease monitoring -- **Rent Tracking** - Monthly rent amounts and payment schedules -- **Security Deposits** - Deposit tracking and management -- **Lease Renewals** - Automated renewal notifications and processing -- **Terms Management** - Flexible lease terms and conditions +**Perfect for:** -### 💰 Financial Management +- Independent landlords with a few properties +- Property owners who self-manage their rentals +- New landlords starting their portfolio +- Anyone seeking affordable, easy-to-use property management software -- **Payment Tracking** - Rent payment monitoring and history -- **Invoice Generation** - Automated invoice creation and delivery -- **Payment Methods** - Multiple payment option support -- **Financial Reporting** - Revenue and expense reporting -- **Late Fee Management** - Automatic late fee calculation and tracking -- **Security Deposit Tracking** - Deposit handling and return processing +## ✨ Key Features -### 📁 Document Management +### Property Management -- **File Storage** - Secure document upload and storage -- **Document Categories** - Organized by type (leases, receipts, photos, etc.) -- **Version Control** - Document revision tracking -- **Digital Signatures** - Electronic signature support -- **Document Sharing** - Secure document sharing with tenants -- **Bulk Operations** - Mass document upload and organization +- 📋 Manage up to 9 residential properties +- 🏡 Property profiles with photos and documents +- 🔍 Track property status (Available, Occupied, Under Renovation) +- 📊 Property portfolio overview and analytics -### 🔐 User Management & Security +### Tenant Management -- **Role-Based Access** - Administrator, Property Manager, and Tenant roles -- **Authentication** - Secure login with ASP.NET Core Identity -- **User Profiles** - Comprehensive user account management -- **Permission Management** - Granular access control -- **Activity Tracking** - User login and activity monitoring -- **Data Security** - Encrypted data storage and transmission +- 👥 Complete prospect-to-tenant journey +- 📝 Digital rental applications with screening +- ✅ Application approval workflow +- 🤝 Tenant profiles with contact information -### 🎛️ Administration Features +### Lease Management -- **User Administration** - Complete user account management -- **System Configuration** - Application settings and preferences -- **Application Monitoring** - System health and performance tracking -- **Backup Management** - Data backup and recovery tools -- **Audit Logging** - Comprehensive activity and change tracking +- 📄 Digital lease creation and management +- ✍️ Lease offers with acceptance tracking +- 🔄 Multi-lease support (tenants can have multiple active leases) +- 💰 Security deposit investment tracking with annual dividends -## 🛠️ Technology Stack +### Financial Management -### Backend +- 🧾 Automated rent invoice generation +- 💳 Payment tracking by multiple methods +- ⏰ Automatic late fee application after grace period +- 📈 Financial reports and payment history -- **Backend**: ASP.NET Core 9.0 -- **UI Framework**: Blazor Server -- **Database**: SQLite with Entity Framework Core 9.0 -- **Authentication**: ASP.NET Core Identity -- **Architecture**: Clean Architecture with vertical slice organization +### Maintenance & Inspections -### Frontend +- 🔧 Maintenance request tracking with vendor assignment +- ✅ Comprehensive 26-item inspection checklist +- 📅 Scheduled routine inspections +- 📄 PDF inspection reports with QuestPDF -- **UI Components**: Blazor Server Components -- **Styling**: Bootstrap 5 with custom CSS -- **Icons**: Bootstrap Icons -- **Responsive Design**: Mobile-first responsive layout -- **Real-time Updates**: Blazor Server SignalR integration +### Notifications & Automation -### Development Tools +- 🔔 In-app, email, and SMS notifications +- ⏰ Automatic late fees and lease expiration warnings +- 📅 Background tasks for scheduling and cleanup +- 🎯 Configurable notification preferences -- **IDE**: Visual Studio Code with C# extension -- **Database Tools**: Entity Framework Core Tools -- **Version Control**: Git with GitHub integration -- **Package Management**: NuGet -- **Build System**: .NET SDK build system +### Database Management -## 📋 Prerequisites +- 💾 SQLite file-based database (no server required) +- 🔄 Automatic schema migrations +- 📦 Manual and scheduled backups +- ♻️ Staged restore with preview -- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) -- [Git](https://git-scm.com/) -- [Visual Studio Code](https://code.visualstudio.com/) (recommended) or Visual Studio 2022 -- [C# Dev Kit Extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) for VS Code +--- ## 🚀 Quick Start -### 1. Clone the Repository +### Installation -```bash -git clone https://github.com/xnodeoncode/Aquiis.git -cd Aquiis -``` - -### 2. Build the Application +**Linux (Ubuntu/Debian):** ```bash -dotnet build -``` +# Option 1: AppImage (recommended) +chmod +x Aquiis-SimpleStart-1.0.0.AppImage +./Aquiis-SimpleStart-1.0.0.AppImage -### 3. Run Database Migrations - -```bash -cd Aquiis.SimpleStart -dotnet ef database update +# Option 2: Debian package +sudo dpkg -i Aquiis-SimpleStart-1.0.0-amd64.deb +aquiis-simplestart ``` -### 4. Start the Development Server +**Windows:** -```bash -dotnet run -``` +1. Download `Aquiis-SimpleStart-Setup-1.0.0.exe` +2. Run installer and follow wizard +3. Launch from Start Menu -### 5. Access the Application +### First Run -Open your browser and navigate to: +1. **New Setup Wizard** guides you through initial configuration +2. Create your **organization** (business name and contact info) +3. Register your **first user account** +4. Start managing properties! -- **HTTPS**: https://localhost:7244 -- **HTTP**: http://localhost:5244 +### 15-Minute Tutorial -## 🔧 Development Setup +Follow our [Quick Start Guide](Documentation/v1.0.0/v1.0.0-Quick-Start-Guide.md) to: -### Visual Studio Code Setup +- Add your first property +- Add a tenant +- Create a lease +- Generate an invoice +- Record a payment +- Schedule an inspection -The project includes pre-configured VS Code settings: +--- -1. Open the workspace file: `Aquiis.code-workspace` -2. Install recommended extensions when prompted -3. Use **F5** to start debugging -4. Use **Ctrl+Shift+P** → "Tasks: Run Task" for build operations +## 📋 System Requirements -### Available Tasks +### Minimum Requirements -- **build** - Debug build (default) -- **build-release** - Release build -- **watch** - Hot reload development -- **publish** - Production publish -- **clean** - Clean build artifacts +- **OS:** Linux (Ubuntu 20.04+, Debian 11+) or Windows 10/11 (64-bit) +- **CPU:** 2-core, 1.5 GHz +- **RAM:** 2 GB +- **Disk:** 500 MB -### Database Management +### Recommended -#### Manual Database Scripts +- **CPU:** 4-core, 2.5 GHz +- **RAM:** 4 GB +- **Disk:** 1 GB +- **Display:** 1920x1080 -SQL scripts for manual database operations are located in: +### Software -```bash -cd Infrastructure/Data/Scripts -# Available scripts: -# 00_InitialSchema.sql - Initial database schema -# updateTenant.sql - Tenant table updates -``` +- All dependencies bundled (no installation required) +- Optional: SendGrid (email) and Twilio (SMS) for notifications -#### Entity Framework Commands +--- -```bash -# Create new migration -dotnet ef migrations add [MigrationName] +## 📚 Documentation -# Update database -dotnet ef database update +### User Documentation -# Remove last migration -dotnet ef migrations remove -``` +- 📖 **[Release Notes](Documentation/v1.0.0/v1.0.0-Release-Notes.md)** - What's new in v1.0.0 +- 🚀 **[Quick Start Guide](Documentation/v1.0.0/v1.0.0-Quick-Start-Guide.md)** - Get started in 15 minutes +- 💾 **[Database Management Guide](Documentation/v1.0.0/v1.0.0-Database-Management-Guide.md)** - Backup, restore, troubleshooting -## 📁 Project Structure +### Developer Documentation -The application follows Clean Architecture principles with clear separation of concerns: - -``` -Aquiis.SimpleStart/ -├── Core/ # Domain Layer (no dependencies) -│ ├── Entities/ # Domain models & business entities -│ │ ├── BaseModel.cs # Base entity with common properties -│ │ ├── Property.cs # Property entity -│ │ ├── Tenant.cs # Tenant entity -│ │ ├── Lease.cs # Lease entity -│ │ ├── SecurityDeposit.cs # Security deposit entity -│ │ └── ... # Other domain entities -│ └── Constants/ # Application constants -│ ├── ApplicationConstants.cs -│ └── ApplicationSettings.cs -│ -├── Infrastructure/ # Infrastructure Layer -│ ├── Data/ # Database & persistence -│ │ ├── ApplicationDbContext.cs # EF Core DbContext -│ │ ├── Migrations/ # EF Core migrations (44 files) -│ │ ├── Scripts/ # SQL scripts for manual operations -│ │ └── Backups/ # Database backups -│ └── Services/ # External service implementations -│ -├── Application/ # Application Layer (business logic) -│ └── Services/ # Domain services -│ ├── PropertyManagementService.cs -│ ├── SecurityDepositService.cs -│ ├── TenantConversionService.cs -│ ├── FinancialReportService.cs -│ ├── ChecklistService.cs -│ ├── CalendarEventService.cs -│ ├── NoteService.cs -│ └── PdfGenerators/ # PDF generation services -│ ├── LeasePdfGenerator.cs -│ ├── InvoicePdfGenerator.cs -│ ├── PaymentPdfGenerator.cs -│ └── ... -│ -├── Features/ # Presentation Layer (Vertical Slices) -│ ├── PropertyManagement/ # Property management features -│ │ ├── Properties/ # Property CRUD & management -│ │ ├── Tenants/ # Tenant management -│ │ ├── Leases/ # Lease management -│ │ ├── SecurityDeposits/ # Security deposit tracking -│ │ ├── Payments/ # Payment processing -│ │ ├── Invoices/ # Invoice management -│ │ ├── Documents/ # Document management -│ │ ├── Inspections/ # Property inspections -│ │ ├── MaintenanceRequests/ # Maintenance tracking -│ │ ├── Applications/ # Rental applications -│ │ ├── Checklists/ # Checklists & templates -│ │ ├── Reports/ # Financial & operational reports -│ │ └── Calendar.razor # Calendar view -│ └── Administration/ # Admin features -│ ├── Application/ # Application screening -│ ├── PropertyManagement/ # Property admin -│ ├── Settings/ # System settings -│ ├── Users/ # User management -│ └── Dashboard.razor -│ -├── Shared/ # Shared UI Layer -│ ├── Layout/ # Layout components -│ │ ├── MainLayout.razor -│ │ └── NavMenu.razor -│ ├── Components/ # Reusable UI components -│ │ ├── Account/ # Authentication components -│ │ ├── Pages/ # Shared pages (Home, About, Error) -│ │ ├── NotesTimeline.razor -│ │ ├── SessionTimeoutModal.razor -│ │ └── ToastContainer.razor -│ └── Services/ # UI-specific services -│ ├── ToastService.cs -│ ├── ThemeService.cs -│ ├── SessionTimeoutService.cs -│ ├── UserContextService.cs -│ └── DocumentService.cs -│ -├── Components/ # Root Blazor components -│ ├── App.razor # App root component -│ ├── Routes.razor # Routing configuration -│ └── _Imports.razor # Global using directives -│ -├── Utilities/ # Helper utilities -│ ├── CalendarEventRouter.cs -│ └── SchedulableEntityRegistry.cs -│ -├── wwwroot/ # Static files -│ ├── assets/ # Images & static assets -│ ├── js/ # JavaScript files -│ └── lib/ # Client libraries -│ -├── Program.cs # Application entry point -├── appsettings.json # Configuration -└── appsettings.Development.json # Development config -``` +- 📝 **[Copilot Instructions](.github/copilot-instructions.md)** - Architecture and development guidelines +- 🏛️ **[Roadmap](Documentation/Roadmap/)** - Feature planning and implementation status +- 🔄 **[CHANGELOG](CHANGELOG.md)** - Version history -### Architecture Principles +--- -**Clean Architecture Layers:** +## ⚠️ Known Limitations -``` -Features → Application → Core - ↓ -Infrastructure → Core - ↓ -Shared → Core -``` +**SimpleStart is with intentional constraints:** -**Dependency Rules:** +| Limitation | Value | Reason | +| ----------------- | ------------------------------ | ------------------------- | +| **Properties** | Maximum 9 | Simplified workflows | +| **Users** | Maximum 3 (1 system + 2 login) | Simplified access control | +| **Organizations** | 1 only | Desktop application scope | +| **File uploads** | 10MB per file | Performance management | -- ✅ **Core** has NO dependencies (pure domain logic) -- ✅ **Infrastructure** depends only on Core (data access) -- ✅ **Application** depends only on Core (business logic) -- ✅ **Features** depends on Application + Core (UI features) -- ✅ **Shared** depends on Core (cross-cutting UI) +**Need more capacity?** Watch for **Aquiis Professional** (coming 2026) with unlimited properties and multi-organization support. -**Benefits:** +--- -- **Separation of Concerns**: Domain, business logic, data access, and UI clearly separated -- **Testability**: Each layer can be tested independently -- **Maintainability**: Easy to locate and modify specific functionality -- **Scalability**: Simple to add new features as vertical slices -- **Reusability**: Domain and application layers can be shared across projects +## 🛠️ Technology Stack -## 🔑 Default User Roles +- **Framework:** ASP.NET Core 10.0 + Blazor Server +- **Desktop:** ElectronNET 23.6.2 +- **Database:** SQLite (Microsoft.EntityFrameworkCore.Sqlite 10.0.1) +- **PDF Generation:** QuestPDF 2025.12.1 +- **Email:** SendGrid 9.29.3 +- **SMS:** Twilio 7.14.0 +- **UI:** Bootstrap 5.3, Material Design Icons +- **Architecture:** Clean Architecture with service layer pattern -The system includes three primary user roles: +--- -### Administrator +## 🏗️ Project Structure -- Full system access -- User management capabilities -- System configuration -- All property management features +``` +Aquiis/ +├── 0-Aquiis.Core/ # Domain entities and interfaces +├── 1-Aquiis.Infrastructure/ # Data access and external services +├── 2-Aquiis.Application/ # Business logic and services +├── 3-Aquiis.UI.Shared/ # Shared UI components (SimpleStart + Professional) +├── 4-Aquiis.SimpleStart/ # SimpleStart desktop application +├── 5-Aquiis.Professional/ # Professional web application (future) +└── 6-Tests/ # Unit and integration tests +``` -### Property Manager +--- -- Property portfolio management -- Tenant management -- Lease administration -- Financial tracking -- Document management +## 🧪 Testing -### Tenant +**Test Suite:** -- Personal dashboard -- Lease information access -- Payment history -- Maintenance requests -- Document viewing +- ✅ **303 unit tests** passing +- ✅ **Application layer:** 243 tests (services, workflows, business logic) +- ✅ **UI.Shared components:** 47 tests (layout, notifications, common components) +- ✅ **Core validation:** 13 tests (utilities, attributes) -## 🎯 Key Components +**Integration tests** require running applications and are validated during UAT. -### Property Management Service +**Run tests:** -Core business logic service in the Application layer: +```bash +dotnet test Aquiis.sln +``` -- Property CRUD operations -- Tenant management workflows -- Lease tracking and renewals -- Document handling and storage -- Financial calculations -- Entity relationship management +--- -### Authentication & Authorization +## 🤝 Contributing -- ASP.NET Core Identity integration -- Role-based access control -- Secure session management -- Password policies -- Account lockout protection +We welcome contributions! Here's how to get started: -### Database Architecture +1. **Fork the repository** +2. **Create a feature branch:** `git checkout -b feature/your-feature-name` +3. **Read [copilot-instructions.md](.github/copilot-instructions.md)** for architecture guidelines +4. **Make your changes** following the coding standards +5. **Write tests** for new features +6. **Submit a pull request** -- Entity Framework Core with SQLite -- Code-first approach with migrations -- Optimized indexing for performance -- Foreign key constraints -- Soft delete patterns +### Development Workflow -## 📊 Dashboard Features +**Branch Strategy:** -### Property Manager Dashboard +``` +main (protected, production-ready) + ↑ Pull Request +development (integration testing) + ↑ Direct merge +feature/your-feature-name +``` -- Total properties count -- Available properties metrics -- Active lease tracking -- Tenant statistics -- Recent activity feed -- Quick action buttons +**Build and run:** -### Administrator Dashboard +```bash +# Build +dotnet build Aquiis.sln -- User account metrics -- System health monitoring -- Application statistics -- Administrative quick actions -- Recent system activity +# Run SimpleStart +cd 4-Aquiis.SimpleStart +dotnet run -### Tenant Dashboard +# Or use hot reload +dotnet watch +``` -- Personal lease information -- Payment history -- Maintenance requests -- Document access -- Communication center +--- -## 🔧 Configuration +## 📊 Versioning -### Application Settings +We use [Semantic Versioning](https://semver.org/): -Configuration is managed through: +- **MAJOR** version (X.0.0): Breaking changes, database schema updates +- **MINOR** version (0.X.0): New features, UI changes (backward compatible) +- **PATCH** version (0.0.X): Bug fixes, minor updates -- `appsettings.json` - Base configuration -- `appsettings.Development.json` - Development overrides -- Environment variables -- User secrets (for sensitive data) +**Current version:** 1.0.0 (Initial production release) -### Key Configuration Areas +--- -- Database connection strings -- Authentication settings -- File storage configuration -- Email service settings -- Application-specific settings +## 🗺️ Roadmap -## 🚀 Deployment +### v1.1.0 (Q2 2026) -### Prerequisites for Production +- 🎯 Tenant portal for online payment and maintenance requests +- 🎯 Calendar refactoring (remove legacy service dependencies) +- 🎯 Enhanced reporting and customization +- 🎯 Mobile companion app (view-only) -- Windows/Linux server with .NET 9.0 runtime -- IIS or reverse proxy (nginx/Apache) -- SSL certificate for HTTPS -- Database server (or SQLite for smaller deployments) +### v1.2.0 (Q3 2026) -### Build for Production +- 💳 Online rent payment processing (Stripe integration) +- 📊 Advanced analytics and forecasting -```bash -dotnet publish -c Release -o ./publish -``` +### v2.0.0 (2027) - Aquiis Professional -### Environment Variables +- 🏢 Unlimited properties +- 👥 Multi-organization support +- 🌐 Web-based deployment +- 📱 Full mobile app -Set the following for production: +--- -```bash -ASPNETCORE_ENVIRONMENT=Production -ASPNETCORE_URLS=https://+:443;http://+:80 -ConnectionStrings__DefaultConnection=[your-connection-string] -``` +## 📜 License -## 🤝 Contributing +Copyright © 2026 CIS Guru. All rights reserved. -1. Fork the repository -2. Create a feature branch (`git checkout -b feature/amazing-feature`) -3. Commit your changes (`git commit -m 'Add amazing feature'`) -4. Push to the branch (`git push origin feature/amazing-feature`) -5. Open a Pull Request +Licensed under the **MIT License** - see [LICENSE](LICENSE) file for details. -### Development Guidelines +--- -- Follow C# coding conventions -- Use meaningful commit messages -- Update documentation for new features -- Add unit tests for new functionality -- Ensure responsive design compatibility +## 📞 Support -## 📄 License +### Getting Help -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +- 📧 **Email:** cisguru@outlook.com +- 🐛 **Bug Reports:** [GitHub Issues](https://github.com/xnodeoncode/Aquiis/issues) +- 💡 **Feature Requests:** [GitHub Discussions](https://github.com/xnodeoncode/Aquiis/discussions) +- 📖 **Documentation:** [/Documentation/v1.0.0/](Documentation/v1.0.0/) -## 🆘 Support +### Community -### Documentation +- ⭐ Star this repository +- 🍴 Fork and contribute +- 💬 Join discussions +- 📢 Share feedback -- Check the `REVISIONS.md` file for recent changes -- Review component-specific README files in subdirectories -- Refer to ASP.NET Core and Blazor documentation +--- -### Common Issues +## 🙏 Acknowledgments -1. **Database Connection Issues**: Verify SQLite file permissions and path -2. **Build Errors**: Ensure .NET 9.0 SDK is installed -3. **Authentication Problems**: Check Identity configuration and user roles -4. **Performance Issues**: Review database indexing and query optimization +**Built with:** -### Getting Help +- ASP.NET Core team for the amazing framework +- Electron.NET team for desktop integration +- QuestPDF team for PDF generation +- SendGrid and Twilio for notification services +- GitHub Copilot for AI-assisted development -- Create an issue on GitHub for bugs -- Check existing issues for known problems -- Review the project documentation -- Contact the development team +**Special thanks:** -## 🏗️ Roadmap +- All beta testers and early adopters +- Open source community contributors +- Everyone who provided feedback and suggestions -### Upcoming Features +--- -- Mobile application support -- Advanced reporting and analytics -- Integration with accounting software -- Automated rent collection -- Multi-language support -- Advanced tenant screening -- IoT device integration -- API for third-party integrations +## 🎊 Status -### Performance Improvements +**v1.0.0 - General Availability** 🎉 -- Database optimization -- Caching implementation -- Background job processing -- File storage optimization -- Search performance enhancements +- ✅ **95.75% Production Ready** +- ✅ **303 tests passing** +- ✅ **CI/CD pipeline complete** +- ✅ **Documentation complete** +- 🚀 **Ready for production use!** --- -**Aquiis** - Streamlining Property Management for the Modern World +**Made with ❤️ for independent landlords everywhere** -Built with ❤️ using ASP.NET Core 9.0 and Blazor Server +**Happy property managing!** 🏠