//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using UnivateProperties_API.Context;
namespace UnivateProperties_API.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20191014123820_Location_Templates")]
partial class Location_Templates
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("UnivateProperties_API.Model.Banks.Bank", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Name");
b.Property("UniversalBranchCode");
b.HasKey("Id");
b.ToTable("Banks");
});
modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AccountHolder");
b.Property("AccountNumber");
b.Property("BankId");
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("OwnerId");
b.HasKey("Id");
b.HasIndex("BankId");
b.HasIndex("OwnerId");
b.ToTable("BankAccounts");
});
modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("BCC");
b.Property("Body");
b.Property("CC");
b.Property("Comment");
b.Property("Created");
b.Property("IsBodyHtml");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("SenderId");
b.Property("Subject");
b.Property("To");
b.Property("ToDisplay");
b.HasKey("Id");
b.HasIndex("SenderId");
b.ToTable("Emails");
});
modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("BoundTo");
b.Property("Name");
b.Property("TemplateId");
b.HasKey("Id");
b.HasIndex("TemplateId");
b.ToTable("PlaceHolders");
});
modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Address");
b.Property("Created");
b.Property("DisplayName");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("SMTPHostId");
b.HasKey("Id");
b.HasIndex("SMTPHostId");
b.ToTable("Accounts");
});
modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("Host");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("NeedsAuthorize");
b.Property("Password");
b.Property("UseSSL");
b.Property("User");
b.HasKey("Id");
b.ToTable("Hosts");
});
modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Body");
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Name");
b.Property("Subject");
b.HasKey("Id");
b.ToTable("Templates");
});
modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Search");
b.Property("Type");
b.HasKey("Id");
b.ToTable("SearchLogs");
});
modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("City");
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PostalCode");
b.Property("Street");
b.Property("StreetNumber");
b.Property("Suburb");
b.HasKey("Id");
b.ToTable("Addresses");
});
modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("IsDeleted");
b.Property("IsTesting");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PropertyImageLocation");
b.HasKey("Id");
b.ToTable("Location");
});
modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Amount");
b.Property("BidMakerId");
b.Property("Comment");
b.Property("Created");
b.Property("DeclinedReason");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PropertyId");
b.Property("StatusId");
b.Property("TimeshareWeekId");
b.HasKey("Id");
b.HasIndex("BidMakerId");
b.HasIndex("PropertyId");
b.HasIndex("StatusId");
b.HasIndex("TimeshareWeekId");
b.ToTable("BidItems");
});
modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PropertyID");
b.Property("StatusID");
b.Property("TimeshareID");
b.HasKey("Id");
b.HasIndex("PropertyID");
b.HasIndex("StatusID");
b.HasIndex("TimeshareID");
b.ToTable("ProcessFlows");
});
modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AddressLine1");
b.Property("AddressLine2");
b.Property("AddressLine3");
b.Property("AgencyId");
b.Property("AgentId");
b.Property("CityId");
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("IsSale");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("OperationalCosts");
b.Property("OwnerId");
b.Property("Price");
b.Property("PricePer");
b.Property("PropertyName");
b.Property("PropertyTypeId");
b.Property("ProvinceId");
b.Property("Published");
b.Property("ShortDescription");
b.Property("StatusId");
b.Property("SuburbId");
b.Property("Unit");
b.HasKey("Id");
b.HasIndex("AgencyId");
b.HasIndex("AgentId");
b.HasIndex("CityId");
b.HasIndex("OwnerId");
b.HasIndex("PropertyTypeId");
b.HasIndex("ProvinceId");
b.HasIndex("StatusId");
b.HasIndex("SuburbId");
b.ToTable("Properties");
});
modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("Image");
b.Property("IsDefault");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PropertyId");
b.HasKey("Id");
b.HasIndex("PropertyId");
b.ToTable("PropertyImages");
});
modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("UsageType");
b.HasKey("Id");
b.ToTable("PropertyTypes");
});
modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PropertyId");
b.Property("UserDefinedFieldId");
b.Property("Value");
b.HasKey("Id");
b.HasIndex("PropertyId");
b.HasIndex("UserDefinedFieldId");
b.ToTable("PropertyUserFields");
});
modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("FieldName");
b.Property("FieldType");
b.Property("GroupId");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Rank");
b.HasKey("Id");
b.HasIndex("GroupId");
b.ToTable("UserDefinedFields");
});
modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Rank");
b.Property("UsageType");
b.HasKey("Id");
b.ToTable("UserDefinedGroups");
});
modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Code");
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("ProvinceId");
b.HasKey("Id");
b.HasIndex("ProvinceId");
b.ToTable("Cities");
});
modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Code");
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.HasKey("Id");
b.ToTable("Provinces");
});
modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("CityId");
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("PostalCode");
b.HasKey("Id");
b.HasIndex("CityId");
b.ToTable("Suburbs");
});
modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Name");
b.HasKey("Id");
b.ToTable("Seasons");
});
modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Code");
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("StatusType");
b.HasKey("Id");
b.ToTable("Status");
});
modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AgencyId");
b.Property("AgentAsRep");
b.Property("AgentId");
b.Property("ArrivalDate");
b.Property("BankedWith");
b.Property("Bedrooms");
b.Property("Created");
b.Property("CurrentYearBanked");
b.Property("DepartureDate");
b.Property("IsDeleted");
b.Property("LeviesPaidInFull");
b.Property("LevyAmount");
b.Property("MaxSleep");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("Module");
b.Property("OriginalPurchaseDate");
b.Property("OriginalPurchasePrice");
b.Property("OtherResort");
b.Property("OwnerId");
b.Property("ReferedByAgent");
b.Property("RegionId");
b.Property("ResortCode");
b.Property("ResortName");
b.Property("Season");
b.Property("SellPrice");
b.Property("StatusId");
b.Property("UnitNumber");
b.Property("WeekNumber");
b.Property("WeekPlacedForRental");
b.HasKey("Id");
b.HasIndex("AgencyId");
b.HasIndex("AgentId");
b.HasIndex("OwnerId");
b.HasIndex("RegionId");
b.HasIndex("StatusId");
b.ToTable("Weeks");
});
modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Adults");
b.Property("Bedrooms");
b.Property("Children");
b.Property("Code");
b.Property("Created");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.ToTable("UnitConfigurations");
});
modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("Created");
b.Property("Description");
b.Property("IsDeleted");
b.Property("Modified");
b.Property("ModifiedBy");
b.Property("UnitConfigurationId");
b.HasKey("Id");
b.HasIndex("UnitConfigurationId");
b.ToTable("UnitConfigurationTypes");
});
modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
{
b.Property