Bläddra i källkod

Univate.2 > Additions to buy Timeshare

master
George Williams 4 år sedan
förälder
incheckning
d6c55d23aa

+ 3
- 1
UnivateProperties_API/Containers/Timeshare/WeekDto.cs Visa fil

@@ -74,6 +74,7 @@ namespace UnivateProperties_API.Containers.Timeshare
74 74
             Region = new RegionDto() { RegionCode = split[24].Trim() };
75 75
             IsTender = true;
76 76
             ReferedByAgent = false;
77
+            WeekType = ""; //TODO: Need to see how the data will come through from consoft. 
77 78
         }
78 79
 
79 80
         public WeekDto(TimeshareWeek week)
@@ -102,6 +103,7 @@ namespace UnivateProperties_API.Containers.Timeshare
102 103
             SellPrice = week.SellPrice;
103 104
             IsTender = false;
104 105
             ReferedByAgent = week.ReferedByAgent;
106
+            WeekType = week.WeekType.ToString();
105 107
         }
106 108
 
107 109
         public int Id { get; set; }
@@ -126,7 +128,7 @@ namespace UnivateProperties_API.Containers.Timeshare
126 128
         public double SellPrice { get; set; }
127 129
         public bool IsTender { get; set; }
128 130
         public bool ReferedByAgent { get; set; }
129
-
131
+        public string WeekType { get; set; }
130 132
         public string Display => $"{Resort.Display}  ({ArrivalDate.ToShortDateString()} - {DepartureDate.ToShortDateString()})";
131 133
         public string WeekUni => $"{Resort.ResortCode}-{UnitNumber}-{WeekNumber}";
132 134
     }    

+ 8
- 0
UnivateProperties_API/Enums.cs Visa fil

@@ -25,4 +25,12 @@
25 25
         Property,
26 26
         Bid
27 27
     }
28
+
29
+    public enum WeekType
30
+    {
31
+        Flexi,
32
+        Fixed,
33
+        Module,
34
+        Syndicate
35
+    }
28 36
 }

+ 1563
- 0
UnivateProperties_API/Migrations/20200904080501_WeekType added for weeks.Designer.cs
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 23
- 0
UnivateProperties_API/Migrations/20200904080501_WeekType added for weeks.cs Visa fil

@@ -0,0 +1,23 @@
1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace UnivateProperties_API.Migrations
4
+{
5
+    public partial class WeekTypeaddedforweeks : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+            migrationBuilder.AddColumn<int>(
10
+                name: "WeekType",
11
+                table: "Weeks",
12
+                nullable: false,
13
+                defaultValue: 0);
14
+        }
15
+
16
+        protected override void Down(MigrationBuilder migrationBuilder)
17
+        {
18
+            migrationBuilder.DropColumn(
19
+                name: "WeekType",
20
+                table: "Weeks");
21
+        }
22
+    }
23
+}

+ 2
- 0
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs Visa fil

@@ -1023,6 +1023,8 @@ namespace UnivateProperties_API.Migrations
1023 1023
 
1024 1024
                     b.Property<bool>("WeekPlacedForRental");
1025 1025
 
1026
+                    b.Property<int>("WeekType");
1027
+
1026 1028
                     b.HasKey("Id");
1027 1029
 
1028 1030
                     b.HasIndex("AgencyId");

+ 1
- 0
UnivateProperties_API/Model/Properties/Property.cs Visa fil

@@ -34,6 +34,7 @@ namespace UnivateProperties_API.Model.Properties
34 34
         public string PostalCode { get; set; }
35 35
         public string PropertCoords { get; set; }  
36 36
         public string AddressURL { get; set; }
37
+        public string PropertyRef { get; set; }
37 38
         public bool Published { get; set; }
38 39
         public DateTime DatePublished { get; set; }
39 40
         public string VirtualTour { get; set; }

+ 2
- 0
UnivateProperties_API/Model/Timeshare/TimeshareWeek.cs Visa fil

@@ -94,6 +94,8 @@ namespace UnivateProperties_API.Model.Timeshare
94 94
 
95 95
         [ForeignKey("Status")]
96 96
         public int StatusId { get; set; }
97
+
98
+        public WeekType WeekType { get; set; }
97 99
         #endregion
98 100
 
99 101
         #region Navigation

+ 1
- 1
UnivateProperties_API/appsettings.json Visa fil

@@ -9,7 +9,7 @@
9 9
   },
10 10
   "AllowedHosts": "*",
11 11
   "ConnectionStrings": {
12
-    "DefaultConnection": "Data Source=192.168.0.219;Initial Catalog=UniVateDemo;Persist Security Info=True;User Id=Provision;Password=What123!;Pooling=false;",
12
+    "DefaultConnection": "Data Source=localhost;Initial Catalog=UniVateDemo;Persist Security Info=True;User Id=Provision;Password=What123!;Pooling=false;",
13 13
     "TenderConnection": "http://www.unipoint-consoft.co.za/nph-srep.exe?cluvavail_test.sch&CLUB=LPA&RESORT=ALL&SUMMARY=N&HEAD=N"
14 14
   }
15 15
 }

Laddar…
Avbryt
Spara