瀏覽代碼

Restaurant Categories & Authentication

master
George Williams 4 年之前
父節點
當前提交
bf2ea543a5
共有 62 個檔案被更改,包括 3326 行新增301 行删除
  1. 二進制
      .vs/ProRestaurant/DesignTimeBuild/.dtbcache.v2
  2. 二進制
      .vs/ProRestaurant/v16/.suo
  3. 7
    0
      ProRestaurant/Classes/AppSettings.cs
  4. 15
    0
      ProRestaurant/Classes/Enums.cs
  5. 64
    0
      ProRestaurant/Classes/ImageFormatter.cs
  6. 27
    0
      ProRestaurant/Containers/RestaurantContainer.cs
  7. 11
    0
      ProRestaurant/Containers/TradingHoursContainer.cs
  8. 14
    3
      ProRestaurant/Containers/UserContainer.cs
  9. 34
    0
      ProRestaurant/Controllers/Accounts/AuthenticationController.cs
  10. 56
    0
      ProRestaurant/Controllers/Accounts/RegistrationController.cs
  11. 0
    72
      ProRestaurant/Controllers/Accounts/UserController.cs
  12. 6
    0
      ProRestaurant/Controllers/Restaurants/IRestaurantCategory.cs
  13. 58
    0
      ProRestaurant/Controllers/Restaurants/RestaurantCategoryController.cs
  14. 2
    2
      ProRestaurant/Controllers/Restaurants/RestaurantController.cs
  15. 20
    5
      ProRestaurant/DBContexts/DBContext.cs
  16. 87
    4
      ProRestaurant/Migrations/20200608091919_ReInitDB.Designer.cs
  17. 79
    5
      ProRestaurant/Migrations/20200608091919_ReInitDB.cs
  18. 371
    0
      ProRestaurant/Migrations/20200608113150_001.Designer.cs
  19. 23
    0
      ProRestaurant/Migrations/20200608113150_001.cs
  20. 388
    0
      ProRestaurant/Migrations/20200608133845_002.Designer.cs
  21. 48
    0
      ProRestaurant/Migrations/20200608133845_002.cs
  22. 386
    0
      ProRestaurant/Migrations/20200608133952_003.Designer.cs
  23. 23
    0
      ProRestaurant/Migrations/20200608133952_003.cs
  24. 390
    0
      ProRestaurant/Migrations/20200609191325_004.Designer.cs
  25. 31
    0
      ProRestaurant/Migrations/20200609191325_004.cs
  26. 107
    3
      ProRestaurant/Migrations/DBContextModelSnapshot.cs
  27. 6
    2
      ProRestaurant/Models/Accounts/User.cs
  28. 2
    0
      ProRestaurant/Models/Accounts/UserAddress.cs
  29. 14
    0
      ProRestaurant/Models/Misc/Locations.cs
  30. 20
    9
      ProRestaurant/Models/Restaurants/Restaurant.cs
  31. 14
    0
      ProRestaurant/Models/Restaurants/RestaurantCategory.cs
  32. 16
    0
      ProRestaurant/Models/Restaurants/RestaurantUser.cs
  33. 2
    0
      ProRestaurant/Models/Restaurants/TradingHours.cs
  34. 3
    1
      ProRestaurant/ProRestaurant.csproj
  35. 1
    0
      ProRestaurant/ProRestaurant.csproj.user
  36. 7
    8
      ProRestaurant/Program.cs
  37. 80
    0
      ProRestaurant/Repository/Accounts/AuthenticateRepository.cs
  38. 16
    0
      ProRestaurant/Repository/Accounts/IRegistrationRepository.cs
  39. 0
    20
      ProRestaurant/Repository/Accounts/IUserRepository.cs
  40. 227
    0
      ProRestaurant/Repository/Accounts/RegistrationRepository.cs
  41. 0
    99
      ProRestaurant/Repository/Accounts/UserRepository.cs
  42. 19
    0
      ProRestaurant/Repository/Restaurants/IMenuCategoryRepository.cs
  43. 16
    0
      ProRestaurant/Repository/Restaurants/IRestaurantCategoryRepository.cs
  44. 4
    3
      ProRestaurant/Repository/Restaurants/IRestaurantRepository.cs
  45. 58
    0
      ProRestaurant/Repository/Restaurants/MenuCategoryRepository.cs
  46. 56
    0
      ProRestaurant/Repository/Restaurants/RestaurantCategoryRepository.cs
  47. 32
    3
      ProRestaurant/Repository/Restaurants/RestaurantRepository.cs
  48. 40
    2
      ProRestaurant/Startup.cs
  49. 4
    1
      ProRestaurant/appsettings.json
  50. 182
    48
      ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.deps.json
  51. 二進制
      ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.dll
  52. 二進制
      ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.pdb
  53. 4
    1
      ProRestaurant/bin/Debug/netcoreapp2.2/appsettings.json
  54. 二進制
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.assets.cache
  55. 1
    1
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.CoreCompileInputs.cache
  56. 1
    1
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.FileListAbsolute.txt
  57. 二進制
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csprojAssemblyReference.cache
  58. 二進制
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.dll
  59. 二進制
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.pdb
  60. 8
    0
      ProRestaurant/obj/ProRestaurant.csproj.nuget.dgspec.json
  61. 240
    6
      ProRestaurant/obj/project.assets.json
  62. 6
    2
      ProRestaurant/obj/project.nuget.cache

二進制
.vs/ProRestaurant/DesignTimeBuild/.dtbcache.v2 查看文件


二進制
.vs/ProRestaurant/v16/.suo 查看文件


+ 7
- 0
ProRestaurant/Classes/AppSettings.cs 查看文件

@@ -0,0 +1,7 @@
1
+namespace ProRestaurant.Classes
2
+{
3
+    public class AppSettings
4
+    {
5
+        public string Secret { get; set; }
6
+    }
7
+}

+ 15
- 0
ProRestaurant/Classes/Enums.cs 查看文件

@@ -0,0 +1,15 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+
6
+namespace ProRestaurant.Classes
7
+{
8
+    public enum SystemRole
9
+    {
10
+        SuperAdmin,
11
+        RestaurantAdmin,
12
+        RestaurantUser,        
13
+        Customer
14
+    }
15
+}

+ 64
- 0
ProRestaurant/Classes/ImageFormatter.cs 查看文件

@@ -0,0 +1,64 @@
1
+using System;
2
+using System.Drawing;
3
+using System.IO;
4
+
5
+namespace ProRestaurant.Classes
6
+{
7
+    public class ImageFormatter
8
+    {
9
+        public static string Base64ToImage(string binData, string path, string name)
10
+        {
11
+            string extention = ".jpg";
12
+            if (binData.StartsWith("data:image/gif;base64,"))
13
+            {
14
+                extention = ".gif";
15
+                binData = binData.Replace("data:image/gif;base64,", "");
16
+            }
17
+            if (binData.StartsWith("data:image/jpeg;base64,"))
18
+            {
19
+                extention = ".jpg";
20
+                binData = binData.Replace("data:image/jpeg;base64,", "");
21
+            }
22
+            if (binData.StartsWith("data:image/png;base64,"))
23
+            {
24
+                extention = ".png";
25
+                binData = binData.Replace("data:image/png;base64,", "");
26
+            }
27
+
28
+            if (!Directory.Exists(path))
29
+                Directory.CreateDirectory(path);
30
+
31
+            string filePath = string.Format(@"{0}\{1}{2}", path, name, extention);
32
+            File.WriteAllBytes(filePath, Convert.FromBase64String(binData));
33
+            return filePath;
34
+        }
35
+
36
+        public static string ImageToBase64(string Path)
37
+        {
38
+            if (File.Exists(Path))
39
+            {
40
+                using (Image image = Image.FromFile(Path))
41
+                {
42
+                    using (MemoryStream m = new MemoryStream())
43
+                    {
44
+                        image.Save(m, image.RawFormat);
45
+                        byte[] imageBytes = m.ToArray();
46
+
47
+                        string base64String = Convert.ToBase64String(imageBytes);
48
+
49
+                        if (Path.EndsWith(".jpg") || Path.EndsWith(".jpeg"))
50
+                            base64String = "data:image/jpeg;base64," + base64String;
51
+                        if (Path.EndsWith(".gif"))
52
+                            base64String = "data:image/gif;base64," + base64String;
53
+                        if (base64String.EndsWith(".png"))
54
+                            base64String = "data:image/png;base64," + base64String;
55
+
56
+                        return base64String;
57
+                    }
58
+                }
59
+            }
60
+            else
61
+                return "";
62
+        }
63
+    }
64
+}

+ 27
- 0
ProRestaurant/Containers/RestaurantContainer.cs 查看文件

@@ -0,0 +1,27 @@
1
+using ProRestaurant.Models.Restaurants;
2
+using System.Collections.Generic;
3
+
4
+namespace ProRestaurant.Containers
5
+{
6
+    public class RestaurantContainer : Restaurant
7
+    {
8
+        public string UserFirstName { get; set; }
9
+        public string UserSurname { get; set; }        
10
+        public string UserEmailAddress { get; set; }
11
+        public string UserPassword { get; set; }
12
+
13
+        public List<TradingHoursContainer> THours { get; set; }        
14
+        public string Result { get; set; }        
15
+    }
16
+
17
+    public class RestaurantCard
18
+    {
19
+        public int Id { get; set; }
20
+        public string Logo { get; set; }
21
+        public string Name { get; set; }
22
+        public string Suburb { get; set; }
23
+        public string SubText { get; set; }
24
+        public string DeliveryTime { get; set; }
25
+        public string DeliveryFee { get; set; }
26
+    }
27
+}

+ 11
- 0
ProRestaurant/Containers/TradingHoursContainer.cs 查看文件

@@ -0,0 +1,11 @@
1
+namespace ProRestaurant.Containers
2
+{
3
+    public class TradingHoursContainer
4
+    {
5
+        public string Description { get; set; }
6
+        public string From { get; set; }
7
+        public string To { get; set; }
8
+        public bool Closed { get; set; }
9
+        public bool Open24 { get; set; }
10
+    }
11
+}

+ 14
- 3
ProRestaurant/Containers/UserContainer.cs 查看文件

@@ -2,9 +2,20 @@
2 2
 
3 3
 namespace ProRestaurant.Containers
4 4
 {
5
-    public class UserContainer 
5
+    public class UserContainer : User
6 6
     {
7
-        public string ResultString { get; set; }
8
-        public User user { get; set; }
7
+        public string ResultString { get; set; }       
8
+    }
9
+
10
+    public class AuthenticationContiner
11
+    {        
12
+        public int ID { get; set; }
13
+        public string Name { get; set; }
14
+        public string Surname { get; set; }
15
+        public string EmailAddress { get; set; }
16
+        public string Password { get; set; }
17
+        public string Role { get; set; }
18
+        public string Result { get; set; }
19
+        public string Token { get; set; }
9 20
     }
10 21
 }

+ 34
- 0
ProRestaurant/Controllers/Accounts/AuthenticationController.cs 查看文件

@@ -0,0 +1,34 @@
1
+
2
+using Microsoft.AspNetCore.Mvc;
3
+using ProRestaurant.Containers;
4
+using ProRestaurant.Repository.Accounts;
5
+
6
+namespace ProRestaurant.Controllers.Accounts
7
+{
8
+    [Route("api/[controller]")]
9
+    [ApiController]
10
+    public class AuthenticationController : ControllerBase
11
+    {
12
+        private IAuthenticateRepository repo;
13
+        public AuthenticationController(IAuthenticateRepository Repo)
14
+        {
15
+            repo = Repo;
16
+        }
17
+
18
+        [HttpGet]
19
+        public IActionResult Get()
20
+        {
21
+            return new OkObjectResult(repo.GetAuthenticationContiner());
22
+        }       
23
+        
24
+        [HttpPost("authenticate")]
25
+        public IActionResult Authenticate([FromBody] AuthenticationContiner User)
26
+        {
27
+            var user = repo.Login(User);
28
+            if (user.Result != "Access Granted")
29
+                return BadRequest(new { message = user.Result });
30
+
31
+            return Ok(user);
32
+        }        
33
+    }
34
+}

+ 56
- 0
ProRestaurant/Controllers/Accounts/RegistrationController.cs 查看文件

@@ -0,0 +1,56 @@
1
+using Microsoft.AspNetCore.Mvc;
2
+using ProRestaurant.Containers;
3
+using ProRestaurant.Repository.Accounts;
4
+using System.Transactions;
5
+
6
+
7
+namespace ProRestaurant.Controllers.Accounts
8
+{
9
+    [Route("api/[controller]")]
10
+    [ApiController]
11
+    public class RegistrationController : ControllerBase
12
+    {
13
+        private readonly IRegistrationRepository regRepository;
14
+
15
+        public RegistrationController(IRegistrationRepository regRepo)
16
+        {
17
+            regRepository = regRepo;
18
+        }               
19
+
20
+        [HttpGet("GetUserContainer")]
21
+        public IActionResult GetUserContainer()
22
+        {
23
+            var userContainer = regRepository.GetUserContainer();
24
+            return new OkObjectResult(userContainer);
25
+        }
26
+
27
+        [HttpGet("GetRestaurantContainer")]
28
+        public IActionResult GetRestaurantContainer()
29
+        {
30
+            var container = regRepository.GetRestaurantContainer();
31
+            return new OkObjectResult(container);
32
+        }        
33
+
34
+        [HttpPost("resgisterRestaurant")]
35
+        public IActionResult ResgisterRestaurant([FromBody] RestaurantContainer container)
36
+        {
37
+            using (var scope = new TransactionScope())
38
+            {
39
+                regRepository.RegisterRestaurant(container);
40
+                scope.Complete();
41
+                return new OkObjectResult(container);                
42
+            }
43
+        }
44
+
45
+        [HttpPost("resgisterUser")]
46
+        public IActionResult ResgisterUser([FromBody] UserContainer container)
47
+        {
48
+            using (var scope = new TransactionScope())
49
+            {
50
+                regRepository.RegisterUser(container);
51
+                scope.Complete();                
52
+                return new OkObjectResult(container);
53
+            }
54
+        }
55
+    }
56
+}

+ 0
- 72
ProRestaurant/Controllers/Accounts/UserController.cs 查看文件

@@ -1,72 +0,0 @@
1
-using Microsoft.AspNetCore.Mvc;
2
-using ProRestaurant.Models.Accounts;
3
-using ProRestaurant.Repository.Accounts;
4
-using System.Transactions;
5
-
6
-
7
-namespace ProRestaurant.Controllers.Accounts
8
-{
9
-    [Route("api/[controller]")]
10
-    [ApiController]
11
-    public class UserController : ControllerBase
12
-    {
13
-        private readonly IUserRepository userRepository;
14
-
15
-        public UserController(IUserRepository userRepo)
16
-        {
17
-            userRepository = userRepo;
18
-        }
19
-        
20
-        [HttpGet]
21
-        public IActionResult Get()
22
-        {
23
-            return new OkObjectResult(userRepository.GetUsers());
24
-        }
25
-        
26
-        [HttpGet("{id}")]
27
-        public IActionResult Get(int id)
28
-        {
29
-            var user = userRepository.GetUser(u => u.Id == id);
30
-            return new OkObjectResult(user);
31
-        }
32
-
33
-        [HttpGet("Login/{username}/{password}")]
34
-        public IActionResult Login(string username, string password)
35
-        {
36
-            return new OkObjectResult(userRepository.Login(username, password));
37
-        }
38
-        
39
-        [HttpPost]
40
-        public IActionResult Post([FromBody] User user)
41
-        {
42
-            using (var scope = new TransactionScope())
43
-            {
44
-                userRepository.Insert(user);
45
-                scope.Complete();
46
-                return CreatedAtAction(nameof(Get), new { id = user.Id }, user);
47
-            }
48
-        }
49
-        
50
-        [HttpPut]
51
-        public IActionResult Put([FromBody] User user)
52
-        {
53
-            if (user != null)
54
-            {
55
-                using (var scope = new TransactionScope())
56
-                {
57
-                    userRepository.Update(user);
58
-                    scope.Complete();
59
-                    return new OkResult();
60
-                }
61
-            }
62
-            return new NoContentResult();
63
-        }
64
-        
65
-        [HttpDelete("{id}")]
66
-        public IActionResult Delete(int id)
67
-        {
68
-            userRepository.Remove(userRepository.GetUser(u => u.Id == id));
69
-            return new OkResult();
70
-        }
71
-    }
72
-}

+ 6
- 0
ProRestaurant/Controllers/Restaurants/IRestaurantCategory.cs 查看文件

@@ -0,0 +1,6 @@
1
+namespace ProRestaurant.Controllers.Restaurants
2
+{
3
+    internal interface IRestaurantCategory
4
+    {
5
+    }
6
+}

+ 58
- 0
ProRestaurant/Controllers/Restaurants/RestaurantCategoryController.cs 查看文件

@@ -0,0 +1,58 @@
1
+using Microsoft.AspNetCore.Mvc;
2
+using ProRestaurant.Models.Restaurants;
3
+using ProRestaurant.Repository.Restaurants;
4
+using System.Transactions;
5
+
6
+namespace ProRestaurant.Controllers.Restaurants
7
+{
8
+    [Route("api/[controller]")]
9
+    [ApiController]
10
+    public class RestaurantCategoryController : Controller
11
+    {
12
+        private readonly IRestaurantCategoryRepository repo; 
13
+
14
+        public RestaurantCategoryController(IRestaurantCategoryRepository Repo)
15
+        {
16
+            repo = Repo;
17
+        }
18
+
19
+        [HttpGet]
20
+        public IActionResult Get()
21
+        {
22
+            return new OkObjectResult(repo.Get());
23
+        }
24
+
25
+        [HttpPost]
26
+        public IActionResult Post([FromBody] RestaurantCategory category)
27
+        {
28
+            using (var scope = new TransactionScope())
29
+            {
30
+                repo.Insert(category);
31
+                scope.Complete();
32
+                return new OkObjectResult(category);
33
+            }
34
+        }
35
+
36
+        [HttpPut]
37
+        public IActionResult Put([FromBody] RestaurantCategory category)
38
+        {
39
+            if (category != null)
40
+            {
41
+                using (var scope = new TransactionScope())
42
+                {
43
+                    repo.Update(category);
44
+                    scope.Complete();
45
+                    return new OkResult();
46
+                }
47
+            }
48
+            return new NoContentResult();
49
+        }
50
+
51
+        [HttpDelete("{id}")]
52
+        public IActionResult Delete(int id)
53
+        {            
54
+            repo.Remove(id);
55
+            return new OkResult();
56
+        }
57
+    }
58
+}

+ 2
- 2
ProRestaurant/Controllers/Restaurants/RestaurantController.cs 查看文件

@@ -19,7 +19,7 @@ namespace ProRestaurant.Controllers.Restaurants
19 19
         [HttpGet]
20 20
         public IActionResult Get()
21 21
         {
22
-            return new OkObjectResult(repo.GetUsers());
22
+            return new OkObjectResult(repo.GetSearch());
23 23
         }
24 24
 
25 25
         [HttpGet("{id}")]
@@ -27,7 +27,7 @@ namespace ProRestaurant.Controllers.Restaurants
27 27
         {
28 28
             var restaurant = repo.GetRestaurant(u => u.Id == id);
29 29
             return new OkObjectResult(restaurant);
30
-        }
30
+        }        
31 31
 
32 32
         [HttpPost]
33 33
         public IActionResult Post([FromBody] Restaurant restaurant)

+ 20
- 5
ProRestaurant/DBContexts/DBContext.cs 查看文件

@@ -1,7 +1,9 @@
1
-using Microsoft.EntityFrameworkCore;
1
+using Microsoft.CodeAnalysis;
2
+using Microsoft.EntityFrameworkCore;
2 3
 using Npgsql;
3 4
 using ProRestaurant.Models;
4 5
 using ProRestaurant.Models.Accounts;
6
+using ProRestaurant.Models.Misc;
5 7
 using ProRestaurant.Models.Restaurants;
6 8
 using System.Data.SqlClient;
7 9
 using System.Linq;
@@ -41,10 +43,17 @@ namespace ProRestaurant.DBContexts
41 43
         public DbSet<TradingHours> TradingHours { get; set; }
42 44
         public DbSet<MenuCategory> MenuCategories { get; set; }
43 45
         public DbSet<MenuItem> MenuItems { get; set; }
44
-        #endregion 
46
+        public DbSet<RestaurantUser> RestaurantUsers { get; set; }
47
+        public DbSet<RestaurantCategory> RestaurantCategories { get; set; }
48
+        #endregion
49
+
50
+        #region Misc
51
+        public DbSet<Locations> Locations { get; set; }
52
+        #endregion
45 53
 
46 54
         public override int SaveChanges()
47 55
         {
56
+            bool isBaseObject = false;
48 57
             foreach (var item in ChangeTracker
49 58
                                     .Entries()
50 59
                                     .Where(x => x.State == EntityState.Modified || x.State == EntityState.Added)
@@ -53,17 +62,20 @@ namespace ProRestaurant.DBContexts
53 62
             {
54 63
                 if (item is BaseObject)
55 64
                 {
65
+                    isBaseObject = true;
56 66
                     (item as BaseObject).UpdateModified(string.Empty);
57 67
                 }
58 68
             }
59
-            UpdateSoftDeleteStatuses();
69
+            if (isBaseObject)
70
+                UpdateSoftDeleteStatuses();
71
+
60 72
             return base.SaveChanges();
61 73
         }
62 74
 
63 75
         private void UpdateSoftDeleteStatuses()
64
-        {
76
+        {            
65 77
             foreach (var entry in ChangeTracker.Entries())
66
-            {
78
+            {                
67 79
                 switch (entry.State)
68 80
                 {
69 81
                     case EntityState.Added:
@@ -84,6 +96,9 @@ namespace ProRestaurant.DBContexts
84 96
             modelBuilder.Entity<DriverDetail>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
85 97
             modelBuilder.Entity<Restaurant>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
86 98
             modelBuilder.Entity<TradingHours>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
99
+            modelBuilder.Entity<MenuCategory>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
100
+            modelBuilder.Entity<MenuItem>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
101
+            modelBuilder.Entity<RestaurantUser>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);            
87 102
         }
88 103
 
89 104
         public int GetNextID(string tableName)

ProRestaurant/Migrations/20200526094220_initialCreate.Designer.cs → ProRestaurant/Migrations/20200608091919_ReInitDB.Designer.cs 查看文件

@@ -10,8 +10,8 @@ using ProRestaurant.DBContexts;
10 10
 namespace ProRestaurant.Migrations
11 11
 {
12 12
     [DbContext(typeof(DBContext))]
13
-    [Migration("20200526094220_initialCreate")]
14
-    partial class initialCreate
13
+    [Migration("20200608091919_ReInitDB")]
14
+    partial class ReInitDB
15 15
     {
16 16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
17 17
         {
@@ -73,6 +73,8 @@ namespace ProRestaurant.Migrations
73 73
 
74 74
                     b.Property<string>("Surname");
75 75
 
76
+                    b.Property<int>("SystemRole");
77
+
76 78
                     b.HasKey("Id");
77 79
 
78 80
                     b.ToTable("Users");
@@ -92,6 +94,10 @@ namespace ProRestaurant.Migrations
92 94
 
93 95
                     b.Property<DateTime>("Created");
94 96
 
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
95 101
                     b.Property<bool>("IsDeleted");
96 102
 
97 103
                     b.Property<decimal>("Latitude");
@@ -123,6 +129,19 @@ namespace ProRestaurant.Migrations
123 129
                     b.ToTable("UserAddresses");
124 130
                 });
125 131
 
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
126 145
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
127 146
                 {
128 147
                     b.Property<int>("Id")
@@ -187,18 +206,26 @@ namespace ProRestaurant.Migrations
187 206
 
188 207
                     b.Property<bool>("Chain");
189 208
 
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
212
+
190 213
                     b.Property<DateTime>("Created");
191 214
 
192 215
                     b.Property<decimal>("DeliveryFee");
193 216
 
194 217
                     b.Property<decimal>("DeliveryRadius");
195 218
 
219
+                    b.Property<string>("GoogleMapUrl");
220
+
196 221
                     b.Property<bool>("IsDeleted");
197 222
 
198
-                    b.Property<string>("Location");
223
+                    b.Property<decimal>("Latitude");
199 224
 
200 225
                     b.Property<string>("Logo");
201 226
 
227
+                    b.Property<decimal>("Longitude");
228
+
202 229
                     b.Property<string>("MethodsOfPayment");
203 230
 
204 231
                     b.Property<DateTime>("Modified");
@@ -207,17 +234,60 @@ namespace ProRestaurant.Migrations
207 234
 
208 235
                     b.Property<string>("Name");
209 236
 
237
+                    b.Property<string>("PostalCode");
238
+
239
+                    b.Property<string>("Provice");
240
+
241
+                    b.Property<string>("ShopNumber");
242
+
243
+                    b.Property<string>("ShoppingCentre");
244
+
245
+                    b.Property<string>("StreetName");
246
+
247
+                    b.Property<string>("StreetNumber");
248
+
249
+                    b.Property<string>("Suburb");
250
+
210 251
                     b.HasKey("Id");
211 252
 
212 253
                     b.ToTable("Restaurants");
213 254
                 });
214 255
 
256
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
257
+                {
258
+                    b.Property<int>("Id")
259
+                        .ValueGeneratedOnAdd()
260
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
261
+
262
+                    b.Property<DateTime>("Created");
263
+
264
+                    b.Property<bool>("IsDeleted");
265
+
266
+                    b.Property<DateTime>("Modified");
267
+
268
+                    b.Property<string>("ModifiedBy");
269
+
270
+                    b.Property<int>("RestaurantId");
271
+
272
+                    b.Property<int>("UserId");
273
+
274
+                    b.HasKey("Id");
275
+
276
+                    b.HasIndex("RestaurantId");
277
+
278
+                    b.HasIndex("UserId");
279
+
280
+                    b.ToTable("RestaurantUsers");
281
+                });
282
+
215 283
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
216 284
                 {
217 285
                     b.Property<int>("Id")
218 286
                         .ValueGeneratedOnAdd()
219 287
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
220 288
 
289
+                    b.Property<bool>("Closed");
290
+
221 291
                     b.Property<DateTime>("ClosingTime");
222 292
 
223 293
                     b.Property<DateTime>("Created");
@@ -252,7 +322,7 @@ namespace ProRestaurant.Migrations
252 322
             modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
253 323
                 {
254 324
                     b.HasOne("ProRestaurant.Models.Accounts.User", "User")
255
-                        .WithMany()
325
+                        .WithMany("Addresses")
256 326
                         .HasForeignKey("UserId")
257 327
                         .OnDelete(DeleteBehavior.Cascade);
258 328
                 });
@@ -273,6 +343,19 @@ namespace ProRestaurant.Migrations
273 343
                         .OnDelete(DeleteBehavior.Cascade);
274 344
                 });
275 345
 
346
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
347
+                {
348
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
349
+                        .WithMany("Users")
350
+                        .HasForeignKey("RestaurantId")
351
+                        .OnDelete(DeleteBehavior.Cascade);
352
+
353
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
354
+                        .WithMany()
355
+                        .HasForeignKey("UserId")
356
+                        .OnDelete(DeleteBehavior.Cascade);
357
+                });
358
+
276 359
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
277 360
                 {
278 361
                     b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")

ProRestaurant/Migrations/20200526094220_initialCreate.cs → ProRestaurant/Migrations/20200608091919_ReInitDB.cs 查看文件

@@ -4,10 +4,23 @@ using Microsoft.EntityFrameworkCore.Migrations;
4 4
 
5 5
 namespace ProRestaurant.Migrations
6 6
 {
7
-    public partial class initialCreate : Migration
7
+    public partial class ReInitDB : Migration
8 8
     {
9 9
         protected override void Up(MigrationBuilder migrationBuilder)
10 10
         {
11
+            migrationBuilder.CreateTable(
12
+                name: "Locations",
13
+                columns: table => new
14
+                {
15
+                    Id = table.Column<int>(nullable: false)
16
+                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
17
+                    ImageStore = table.Column<string>(nullable: true)
18
+                },
19
+                constraints: table =>
20
+                {
21
+                    table.PrimaryKey("PK_Locations", x => x.Id);
22
+                });
23
+
11 24
             migrationBuilder.CreateTable(
12 25
                 name: "Restaurants",
13 26
                 columns: table => new
@@ -19,12 +32,23 @@ namespace ProRestaurant.Migrations
19 32
                     ModifiedBy = table.Column<string>(nullable: true),
20 33
                     IsDeleted = table.Column<bool>(nullable: false),
21 34
                     Name = table.Column<string>(nullable: true),
22
-                    Location = table.Column<string>(nullable: true),
23 35
                     Logo = table.Column<string>(nullable: true),
24 36
                     Chain = table.Column<bool>(nullable: false),
25 37
                     DeliveryFee = table.Column<decimal>(nullable: false),
26 38
                     DeliveryRadius = table.Column<decimal>(nullable: false),
27
-                    MethodsOfPayment = table.Column<string>(nullable: true)
39
+                    MethodsOfPayment = table.Column<string>(nullable: true),
40
+                    ShoppingCentre = table.Column<string>(nullable: true),
41
+                    ShopNumber = table.Column<string>(nullable: true),
42
+                    GoogleMapUrl = table.Column<string>(nullable: true),
43
+                    Latitude = table.Column<decimal>(nullable: false),
44
+                    Longitude = table.Column<decimal>(nullable: false),
45
+                    StreetNumber = table.Column<string>(nullable: true),
46
+                    StreetName = table.Column<string>(nullable: true),
47
+                    Suburb = table.Column<string>(nullable: true),
48
+                    City = table.Column<string>(nullable: true),
49
+                    Provice = table.Column<string>(nullable: true),
50
+                    Country = table.Column<string>(nullable: true),
51
+                    PostalCode = table.Column<string>(nullable: true)
28 52
                 },
29 53
                 constraints: table =>
30 54
                 {
@@ -45,7 +69,8 @@ namespace ProRestaurant.Migrations
45 69
                     Password = table.Column<string>(nullable: true),
46 70
                     FirstName = table.Column<string>(nullable: true),
47 71
                     Surname = table.Column<string>(nullable: true),
48
-                    Cellphone = table.Column<string>(nullable: true)
72
+                    Cellphone = table.Column<string>(nullable: true),
73
+                    SystemRole = table.Column<int>(nullable: false)
49 74
                 },
50 75
                 constraints: table =>
51 76
                 {
@@ -116,7 +141,8 @@ namespace ProRestaurant.Migrations
116 141
                     RestaurantId = table.Column<int>(nullable: false),
117 142
                     Description = table.Column<string>(nullable: true),
118 143
                     OpeningTime = table.Column<DateTime>(nullable: false),
119
-                    ClosingTime = table.Column<DateTime>(nullable: false)
144
+                    ClosingTime = table.Column<DateTime>(nullable: false),
145
+                    Closed = table.Column<bool>(nullable: false)
120 146
                 },
121 147
                 constraints: table =>
122 148
                 {
@@ -154,6 +180,36 @@ namespace ProRestaurant.Migrations
154 180
                         onDelete: ReferentialAction.Cascade);
155 181
                 });
156 182
 
183
+            migrationBuilder.CreateTable(
184
+                name: "RestaurantUsers",
185
+                columns: table => new
186
+                {
187
+                    Id = table.Column<int>(nullable: false)
188
+                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
189
+                    Created = table.Column<DateTime>(nullable: false),
190
+                    Modified = table.Column<DateTime>(nullable: false),
191
+                    ModifiedBy = table.Column<string>(nullable: true),
192
+                    IsDeleted = table.Column<bool>(nullable: false),
193
+                    UserId = table.Column<int>(nullable: false),
194
+                    RestaurantId = table.Column<int>(nullable: false)
195
+                },
196
+                constraints: table =>
197
+                {
198
+                    table.PrimaryKey("PK_RestaurantUsers", x => x.Id);
199
+                    table.ForeignKey(
200
+                        name: "FK_RestaurantUsers_Restaurants_RestaurantId",
201
+                        column: x => x.RestaurantId,
202
+                        principalTable: "Restaurants",
203
+                        principalColumn: "Id",
204
+                        onDelete: ReferentialAction.Cascade);
205
+                    table.ForeignKey(
206
+                        name: "FK_RestaurantUsers_Users_UserId",
207
+                        column: x => x.UserId,
208
+                        principalTable: "Users",
209
+                        principalColumn: "Id",
210
+                        onDelete: ReferentialAction.Cascade);
211
+                });
212
+
157 213
             migrationBuilder.CreateTable(
158 214
                 name: "UserAddresses",
159 215
                 columns: table => new
@@ -165,6 +221,8 @@ namespace ProRestaurant.Migrations
165 221
                     ModifiedBy = table.Column<string>(nullable: true),
166 222
                     IsDeleted = table.Column<bool>(nullable: false),
167 223
                     UserId = table.Column<int>(nullable: false),
224
+                    IsDefault = table.Column<bool>(nullable: false),
225
+                    GoogleMapUrl = table.Column<string>(nullable: true),
168 226
                     Latitude = table.Column<decimal>(nullable: false),
169 227
                     Longitude = table.Column<decimal>(nullable: false),
170 228
                     UnitNumber = table.Column<string>(nullable: true),
@@ -204,6 +262,16 @@ namespace ProRestaurant.Migrations
204 262
                 table: "MenuItems",
205 263
                 column: "RestaurantId");
206 264
 
265
+            migrationBuilder.CreateIndex(
266
+                name: "IX_RestaurantUsers_RestaurantId",
267
+                table: "RestaurantUsers",
268
+                column: "RestaurantId");
269
+
270
+            migrationBuilder.CreateIndex(
271
+                name: "IX_RestaurantUsers_UserId",
272
+                table: "RestaurantUsers",
273
+                column: "UserId");
274
+
207 275
             migrationBuilder.CreateIndex(
208 276
                 name: "IX_TradingHours_RestaurantId",
209 277
                 table: "TradingHours",
@@ -220,12 +288,18 @@ namespace ProRestaurant.Migrations
220 288
             migrationBuilder.DropTable(
221 289
                 name: "DriverDetails");
222 290
 
291
+            migrationBuilder.DropTable(
292
+                name: "Locations");
293
+
223 294
             migrationBuilder.DropTable(
224 295
                 name: "MenuCategories");
225 296
 
226 297
             migrationBuilder.DropTable(
227 298
                 name: "MenuItems");
228 299
 
300
+            migrationBuilder.DropTable(
301
+                name: "RestaurantUsers");
302
+
229 303
             migrationBuilder.DropTable(
230 304
                 name: "TradingHours");
231 305
 

+ 371
- 0
ProRestaurant/Migrations/20200608113150_001.Designer.cs 查看文件

@@ -0,0 +1,371 @@
1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200608113150_001")]
14
+    partial class _001
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
145
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
146
+                {
147
+                    b.Property<int>("Id")
148
+                        .ValueGeneratedOnAdd()
149
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
150
+
151
+                    b.Property<DateTime>("Created");
152
+
153
+                    b.Property<string>("Description");
154
+
155
+                    b.Property<bool>("IsDeleted");
156
+
157
+                    b.Property<DateTime>("Modified");
158
+
159
+                    b.Property<string>("ModifiedBy");
160
+
161
+                    b.Property<int>("RestaurantId");
162
+
163
+                    b.HasKey("Id");
164
+
165
+                    b.HasIndex("RestaurantId");
166
+
167
+                    b.ToTable("MenuCategories");
168
+                });
169
+
170
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
171
+                {
172
+                    b.Property<int>("Id")
173
+                        .ValueGeneratedOnAdd()
174
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
175
+
176
+                    b.Property<int>("CategoryId");
177
+
178
+                    b.Property<DateTime>("Created");
179
+
180
+                    b.Property<string>("Description");
181
+
182
+                    b.Property<string>("Image");
183
+
184
+                    b.Property<bool>("IsDeleted");
185
+
186
+                    b.Property<DateTime>("Modified");
187
+
188
+                    b.Property<string>("ModifiedBy");
189
+
190
+                    b.Property<decimal>("Price");
191
+
192
+                    b.Property<int>("RestaurantId");
193
+
194
+                    b.HasKey("Id");
195
+
196
+                    b.HasIndex("RestaurantId");
197
+
198
+                    b.ToTable("MenuItems");
199
+                });
200
+
201
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
202
+                {
203
+                    b.Property<int>("Id")
204
+                        .ValueGeneratedOnAdd()
205
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
206
+
207
+                    b.Property<bool>("Chain");
208
+
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
212
+
213
+                    b.Property<DateTime>("Created");
214
+
215
+                    b.Property<decimal>("DeliveryFee");
216
+
217
+                    b.Property<decimal>("DeliveryRadius");
218
+
219
+                    b.Property<string>("GoogleMapUrl");
220
+
221
+                    b.Property<bool>("IsDeleted");
222
+
223
+                    b.Property<decimal>("Latitude");
224
+
225
+                    b.Property<string>("Logo");
226
+
227
+                    b.Property<decimal>("Longitude");
228
+
229
+                    b.Property<string>("MethodsOfPayment");
230
+
231
+                    b.Property<DateTime>("Modified");
232
+
233
+                    b.Property<string>("ModifiedBy");
234
+
235
+                    b.Property<string>("Name");
236
+
237
+                    b.Property<string>("PostalCode");
238
+
239
+                    b.Property<string>("Provice");
240
+
241
+                    b.Property<string>("ShopNumber");
242
+
243
+                    b.Property<string>("ShoppingCentre");
244
+
245
+                    b.Property<string>("StreetName");
246
+
247
+                    b.Property<string>("StreetNumber");
248
+
249
+                    b.Property<string>("Suburb");
250
+
251
+                    b.HasKey("Id");
252
+
253
+                    b.ToTable("Restaurants");
254
+                });
255
+
256
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
257
+                {
258
+                    b.Property<int>("Id")
259
+                        .ValueGeneratedOnAdd()
260
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
261
+
262
+                    b.Property<DateTime>("Created");
263
+
264
+                    b.Property<bool>("IsDeleted");
265
+
266
+                    b.Property<DateTime>("Modified");
267
+
268
+                    b.Property<string>("ModifiedBy");
269
+
270
+                    b.Property<int>("RestaurantId");
271
+
272
+                    b.Property<int>("UserId");
273
+
274
+                    b.HasKey("Id");
275
+
276
+                    b.HasIndex("RestaurantId");
277
+
278
+                    b.HasIndex("UserId");
279
+
280
+                    b.ToTable("RestaurantUsers");
281
+                });
282
+
283
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
284
+                {
285
+                    b.Property<int>("Id")
286
+                        .ValueGeneratedOnAdd()
287
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
288
+
289
+                    b.Property<bool>("Closed");
290
+
291
+                    b.Property<DateTime>("ClosingTime");
292
+
293
+                    b.Property<DateTime>("Created");
294
+
295
+                    b.Property<string>("Description");
296
+
297
+                    b.Property<bool>("IsDeleted");
298
+
299
+                    b.Property<DateTime>("Modified");
300
+
301
+                    b.Property<string>("ModifiedBy");
302
+
303
+                    b.Property<bool>("Opened24H");
304
+
305
+                    b.Property<DateTime>("OpeningTime");
306
+
307
+                    b.Property<int>("RestaurantId");
308
+
309
+                    b.HasKey("Id");
310
+
311
+                    b.HasIndex("RestaurantId");
312
+
313
+                    b.ToTable("TradingHours");
314
+                });
315
+
316
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
317
+                {
318
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
319
+                        .WithOne("DriverDetails")
320
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
321
+                        .OnDelete(DeleteBehavior.Cascade);
322
+                });
323
+
324
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
325
+                {
326
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
327
+                        .WithMany("Addresses")
328
+                        .HasForeignKey("UserId")
329
+                        .OnDelete(DeleteBehavior.Cascade);
330
+                });
331
+
332
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
333
+                {
334
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
335
+                        .WithMany()
336
+                        .HasForeignKey("RestaurantId")
337
+                        .OnDelete(DeleteBehavior.Cascade);
338
+                });
339
+
340
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
341
+                {
342
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
343
+                        .WithMany()
344
+                        .HasForeignKey("RestaurantId")
345
+                        .OnDelete(DeleteBehavior.Cascade);
346
+                });
347
+
348
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
349
+                {
350
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
351
+                        .WithMany("Users")
352
+                        .HasForeignKey("RestaurantId")
353
+                        .OnDelete(DeleteBehavior.Cascade);
354
+
355
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
356
+                        .WithMany()
357
+                        .HasForeignKey("UserId")
358
+                        .OnDelete(DeleteBehavior.Cascade);
359
+                });
360
+
361
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
362
+                {
363
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
364
+                        .WithMany("TradingHours")
365
+                        .HasForeignKey("RestaurantId")
366
+                        .OnDelete(DeleteBehavior.Cascade);
367
+                });
368
+#pragma warning restore 612, 618
369
+        }
370
+    }
371
+}

+ 23
- 0
ProRestaurant/Migrations/20200608113150_001.cs 查看文件

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

+ 388
- 0
ProRestaurant/Migrations/20200608133845_002.Designer.cs 查看文件

@@ -0,0 +1,388 @@
1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200608133845_002")]
14
+    partial class _002
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
145
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
146
+                {
147
+                    b.Property<int>("Id")
148
+                        .ValueGeneratedOnAdd()
149
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
150
+
151
+                    b.Property<DateTime>("Created");
152
+
153
+                    b.Property<string>("Description");
154
+
155
+                    b.Property<bool>("IsDeleted");
156
+
157
+                    b.Property<DateTime>("Modified");
158
+
159
+                    b.Property<string>("ModifiedBy");
160
+
161
+                    b.Property<int>("RestaurantId");
162
+
163
+                    b.HasKey("Id");
164
+
165
+                    b.HasIndex("RestaurantId");
166
+
167
+                    b.ToTable("MenuCategories");
168
+                });
169
+
170
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
171
+                {
172
+                    b.Property<int>("Id")
173
+                        .ValueGeneratedOnAdd()
174
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
175
+
176
+                    b.Property<int>("CategoryId");
177
+
178
+                    b.Property<DateTime>("Created");
179
+
180
+                    b.Property<string>("Description");
181
+
182
+                    b.Property<string>("Image");
183
+
184
+                    b.Property<bool>("IsDeleted");
185
+
186
+                    b.Property<DateTime>("Modified");
187
+
188
+                    b.Property<string>("ModifiedBy");
189
+
190
+                    b.Property<decimal>("Price");
191
+
192
+                    b.Property<int>("RestaurantId");
193
+
194
+                    b.HasKey("Id");
195
+
196
+                    b.HasIndex("RestaurantId");
197
+
198
+                    b.ToTable("MenuItems");
199
+                });
200
+
201
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
202
+                {
203
+                    b.Property<int>("Id")
204
+                        .ValueGeneratedOnAdd()
205
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
206
+
207
+                    b.Property<string>("Categories");
208
+
209
+                    b.Property<bool>("Chain");
210
+
211
+                    b.Property<string>("City");
212
+
213
+                    b.Property<string>("Country");
214
+
215
+                    b.Property<DateTime>("Created");
216
+
217
+                    b.Property<decimal>("DeliveryFee");
218
+
219
+                    b.Property<decimal>("DeliveryRadius");
220
+
221
+                    b.Property<string>("DeliveryTime");
222
+
223
+                    b.Property<string>("GoogleMapUrl");
224
+
225
+                    b.Property<bool>("IsDeleted");
226
+
227
+                    b.Property<decimal>("Latitude");
228
+
229
+                    b.Property<string>("Logo");
230
+
231
+                    b.Property<decimal>("Longitude");
232
+
233
+                    b.Property<string>("MethodsOfPayment");
234
+
235
+                    b.Property<DateTime>("Modified");
236
+
237
+                    b.Property<string>("ModifiedBy");
238
+
239
+                    b.Property<string>("Name");
240
+
241
+                    b.Property<string>("PostalCode");
242
+
243
+                    b.Property<string>("Provice");
244
+
245
+                    b.Property<string>("ShopNumber");
246
+
247
+                    b.Property<string>("ShoppingCentre");
248
+
249
+                    b.Property<string>("StreetName");
250
+
251
+                    b.Property<string>("StreetNumber");
252
+
253
+                    b.Property<string>("Suburb");
254
+
255
+                    b.HasKey("Id");
256
+
257
+                    b.ToTable("Restaurants");
258
+                });
259
+
260
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
261
+                {
262
+                    b.Property<int>("Id")
263
+                        .ValueGeneratedOnAdd()
264
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
265
+
266
+                    b.Property<string>("Description");
267
+
268
+                    b.HasKey("Id");
269
+
270
+                    b.ToTable("RestaurantCategories");
271
+                });
272
+
273
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
274
+                {
275
+                    b.Property<int>("Id")
276
+                        .ValueGeneratedOnAdd()
277
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
278
+
279
+                    b.Property<DateTime>("Created");
280
+
281
+                    b.Property<bool>("IsDeleted");
282
+
283
+                    b.Property<DateTime>("Modified");
284
+
285
+                    b.Property<string>("ModifiedBy");
286
+
287
+                    b.Property<int>("RestaurantId");
288
+
289
+                    b.Property<int>("UserId");
290
+
291
+                    b.HasKey("Id");
292
+
293
+                    b.HasIndex("RestaurantId");
294
+
295
+                    b.HasIndex("UserId");
296
+
297
+                    b.ToTable("RestaurantUsers");
298
+                });
299
+
300
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
301
+                {
302
+                    b.Property<int>("Id")
303
+                        .ValueGeneratedOnAdd()
304
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
305
+
306
+                    b.Property<bool>("Closed");
307
+
308
+                    b.Property<DateTime>("ClosingTime");
309
+
310
+                    b.Property<DateTime>("Created");
311
+
312
+                    b.Property<string>("Description");
313
+
314
+                    b.Property<bool>("IsDeleted");
315
+
316
+                    b.Property<DateTime>("Modified");
317
+
318
+                    b.Property<string>("ModifiedBy");
319
+
320
+                    b.Property<bool>("Opened24H");
321
+
322
+                    b.Property<DateTime>("OpeningTime");
323
+
324
+                    b.Property<int>("RestaurantId");
325
+
326
+                    b.HasKey("Id");
327
+
328
+                    b.HasIndex("RestaurantId");
329
+
330
+                    b.ToTable("TradingHours");
331
+                });
332
+
333
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
334
+                {
335
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
336
+                        .WithOne("DriverDetails")
337
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
338
+                        .OnDelete(DeleteBehavior.Cascade);
339
+                });
340
+
341
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
342
+                {
343
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
344
+                        .WithMany("Addresses")
345
+                        .HasForeignKey("UserId")
346
+                        .OnDelete(DeleteBehavior.Cascade);
347
+                });
348
+
349
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
350
+                {
351
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
352
+                        .WithMany()
353
+                        .HasForeignKey("RestaurantId")
354
+                        .OnDelete(DeleteBehavior.Cascade);
355
+                });
356
+
357
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
358
+                {
359
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
360
+                        .WithMany()
361
+                        .HasForeignKey("RestaurantId")
362
+                        .OnDelete(DeleteBehavior.Cascade);
363
+                });
364
+
365
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
366
+                {
367
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
368
+                        .WithMany("Users")
369
+                        .HasForeignKey("RestaurantId")
370
+                        .OnDelete(DeleteBehavior.Cascade);
371
+
372
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
373
+                        .WithMany()
374
+                        .HasForeignKey("UserId")
375
+                        .OnDelete(DeleteBehavior.Cascade);
376
+                });
377
+
378
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
379
+                {
380
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
381
+                        .WithMany("TradingHours")
382
+                        .HasForeignKey("RestaurantId")
383
+                        .OnDelete(DeleteBehavior.Cascade);
384
+                });
385
+#pragma warning restore 612, 618
386
+        }
387
+    }
388
+}

+ 48
- 0
ProRestaurant/Migrations/20200608133845_002.cs 查看文件

@@ -0,0 +1,48 @@
1
+using Microsoft.EntityFrameworkCore.Metadata;
2
+using Microsoft.EntityFrameworkCore.Migrations;
3
+
4
+namespace ProRestaurant.Migrations
5
+{
6
+    public partial class _002 : Migration
7
+    {
8
+        protected override void Up(MigrationBuilder migrationBuilder)
9
+        {
10
+            migrationBuilder.AddColumn<string>(
11
+                name: "Categories",
12
+                table: "Restaurants",
13
+                nullable: true);
14
+
15
+            migrationBuilder.AddColumn<string>(
16
+                name: "DeliveryTime",
17
+                table: "Restaurants",
18
+                nullable: true);
19
+
20
+            migrationBuilder.CreateTable(
21
+                name: "RestaurantCategories",
22
+                columns: table => new
23
+                {
24
+                    Id = table.Column<int>(nullable: false)
25
+                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
26
+                    Description = table.Column<string>(nullable: true)
27
+                },
28
+                constraints: table =>
29
+                {
30
+                    table.PrimaryKey("PK_RestaurantCategories", x => x.Id);
31
+                });
32
+        }
33
+
34
+        protected override void Down(MigrationBuilder migrationBuilder)
35
+        {
36
+            migrationBuilder.DropTable(
37
+                name: "RestaurantCategories");
38
+
39
+            migrationBuilder.DropColumn(
40
+                name: "Categories",
41
+                table: "Restaurants");
42
+
43
+            migrationBuilder.DropColumn(
44
+                name: "DeliveryTime",
45
+                table: "Restaurants");
46
+        }
47
+    }
48
+}

+ 386
- 0
ProRestaurant/Migrations/20200608133952_003.Designer.cs 查看文件

@@ -0,0 +1,386 @@
1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200608133952_003")]
14
+    partial class _003
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
145
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
146
+                {
147
+                    b.Property<int>("Id")
148
+                        .ValueGeneratedOnAdd()
149
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
150
+
151
+                    b.Property<DateTime>("Created");
152
+
153
+                    b.Property<string>("Description");
154
+
155
+                    b.Property<bool>("IsDeleted");
156
+
157
+                    b.Property<DateTime>("Modified");
158
+
159
+                    b.Property<string>("ModifiedBy");
160
+
161
+                    b.Property<int>("RestaurantId");
162
+
163
+                    b.HasKey("Id");
164
+
165
+                    b.HasIndex("RestaurantId");
166
+
167
+                    b.ToTable("MenuCategories");
168
+                });
169
+
170
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
171
+                {
172
+                    b.Property<int>("Id")
173
+                        .ValueGeneratedOnAdd()
174
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
175
+
176
+                    b.Property<int>("CategoryId");
177
+
178
+                    b.Property<DateTime>("Created");
179
+
180
+                    b.Property<string>("Description");
181
+
182
+                    b.Property<string>("Image");
183
+
184
+                    b.Property<bool>("IsDeleted");
185
+
186
+                    b.Property<DateTime>("Modified");
187
+
188
+                    b.Property<string>("ModifiedBy");
189
+
190
+                    b.Property<decimal>("Price");
191
+
192
+                    b.Property<int>("RestaurantId");
193
+
194
+                    b.HasKey("Id");
195
+
196
+                    b.HasIndex("RestaurantId");
197
+
198
+                    b.ToTable("MenuItems");
199
+                });
200
+
201
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
202
+                {
203
+                    b.Property<int>("Id")
204
+                        .ValueGeneratedOnAdd()
205
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
206
+
207
+                    b.Property<string>("Categories");
208
+
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
212
+
213
+                    b.Property<DateTime>("Created");
214
+
215
+                    b.Property<decimal>("DeliveryFee");
216
+
217
+                    b.Property<decimal>("DeliveryRadius");
218
+
219
+                    b.Property<string>("DeliveryTime");
220
+
221
+                    b.Property<string>("GoogleMapUrl");
222
+
223
+                    b.Property<bool>("IsDeleted");
224
+
225
+                    b.Property<decimal>("Latitude");
226
+
227
+                    b.Property<string>("Logo");
228
+
229
+                    b.Property<decimal>("Longitude");
230
+
231
+                    b.Property<string>("MethodsOfPayment");
232
+
233
+                    b.Property<DateTime>("Modified");
234
+
235
+                    b.Property<string>("ModifiedBy");
236
+
237
+                    b.Property<string>("Name");
238
+
239
+                    b.Property<string>("PostalCode");
240
+
241
+                    b.Property<string>("Provice");
242
+
243
+                    b.Property<string>("ShopNumber");
244
+
245
+                    b.Property<string>("ShoppingCentre");
246
+
247
+                    b.Property<string>("StreetName");
248
+
249
+                    b.Property<string>("StreetNumber");
250
+
251
+                    b.Property<string>("Suburb");
252
+
253
+                    b.HasKey("Id");
254
+
255
+                    b.ToTable("Restaurants");
256
+                });
257
+
258
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
259
+                {
260
+                    b.Property<int>("Id")
261
+                        .ValueGeneratedOnAdd()
262
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
263
+
264
+                    b.Property<string>("Description");
265
+
266
+                    b.HasKey("Id");
267
+
268
+                    b.ToTable("RestaurantCategories");
269
+                });
270
+
271
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
272
+                {
273
+                    b.Property<int>("Id")
274
+                        .ValueGeneratedOnAdd()
275
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
276
+
277
+                    b.Property<DateTime>("Created");
278
+
279
+                    b.Property<bool>("IsDeleted");
280
+
281
+                    b.Property<DateTime>("Modified");
282
+
283
+                    b.Property<string>("ModifiedBy");
284
+
285
+                    b.Property<int>("RestaurantId");
286
+
287
+                    b.Property<int>("UserId");
288
+
289
+                    b.HasKey("Id");
290
+
291
+                    b.HasIndex("RestaurantId");
292
+
293
+                    b.HasIndex("UserId");
294
+
295
+                    b.ToTable("RestaurantUsers");
296
+                });
297
+
298
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
299
+                {
300
+                    b.Property<int>("Id")
301
+                        .ValueGeneratedOnAdd()
302
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
303
+
304
+                    b.Property<bool>("Closed");
305
+
306
+                    b.Property<DateTime>("ClosingTime");
307
+
308
+                    b.Property<DateTime>("Created");
309
+
310
+                    b.Property<string>("Description");
311
+
312
+                    b.Property<bool>("IsDeleted");
313
+
314
+                    b.Property<DateTime>("Modified");
315
+
316
+                    b.Property<string>("ModifiedBy");
317
+
318
+                    b.Property<bool>("Opened24H");
319
+
320
+                    b.Property<DateTime>("OpeningTime");
321
+
322
+                    b.Property<int>("RestaurantId");
323
+
324
+                    b.HasKey("Id");
325
+
326
+                    b.HasIndex("RestaurantId");
327
+
328
+                    b.ToTable("TradingHours");
329
+                });
330
+
331
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
332
+                {
333
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
334
+                        .WithOne("DriverDetails")
335
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
336
+                        .OnDelete(DeleteBehavior.Cascade);
337
+                });
338
+
339
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
340
+                {
341
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
342
+                        .WithMany("Addresses")
343
+                        .HasForeignKey("UserId")
344
+                        .OnDelete(DeleteBehavior.Cascade);
345
+                });
346
+
347
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
348
+                {
349
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
350
+                        .WithMany()
351
+                        .HasForeignKey("RestaurantId")
352
+                        .OnDelete(DeleteBehavior.Cascade);
353
+                });
354
+
355
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
356
+                {
357
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
358
+                        .WithMany()
359
+                        .HasForeignKey("RestaurantId")
360
+                        .OnDelete(DeleteBehavior.Cascade);
361
+                });
362
+
363
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
364
+                {
365
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
366
+                        .WithMany("Users")
367
+                        .HasForeignKey("RestaurantId")
368
+                        .OnDelete(DeleteBehavior.Cascade);
369
+
370
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
371
+                        .WithMany()
372
+                        .HasForeignKey("UserId")
373
+                        .OnDelete(DeleteBehavior.Cascade);
374
+                });
375
+
376
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
377
+                {
378
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
379
+                        .WithMany("TradingHours")
380
+                        .HasForeignKey("RestaurantId")
381
+                        .OnDelete(DeleteBehavior.Cascade);
382
+                });
383
+#pragma warning restore 612, 618
384
+        }
385
+    }
386
+}

+ 23
- 0
ProRestaurant/Migrations/20200608133952_003.cs 查看文件

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

+ 390
- 0
ProRestaurant/Migrations/20200609191325_004.Designer.cs 查看文件

@@ -0,0 +1,390 @@
1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200609191325_004")]
14
+    partial class _004
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("CategoryStore");
139
+
140
+                    b.Property<string>("ImageStore");
141
+
142
+                    b.HasKey("Id");
143
+
144
+                    b.ToTable("Locations");
145
+                });
146
+
147
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
148
+                {
149
+                    b.Property<int>("Id")
150
+                        .ValueGeneratedOnAdd()
151
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
152
+
153
+                    b.Property<DateTime>("Created");
154
+
155
+                    b.Property<string>("Description");
156
+
157
+                    b.Property<bool>("IsDeleted");
158
+
159
+                    b.Property<DateTime>("Modified");
160
+
161
+                    b.Property<string>("ModifiedBy");
162
+
163
+                    b.Property<int>("RestaurantId");
164
+
165
+                    b.HasKey("Id");
166
+
167
+                    b.HasIndex("RestaurantId");
168
+
169
+                    b.ToTable("MenuCategories");
170
+                });
171
+
172
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
173
+                {
174
+                    b.Property<int>("Id")
175
+                        .ValueGeneratedOnAdd()
176
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
177
+
178
+                    b.Property<int>("CategoryId");
179
+
180
+                    b.Property<DateTime>("Created");
181
+
182
+                    b.Property<string>("Description");
183
+
184
+                    b.Property<string>("Image");
185
+
186
+                    b.Property<bool>("IsDeleted");
187
+
188
+                    b.Property<DateTime>("Modified");
189
+
190
+                    b.Property<string>("ModifiedBy");
191
+
192
+                    b.Property<decimal>("Price");
193
+
194
+                    b.Property<int>("RestaurantId");
195
+
196
+                    b.HasKey("Id");
197
+
198
+                    b.HasIndex("RestaurantId");
199
+
200
+                    b.ToTable("MenuItems");
201
+                });
202
+
203
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
204
+                {
205
+                    b.Property<int>("Id")
206
+                        .ValueGeneratedOnAdd()
207
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
208
+
209
+                    b.Property<string>("Categories");
210
+
211
+                    b.Property<string>("City");
212
+
213
+                    b.Property<string>("Country");
214
+
215
+                    b.Property<DateTime>("Created");
216
+
217
+                    b.Property<decimal>("DeliveryFee");
218
+
219
+                    b.Property<decimal>("DeliveryRadius");
220
+
221
+                    b.Property<string>("DeliveryTime");
222
+
223
+                    b.Property<string>("GoogleMapUrl");
224
+
225
+                    b.Property<bool>("IsDeleted");
226
+
227
+                    b.Property<decimal>("Latitude");
228
+
229
+                    b.Property<string>("Logo");
230
+
231
+                    b.Property<decimal>("Longitude");
232
+
233
+                    b.Property<string>("MethodsOfPayment");
234
+
235
+                    b.Property<DateTime>("Modified");
236
+
237
+                    b.Property<string>("ModifiedBy");
238
+
239
+                    b.Property<string>("Name");
240
+
241
+                    b.Property<string>("PostalCode");
242
+
243
+                    b.Property<string>("Provice");
244
+
245
+                    b.Property<string>("ShopNumber");
246
+
247
+                    b.Property<string>("ShoppingCentre");
248
+
249
+                    b.Property<string>("StreetName");
250
+
251
+                    b.Property<string>("StreetNumber");
252
+
253
+                    b.Property<string>("Suburb");
254
+
255
+                    b.HasKey("Id");
256
+
257
+                    b.ToTable("Restaurants");
258
+                });
259
+
260
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
261
+                {
262
+                    b.Property<int>("Id")
263
+                        .ValueGeneratedOnAdd()
264
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
265
+
266
+                    b.Property<string>("Description");
267
+
268
+                    b.Property<string>("Image");
269
+
270
+                    b.HasKey("Id");
271
+
272
+                    b.ToTable("RestaurantCategories");
273
+                });
274
+
275
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
276
+                {
277
+                    b.Property<int>("Id")
278
+                        .ValueGeneratedOnAdd()
279
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
280
+
281
+                    b.Property<DateTime>("Created");
282
+
283
+                    b.Property<bool>("IsDeleted");
284
+
285
+                    b.Property<DateTime>("Modified");
286
+
287
+                    b.Property<string>("ModifiedBy");
288
+
289
+                    b.Property<int>("RestaurantId");
290
+
291
+                    b.Property<int>("UserId");
292
+
293
+                    b.HasKey("Id");
294
+
295
+                    b.HasIndex("RestaurantId");
296
+
297
+                    b.HasIndex("UserId");
298
+
299
+                    b.ToTable("RestaurantUsers");
300
+                });
301
+
302
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
303
+                {
304
+                    b.Property<int>("Id")
305
+                        .ValueGeneratedOnAdd()
306
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
307
+
308
+                    b.Property<bool>("Closed");
309
+
310
+                    b.Property<DateTime>("ClosingTime");
311
+
312
+                    b.Property<DateTime>("Created");
313
+
314
+                    b.Property<string>("Description");
315
+
316
+                    b.Property<bool>("IsDeleted");
317
+
318
+                    b.Property<DateTime>("Modified");
319
+
320
+                    b.Property<string>("ModifiedBy");
321
+
322
+                    b.Property<bool>("Opened24H");
323
+
324
+                    b.Property<DateTime>("OpeningTime");
325
+
326
+                    b.Property<int>("RestaurantId");
327
+
328
+                    b.HasKey("Id");
329
+
330
+                    b.HasIndex("RestaurantId");
331
+
332
+                    b.ToTable("TradingHours");
333
+                });
334
+
335
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
336
+                {
337
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
338
+                        .WithOne("DriverDetails")
339
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
340
+                        .OnDelete(DeleteBehavior.Cascade);
341
+                });
342
+
343
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
344
+                {
345
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
346
+                        .WithMany("Addresses")
347
+                        .HasForeignKey("UserId")
348
+                        .OnDelete(DeleteBehavior.Cascade);
349
+                });
350
+
351
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
352
+                {
353
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
354
+                        .WithMany()
355
+                        .HasForeignKey("RestaurantId")
356
+                        .OnDelete(DeleteBehavior.Cascade);
357
+                });
358
+
359
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
360
+                {
361
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
362
+                        .WithMany()
363
+                        .HasForeignKey("RestaurantId")
364
+                        .OnDelete(DeleteBehavior.Cascade);
365
+                });
366
+
367
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
368
+                {
369
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
370
+                        .WithMany("Users")
371
+                        .HasForeignKey("RestaurantId")
372
+                        .OnDelete(DeleteBehavior.Cascade);
373
+
374
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
375
+                        .WithMany()
376
+                        .HasForeignKey("UserId")
377
+                        .OnDelete(DeleteBehavior.Cascade);
378
+                });
379
+
380
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
381
+                {
382
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
383
+                        .WithMany("TradingHours")
384
+                        .HasForeignKey("RestaurantId")
385
+                        .OnDelete(DeleteBehavior.Cascade);
386
+                });
387
+#pragma warning restore 612, 618
388
+        }
389
+    }
390
+}

+ 31
- 0
ProRestaurant/Migrations/20200609191325_004.cs 查看文件

@@ -0,0 +1,31 @@
1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace ProRestaurant.Migrations
4
+{
5
+    public partial class _004 : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+            migrationBuilder.AddColumn<string>(
10
+                name: "Image",
11
+                table: "RestaurantCategories",
12
+                nullable: true);
13
+
14
+            migrationBuilder.AddColumn<string>(
15
+                name: "CategoryStore",
16
+                table: "Locations",
17
+                nullable: true);
18
+        }
19
+
20
+        protected override void Down(MigrationBuilder migrationBuilder)
21
+        {
22
+            migrationBuilder.DropColumn(
23
+                name: "Image",
24
+                table: "RestaurantCategories");
25
+
26
+            migrationBuilder.DropColumn(
27
+                name: "CategoryStore",
28
+                table: "Locations");
29
+        }
30
+    }
31
+}

+ 107
- 3
ProRestaurant/Migrations/DBContextModelSnapshot.cs 查看文件

@@ -71,6 +71,8 @@ namespace ProRestaurant.Migrations
71 71
 
72 72
                     b.Property<string>("Surname");
73 73
 
74
+                    b.Property<int>("SystemRole");
75
+
74 76
                     b.HasKey("Id");
75 77
 
76 78
                     b.ToTable("Users");
@@ -90,6 +92,10 @@ namespace ProRestaurant.Migrations
90 92
 
91 93
                     b.Property<DateTime>("Created");
92 94
 
95
+                    b.Property<string>("GoogleMapUrl");
96
+
97
+                    b.Property<bool>("IsDefault");
98
+
93 99
                     b.Property<bool>("IsDeleted");
94 100
 
95 101
                     b.Property<decimal>("Latitude");
@@ -121,6 +127,21 @@ namespace ProRestaurant.Migrations
121 127
                     b.ToTable("UserAddresses");
122 128
                 });
123 129
 
130
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
131
+                {
132
+                    b.Property<int>("Id")
133
+                        .ValueGeneratedOnAdd()
134
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
135
+
136
+                    b.Property<string>("CategoryStore");
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
124 145
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
125 146
                 {
126 147
                     b.Property<int>("Id")
@@ -183,7 +204,11 @@ namespace ProRestaurant.Migrations
183 204
                         .ValueGeneratedOnAdd()
184 205
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
185 206
 
186
-                    b.Property<bool>("Chain");
207
+                    b.Property<string>("Categories");
208
+
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
187 212
 
188 213
                     b.Property<DateTime>("Created");
189 214
 
@@ -191,12 +216,18 @@ namespace ProRestaurant.Migrations
191 216
 
192 217
                     b.Property<decimal>("DeliveryRadius");
193 218
 
219
+                    b.Property<string>("DeliveryTime");
220
+
221
+                    b.Property<string>("GoogleMapUrl");
222
+
194 223
                     b.Property<bool>("IsDeleted");
195 224
 
196
-                    b.Property<string>("Location");
225
+                    b.Property<decimal>("Latitude");
197 226
 
198 227
                     b.Property<string>("Logo");
199 228
 
229
+                    b.Property<decimal>("Longitude");
230
+
200 231
                     b.Property<string>("MethodsOfPayment");
201 232
 
202 233
                     b.Property<DateTime>("Modified");
@@ -205,17 +236,75 @@ namespace ProRestaurant.Migrations
205 236
 
206 237
                     b.Property<string>("Name");
207 238
 
239
+                    b.Property<string>("PostalCode");
240
+
241
+                    b.Property<string>("Provice");
242
+
243
+                    b.Property<string>("ShopNumber");
244
+
245
+                    b.Property<string>("ShoppingCentre");
246
+
247
+                    b.Property<string>("StreetName");
248
+
249
+                    b.Property<string>("StreetNumber");
250
+
251
+                    b.Property<string>("Suburb");
252
+
208 253
                     b.HasKey("Id");
209 254
 
210 255
                     b.ToTable("Restaurants");
211 256
                 });
212 257
 
258
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
259
+                {
260
+                    b.Property<int>("Id")
261
+                        .ValueGeneratedOnAdd()
262
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
263
+
264
+                    b.Property<string>("Description");
265
+
266
+                    b.Property<string>("Image");
267
+
268
+                    b.HasKey("Id");
269
+
270
+                    b.ToTable("RestaurantCategories");
271
+                });
272
+
273
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
274
+                {
275
+                    b.Property<int>("Id")
276
+                        .ValueGeneratedOnAdd()
277
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
278
+
279
+                    b.Property<DateTime>("Created");
280
+
281
+                    b.Property<bool>("IsDeleted");
282
+
283
+                    b.Property<DateTime>("Modified");
284
+
285
+                    b.Property<string>("ModifiedBy");
286
+
287
+                    b.Property<int>("RestaurantId");
288
+
289
+                    b.Property<int>("UserId");
290
+
291
+                    b.HasKey("Id");
292
+
293
+                    b.HasIndex("RestaurantId");
294
+
295
+                    b.HasIndex("UserId");
296
+
297
+                    b.ToTable("RestaurantUsers");
298
+                });
299
+
213 300
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
214 301
                 {
215 302
                     b.Property<int>("Id")
216 303
                         .ValueGeneratedOnAdd()
217 304
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
218 305
 
306
+                    b.Property<bool>("Closed");
307
+
219 308
                     b.Property<DateTime>("ClosingTime");
220 309
 
221 310
                     b.Property<DateTime>("Created");
@@ -228,6 +317,8 @@ namespace ProRestaurant.Migrations
228 317
 
229 318
                     b.Property<string>("ModifiedBy");
230 319
 
320
+                    b.Property<bool>("Opened24H");
321
+
231 322
                     b.Property<DateTime>("OpeningTime");
232 323
 
233 324
                     b.Property<int>("RestaurantId");
@@ -250,7 +341,7 @@ namespace ProRestaurant.Migrations
250 341
             modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
251 342
                 {
252 343
                     b.HasOne("ProRestaurant.Models.Accounts.User", "User")
253
-                        .WithMany()
344
+                        .WithMany("Addresses")
254 345
                         .HasForeignKey("UserId")
255 346
                         .OnDelete(DeleteBehavior.Cascade);
256 347
                 });
@@ -271,6 +362,19 @@ namespace ProRestaurant.Migrations
271 362
                         .OnDelete(DeleteBehavior.Cascade);
272 363
                 });
273 364
 
365
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
366
+                {
367
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
368
+                        .WithMany("Users")
369
+                        .HasForeignKey("RestaurantId")
370
+                        .OnDelete(DeleteBehavior.Cascade);
371
+
372
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
373
+                        .WithMany()
374
+                        .HasForeignKey("UserId")
375
+                        .OnDelete(DeleteBehavior.Cascade);
376
+                });
377
+
274 378
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
275 379
                 {
276 380
                     b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")

+ 6
- 2
ProRestaurant/Models/Accounts/User.cs 查看文件

@@ -1,4 +1,5 @@
1
-using System;
1
+using ProRestaurant.Classes;
2
+using System;
2 3
 using System.Collections.Generic;
3 4
 using System.Linq;
4 5
 using System.Threading.Tasks;
@@ -12,7 +13,10 @@ namespace ProRestaurant.Models.Accounts
12 13
         public string FirstName { get; set; }
13 14
         public string Surname { get; set; }
14 15
         public string Cellphone { get; set; }
16
+        public SystemRole SystemRole { get; set; }
15 17
 
16 18
         public virtual DriverDetail DriverDetails { get; set; }
17
-    }
19
+
20
+        public ICollection<UserAddress> Addresses { get; set; }
21
+    }    
18 22
 }

+ 2
- 0
ProRestaurant/Models/Accounts/UserAddress.cs 查看文件

@@ -3,6 +3,8 @@
3 3
     public class UserAddress : BaseObject
4 4
     {
5 5
         public int UserId { get; set; }
6
+        public bool IsDefault { get; set; }
7
+        public string GoogleMapUrl { get; set; }
6 8
         public decimal Latitude { get; set; }
7 9
         public decimal Longitude { get; set; } 
8 10
 

+ 14
- 0
ProRestaurant/Models/Misc/Locations.cs 查看文件

@@ -0,0 +1,14 @@
1
+using System.ComponentModel.DataAnnotations;
2
+using System.ComponentModel.DataAnnotations.Schema;
3
+
4
+namespace ProRestaurant.Models.Misc
5
+{
6
+    public class Locations
7
+    {
8
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
9
+        [Key]
10
+        public int Id { get; set; }
11
+        public string ImageStore { get; set; }
12
+        public string CategoryStore { get; set; }        
13
+    }
14
+}

+ 20
- 9
ProRestaurant/Models/Restaurants/Restaurant.cs 查看文件

@@ -1,19 +1,30 @@
1
-using Microsoft.AspNetCore.SignalR;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Threading.Tasks;
1
+using System.Collections.Generic;
5 2
 
6 3
 namespace ProRestaurant.Models.Restaurants
7 4
 {
8 5
     public class Restaurant : BaseObject
9 6
     {
10
-        public string Name { get; set; }
11
-        public string Location { get; set; } //Set with google's autocomplete(suburb)
12
-        public string Logo { get; set; }
13
-        public bool Chain { get; set; } //if no, do not display the location on card
7
+        public string Name { get; set; }        
8
+        public string Logo { get; set; }        
14 9
         public decimal DeliveryFee { get; set; }
15 10
         public decimal DeliveryRadius { get; set; }
16 11
         public string MethodsOfPayment { get; set; } //Comma separated list - can be displayed as a drop down. 
17
-        public ICollection<TradingHours> TradingHours { get; set; }
12
+        public string ShoppingCentre { get; set; }
13
+        public string ShopNumber { get; set; }
14
+        public string GoogleMapUrl { get; set; }
15
+        public decimal Latitude { get; set; }
16
+        public decimal Longitude { get; set; }
17
+        public string StreetNumber { get; set; }
18
+        public string StreetName { get; set; }
19
+        public string Suburb { get; set; }
20
+        public string City { get; set; }
21
+        public string Provice { get; set; }
22
+        public string Country { get; set; }
23
+        public string PostalCode { get; set; }
24
+        public string DeliveryTime { get; set; }
25
+        public string Categories { get; set; }
26
+
27
+        public ICollection<TradingHours> TradingHours { get; set; }   
28
+        public ICollection<RestaurantUser> Users { get; set; }
18 29
     }
19 30
 }

+ 14
- 0
ProRestaurant/Models/Restaurants/RestaurantCategory.cs 查看文件

@@ -0,0 +1,14 @@
1
+using System.ComponentModel.DataAnnotations;
2
+using System.ComponentModel.DataAnnotations.Schema;
3
+
4
+namespace ProRestaurant.Models.Restaurants
5
+{
6
+    public class RestaurantCategory
7
+    {
8
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
9
+        [Key]
10
+        public int Id { get; set; }
11
+        public string Description { get; set; }
12
+        public string Image { get; set; }
13
+    }
14
+}

+ 16
- 0
ProRestaurant/Models/Restaurants/RestaurantUser.cs 查看文件

@@ -0,0 +1,16 @@
1
+using ProRestaurant.Models.Accounts;
2
+using System.ComponentModel.DataAnnotations.Schema;
3
+
4
+namespace ProRestaurant.Models.Restaurants
5
+{
6
+    public class RestaurantUser : BaseObject
7
+    {
8
+        [ForeignKey("User")]
9
+        public int UserId { get; set; }
10
+        [ForeignKey("Restaurant")]
11
+        public int RestaurantId { get; set; }
12
+
13
+        public virtual User User { get; set; }
14
+        public virtual Restaurant Restaurant { get; set; }
15
+    }
16
+}

+ 2
- 0
ProRestaurant/Models/Restaurants/TradingHours.cs 查看文件

@@ -8,6 +8,8 @@ namespace ProRestaurant.Models.Restaurants
8 8
         public string Description { get; set;  }
9 9
         public DateTime OpeningTime { get; set; }
10 10
         public DateTime ClosingTime { get; set; }
11
+        public bool Closed { get; set; }
12
+        public bool Opened24H { get; set; }
11 13
 
12 14
         public virtual Restaurant Restaurant { get; set; }
13 15
     }

+ 3
- 1
ProRestaurant/ProRestaurant.csproj 查看文件

@@ -1,4 +1,4 @@
1
-<Project Sdk="Microsoft.NET.Sdk.Web">
1
+<Project Sdk="Microsoft.NET.Sdk.Web">
2 2
 
3 3
   <PropertyGroup>
4 4
     <TargetFramework>netcoreapp2.2</TargetFramework>
@@ -11,6 +11,8 @@
11 11
     <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
12 12
     <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" />
13 13
     <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.0" />
14
+    <PackageReference Include="System.Data.SQLite" Version="1.0.113.1" />
15
+    <PackageReference Include="System.Drawing.Common" Version="4.7.0" />
14 16
   </ItemGroup>
15 17
 
16 18
 </Project>

+ 1
- 0
ProRestaurant/ProRestaurant.csproj.user 查看文件

@@ -3,5 +3,6 @@
3 3
   <PropertyGroup>
4 4
     <Controller_SelectedScaffolderID>ApiControllerWithActionsScaffolder</Controller_SelectedScaffolderID>
5 5
     <Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
6
+    <ShowAllFiles>false</ShowAllFiles>
6 7
   </PropertyGroup>
7 8
 </Project>

+ 7
- 8
ProRestaurant/Program.cs 查看文件

@@ -1,12 +1,5 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.IO;
4
-using System.Linq;
5
-using System.Threading.Tasks;
6
-using Microsoft.AspNetCore;
1
+using Microsoft.AspNetCore;
7 2
 using Microsoft.AspNetCore.Hosting;
8
-using Microsoft.Extensions.Configuration;
9
-using Microsoft.Extensions.Logging;
10 3
 
11 4
 namespace ProRestaurant
12 5
 {
@@ -20,5 +13,11 @@ namespace ProRestaurant
20 13
         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21 14
             WebHost.CreateDefaultBuilder(args)
22 15
                 .UseStartup<Startup>();
16
+
17
+        public static IWebHost BuildWebHost(string[] args) =>
18
+            WebHost.CreateDefaultBuilder(args)
19
+                .UseStartup<Startup>()
20
+                .UseUrls("http://localhost:58847")
21
+                .Build();
23 22
     }
24 23
 }

+ 80
- 0
ProRestaurant/Repository/Accounts/AuthenticateRepository.cs 查看文件

@@ -0,0 +1,80 @@
1
+using Microsoft.AspNetCore.Mvc;
2
+using Microsoft.Extensions.Options;
3
+using Microsoft.IdentityModel.Tokens;
4
+using ProRestaurant.Classes;
5
+using ProRestaurant.Containers;
6
+using ProRestaurant.DBContexts;
7
+using ProRestaurant.Models.Accounts;
8
+using System;
9
+using System.Collections.Generic;
10
+using System.IdentityModel.Tokens.Jwt;
11
+using System.Linq;
12
+using System.Security.Claims;
13
+using System.Text;
14
+using System.Threading.Tasks;
15
+
16
+namespace ProRestaurant.Repository.Accounts
17
+{
18
+    public interface IAuthenticateRepository
19
+    {
20
+        AuthenticationContiner Login(AuthenticationContiner user);
21
+        AuthenticationContiner GetAuthenticationContiner();
22
+    }
23
+
24
+    public class AuthenticateRepository : IAuthenticateRepository
25
+    {
26
+        private readonly DBContext dBContext;
27
+        private readonly AppSettings appSettings;
28
+
29
+        public AuthenticateRepository(DBContext _DB, IOptions<AppSettings> _AppSettings)
30
+        {
31
+            dBContext = _DB;
32
+            appSettings = _AppSettings.Value;
33
+        }
34
+
35
+        public AuthenticationContiner GetAuthenticationContiner()
36
+        {
37
+            return new AuthenticationContiner();
38
+        }
39
+
40
+        public AuthenticationContiner Login(AuthenticationContiner user)
41
+        {
42
+            var getUser = dBContext.Users.Where(u => u.EmailAddress == user.EmailAddress).FirstOrDefault();
43
+
44
+            if (getUser != null)
45
+            {
46
+                if (getUser.Password == user.Password)
47
+                {
48
+                    var tokenHandler = new JwtSecurityTokenHandler();
49
+                    var key = Encoding.ASCII.GetBytes(appSettings.Secret);
50
+                    var tokenDescription = new SecurityTokenDescriptor
51
+                    {
52
+                        Subject = new ClaimsIdentity(new Claim[]
53
+                        {
54
+                            new Claim(ClaimTypes.Name, getUser.Id.ToString())
55
+                        }),
56
+                        Expires = DateTime.UtcNow.AddHours(1),
57
+                        SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
58
+                    };
59
+                    var token = tokenHandler.CreateToken(tokenDescription);
60
+                    user.Token = tokenHandler.WriteToken(token);
61
+                    user.Result = "Access Granted";
62
+                    user.Name = getUser.FirstName;
63
+                    user.Surname = getUser.Surname;
64
+                    user.EmailAddress = getUser.EmailAddress;
65
+                    user.Password = "";
66
+                    user.Role = getUser.SystemRole.ToString();
67
+                }
68
+                else
69
+                {
70
+                    user.Result = "Incorrect Password";
71
+                }
72
+            }
73
+            else
74
+            {
75
+                user.Result = "User Not Found.";
76
+            }
77
+            return user;
78
+        }
79
+    }
80
+}

+ 16
- 0
ProRestaurant/Repository/Accounts/IRegistrationRepository.cs 查看文件

@@ -0,0 +1,16 @@
1
+using ProRestaurant.Containers;
2
+using ProRestaurant.Models.Accounts;
3
+using ProRestaurant.Models.Restaurants;
4
+using System;
5
+
6
+namespace ProRestaurant.Repository.Accounts
7
+{
8
+    public interface IRegistrationRepository
9
+    {        
10
+        UserContainer GetUserContainer();        
11
+        RestaurantContainer GetRestaurantContainer();
12
+        UserContainer RegisterUser(UserContainer UserContainer);
13
+        RestaurantContainer RegisterRestaurant(RestaurantContainer RestaurantContainer);
14
+        void Save();                
15
+    }
16
+}

+ 0
- 20
ProRestaurant/Repository/Accounts/IUserRepository.cs 查看文件

@@ -1,20 +0,0 @@
1
-using ProRestaurant.Containers;
2
-using ProRestaurant.Models.Accounts;
3
-using System;
4
-using System.Collections.Generic;
5
-using System.Linq;
6
-using System.Threading.Tasks;
7
-
8
-namespace ProRestaurant.Repository.Accounts
9
-{
10
-    public interface IUserRepository
11
-    {
12
-        IEnumerable<User> GetUsers();
13
-        User GetUser(Func<User, bool> where);
14
-        void Insert(User user);
15
-        void Remove(User user);
16
-        void Update(User user);
17
-        void Save();
18
-        UserContainer Login(string UserName, string Password);
19
-    }
20
-}

+ 227
- 0
ProRestaurant/Repository/Accounts/RegistrationRepository.cs 查看文件

@@ -0,0 +1,227 @@
1
+using ProRestaurant.Classes;
2
+using ProRestaurant.Containers;
3
+using ProRestaurant.DBContexts;
4
+using ProRestaurant.Models.Accounts;
5
+using ProRestaurant.Models.Restaurants;
6
+using System;
7
+using System.Collections.Generic;
8
+using System.IO;
9
+using System.Linq;
10
+
11
+namespace ProRestaurant.Repository.Accounts
12
+{
13
+    public class RegistrationRepository : IRegistrationRepository
14
+    {
15
+        private readonly DBContext dBContext;
16
+
17
+        public RegistrationRepository(DBContext _DB)
18
+        {
19
+            dBContext = _DB;
20
+        }
21
+
22
+        public RestaurantContainer GetRestaurantContainer()
23
+        {
24
+            var restaurantContainer = new RestaurantContainer
25
+            {
26
+                Name = "",
27
+                Logo = "",
28
+                MethodsOfPayment = "",
29
+                ShopNumber = "",
30
+                ShoppingCentre = "",
31
+                GoogleMapUrl = "",
32
+                StreetNumber = "",
33
+                StreetName = "",
34
+                Suburb = "",
35
+                City = "",
36
+                Provice = "",
37
+                Country = "",
38
+
39
+            };
40
+
41
+            return restaurantContainer;
42
+        }
43
+
44
+        public UserContainer GetUserContainer()
45
+        {
46
+            var userContainer = new UserContainer()
47
+            {
48
+                FirstName = "",
49
+                Surname = "",
50
+                Cellphone = "",
51
+                EmailAddress = "",
52
+                Password = ""
53
+            };
54
+
55
+            return userContainer;
56
+        }
57
+
58
+        //public UserContainer Login(string UserName, string Password)
59
+        //{
60
+        //    UserContainer returnObject = new UserContainer();
61
+        //    User user = dBContext.Users.Where(u => u.EmailAddress == UserName).FirstOrDefault();
62
+
63
+        //    if (user != null)
64
+        //    {
65
+        //        if (user.Password == Password)
66
+        //        {
67
+        //            returnObject.User = user;
68
+        //            returnObject.ResultString = "Access Granted";
69
+        //        }
70
+        //        else
71
+        //            returnObject.ResultString = "Password incorrect";
72
+        //    }
73
+        //    else
74
+        //    {
75
+        //        returnObject.ResultString = "User not found";
76
+        //    }
77
+        //    return returnObject;
78
+        //}
79
+
80
+        public RestaurantContainer RegisterRestaurant(RestaurantContainer RestaurantContainer)
81
+        {            
82
+            var restaurantCheck = dBContext.Restaurants.Where(r => r.Name == RestaurantContainer.Name && r.Suburb == RestaurantContainer.Suburb && r.City == RestaurantContainer.City && r.Provice == RestaurantContainer.Provice && r.Country == RestaurantContainer.Country).FirstOrDefault();
83
+            if (restaurantCheck != null)
84
+            {
85
+                RestaurantContainer.Result = "A Restaurant with the same name has already been registered in this location. ";
86
+                return RestaurantContainer;
87
+            }
88
+
89
+            var checkUser = dBContext.Users.Where(u => u.EmailAddress == RestaurantContainer.UserEmailAddress).FirstOrDefault();
90
+            if (checkUser != null)
91
+            {
92
+                RestaurantContainer.Result = "A User with this email address already exists. Please use an different Email Address if this Email Address was used for an individule user.";
93
+                return RestaurantContainer;
94
+            }
95
+
96
+            var user = new User
97
+            {
98
+                FirstName = RestaurantContainer.UserFirstName,
99
+                Surname = RestaurantContainer.UserSurname,
100
+                EmailAddress = RestaurantContainer.UserEmailAddress,
101
+                Password = RestaurantContainer.UserPassword,
102
+                SystemRole = Classes.SystemRole.RestaurantAdmin
103
+            };
104
+
105
+            var restaurant = new Restaurant
106
+            {                
107
+                Name = RestaurantContainer.Name,
108
+                DeliveryTime = RestaurantContainer.DeliveryTime,
109
+                DeliveryFee = RestaurantContainer.DeliveryFee,
110
+                DeliveryRadius = RestaurantContainer.DeliveryRadius,
111
+                MethodsOfPayment = RestaurantContainer.MethodsOfPayment,
112
+                ShoppingCentre = RestaurantContainer.ShoppingCentre,
113
+                ShopNumber = RestaurantContainer.ShopNumber,
114
+                GoogleMapUrl = RestaurantContainer.GoogleMapUrl,
115
+                Latitude = RestaurantContainer.Latitude,
116
+                Longitude = RestaurantContainer.Longitude,
117
+                StreetNumber = RestaurantContainer.StreetNumber,
118
+                StreetName = RestaurantContainer.StreetName,
119
+                Suburb = RestaurantContainer.Suburb,
120
+                City = RestaurantContainer.City,
121
+                Provice = RestaurantContainer.Provice,
122
+                Country = RestaurantContainer.Country,
123
+                PostalCode = RestaurantContainer.PostalCode,
124
+                Categories = RestaurantContainer.Categories
125
+            };
126
+
127
+            if (!string.IsNullOrEmpty(restaurant.MethodsOfPayment))
128
+            {
129
+                restaurant.MethodsOfPayment = restaurant.MethodsOfPayment.Substring(0, restaurant.MethodsOfPayment.Length - 1);
130
+            }
131
+            
132
+            if (!string.IsNullOrEmpty(restaurant.Categories))
133
+            {
134
+                restaurant.Categories = restaurant.Categories.Substring(0, restaurant.Categories.Length - 1);
135
+                restaurant.Categories = restaurant.Categories.Replace("|", " - ");
136
+            }
137
+
138
+            if (!string.IsNullOrEmpty(RestaurantContainer.Logo))
139
+            {
140
+                bool saveFile = false;
141
+                var loc = dBContext.Locations.FirstOrDefault()?.ImageStore;
142
+                if (!string.IsNullOrEmpty(loc))
143
+                {
144
+                    var folderName = restaurant.Name + string.Format("{0:yyyy_MM_dd_hh_mm_ss}", DateTime.Now);
145
+                    saveFile = true;
146
+                    loc += string.Format("{0}", folderName);
147
+                    if (!Directory.Exists(loc))
148
+                    {
149
+                        Directory.CreateDirectory(loc);
150
+                    }
151
+
152
+                    if (saveFile)
153
+                    {
154
+                        string path = ImageFormatter.Base64ToImage(RestaurantContainer.Logo, loc, restaurant.Name.Trim());
155
+                        restaurant.Logo = path;
156
+                    }
157
+                }
158
+
159
+                if (!saveFile)
160
+                    restaurant.Logo = RestaurantContainer.Logo;
161
+            }
162
+
163
+            var rUser = new RestaurantUser
164
+            {
165
+                Restaurant = restaurant,
166
+                User = user
167
+            };
168
+
169
+            restaurant.Users = new List<RestaurantUser>() { rUser };
170
+
171
+            if (RestaurantContainer.THours != null && RestaurantContainer.THours.Count > 0)
172
+            {
173
+                restaurant.TradingHours = new List<TradingHours>();
174
+                foreach (var t in RestaurantContainer.THours)
175
+                {
176
+                    restaurant.TradingHours.Add(new TradingHours()
177
+                    {
178
+                        Description = t.Description,
179
+                        OpeningTime = DateTime.Parse(string.Format("{0} {1}", string.Format("{0:yyyy/MM/dd}", DateTime.Now), t.From)),
180
+                        ClosingTime = DateTime.Parse(string.Format("{0} {1}", string.Format("{0:yyyy/MM/dd}", DateTime.Now), t.To)),
181
+                        Closed = t.Closed,
182
+                        Opened24H = t.Open24
183
+                    });
184
+                }
185
+            }           
186
+
187
+            dBContext.Add(restaurant);
188
+            Save();
189
+
190
+            return RestaurantContainer;
191
+        }
192
+
193
+        public UserContainer RegisterUser(UserContainer UserContainer)
194
+        {
195
+            var checkUser = dBContext.Users.Where(u => u.EmailAddress == UserContainer.EmailAddress).FirstOrDefault();
196
+            if (checkUser != null)
197
+            {
198
+                UserContainer.ResultString = "A User with this email address already exists.";
199
+                UserContainer.Password = "";
200
+                return UserContainer;
201
+            }
202
+
203
+            var user = new User
204
+            {
205
+                FirstName = UserContainer.FirstName,
206
+                Surname = UserContainer.Surname,
207
+                Cellphone = UserContainer.Cellphone,
208
+                EmailAddress = UserContainer.EmailAddress,
209
+                Password = UserContainer.Password,
210
+                SystemRole = Classes.SystemRole.Customer
211
+            };
212
+
213
+            dBContext.Add(user);
214
+            Save();
215
+
216
+            UserContainer.Id = user.Id;
217
+            UserContainer.ResultString = "User Created";
218
+
219
+            return UserContainer;
220
+        }
221
+
222
+        public void Save()
223
+        {
224
+            dBContext.SaveChanges();
225
+        }
226
+    }
227
+}

+ 0
- 99
ProRestaurant/Repository/Accounts/UserRepository.cs 查看文件

@@ -1,99 +0,0 @@
1
-using Microsoft.EntityFrameworkCore;
2
-using Microsoft.EntityFrameworkCore.Internal;
3
-using ProRestaurant.Classes;
4
-using ProRestaurant.Containers;
5
-using ProRestaurant.DBContexts;
6
-using ProRestaurant.Models.Accounts;
7
-using System;
8
-using System.Collections.Generic;
9
-using System.Diagnostics;
10
-using System.Linq;
11
-using System.Text.RegularExpressions;
12
-
13
-namespace ProRestaurant.Repository.Accounts
14
-{
15
-    public class UserRepository : IUserRepository
16
-    {
17
-        private readonly DBContext dBContext;
18
-
19
-        public UserRepository(DBContext _DB)
20
-        {
21
-            dBContext = _DB;
22
-        }
23
-
24
-        public User GetUser(Func<User, bool> where)
25
-        {
26
-            var user = dBContext.Users.Where(where).FirstOrDefault();
27
-            if (user == null)
28
-            {
29
-                user = new User
30
-                {
31
-                    EmailAddress = "",
32
-                    Password = "",
33
-                    FirstName = "",
34
-                    Surname = "",
35
-                    Cellphone = ""
36
-                };
37
-            }
38
-            return user;
39
-        }
40
-
41
-        public IEnumerable<User> GetUsers()
42
-        {
43
-            return dBContext.Users.ToList();
44
-        }
45
-
46
-        public void Insert(User user)
47
-        {            
48
-            dBContext.Add(user);
49
-            Save();
50
-        }
51
-
52
-        public UserContainer Login(string UserName, string Password)
53
-        {
54
-            UserContainer returnObject = new UserContainer();
55
-            User user;
56
-
57
-            string pattern = @"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z";
58
-            if (Regex.IsMatch(UserName, pattern))
59
-                user = dBContext.Users.Where(u => u.EmailAddress == UserName).FirstOrDefault();
60
-            else
61
-                user = dBContext.Users.Where(u => u.Cellphone == UserName).FirstOrDefault();
62
-
63
-            if (user != null)
64
-            {
65
-                if (user.Password == Password)
66
-                {
67
-                    returnObject.user = user;
68
-                    returnObject.ResultString = "Access Granted";
69
-                }
70
-                else
71
-                    returnObject.ResultString = "Password incorrect";
72
-            }
73
-            else
74
-            {
75
-                returnObject.ResultString = "User not found";
76
-            }
77
-
78
-
79
-            return returnObject;
80
-        }
81
-
82
-        public void Remove(User user)
83
-        {
84
-            dBContext.Users.Remove(user);
85
-            Save();
86
-        }
87
-
88
-        public void Save()
89
-        {
90
-            dBContext.SaveChanges();
91
-        }
92
-
93
-        public void Update(User user)
94
-        {
95
-            dBContext.Entry(user).State = EntityState.Modified;
96
-            Save();
97
-        }
98
-    }
99
-}

+ 19
- 0
ProRestaurant/Repository/Restaurants/IMenuCategoryRepository.cs 查看文件

@@ -0,0 +1,19 @@
1
+using ProRestaurant.Models.Restaurants;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Linq;
5
+using System.Threading.Tasks;
6
+
7
+namespace ProRestaurant.Repository.Restaurants
8
+{
9
+    public interface IMenuCategoryRepository
10
+    {
11
+        IEnumerable<MenuCategory> GetMenuCategory();
12
+        IEnumerable<MenuCategory> GetMenuCategories(Func<MenuCategory, bool> where);
13
+        MenuCategory GetMenuCategory(Func<MenuCategory, bool> where);
14
+        void Insert(MenuCategory MenuCategory);
15
+        void Remove(MenuCategory MenuCategory);
16
+        void Update(MenuCategory MenuCategory);
17
+        void Save();
18
+    }
19
+}

+ 16
- 0
ProRestaurant/Repository/Restaurants/IRestaurantCategoryRepository.cs 查看文件

@@ -0,0 +1,16 @@
1
+using ProRestaurant.Models.Restaurants;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Threading.Tasks;
5
+
6
+namespace ProRestaurant.Repository.Restaurants
7
+{
8
+    public interface IRestaurantCategoryRepository
9
+    {
10
+        ICollection<RestaurantCategory> Get();
11
+        void Insert(RestaurantCategory RestaurantCategory);
12
+        void Update(RestaurantCategory RestaurantCategory);
13
+        void Remove(int id);
14
+        void Save();
15
+    }
16
+}

+ 4
- 3
ProRestaurant/Repository/Restaurants/IRestaurantRepository.cs 查看文件

@@ -1,4 +1,5 @@
1
-using ProRestaurant.Models.Restaurants;
1
+using ProRestaurant.Containers;
2
+using ProRestaurant.Models.Restaurants;
2 3
 using System;
3 4
 using System.Collections.Generic;
4 5
 using System.Linq;
@@ -7,8 +8,8 @@ using System.Threading.Tasks;
7 8
 namespace ProRestaurant.Repository.Restaurants
8 9
 {
9 10
     public interface IRestaurantRepository
10
-    {
11
-        IEnumerable<Restaurant> GetUsers();
11
+    {        
12
+        List<RestaurantCard> GetSearch();
12 13
         Restaurant GetRestaurant(Func<Restaurant, bool> where);
13 14
         void Insert(Restaurant restaurant);
14 15
         void Remove(Restaurant restaurant);

+ 58
- 0
ProRestaurant/Repository/Restaurants/MenuCategoryRepository.cs 查看文件

@@ -0,0 +1,58 @@
1
+using Microsoft.EntityFrameworkCore;
2
+using ProRestaurant.DBContexts;
3
+using ProRestaurant.Models.Restaurants;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.Linq;
7
+using System.Threading.Tasks;
8
+
9
+namespace ProRestaurant.Repository.Restaurants
10
+{
11
+    public class MenuCategoryRepository : IMenuCategoryRepository
12
+    {
13
+        private readonly DBContext dBContext;
14
+
15
+        public MenuCategoryRepository(DBContext db)
16
+        {
17
+            dBContext = db;
18
+        }
19
+
20
+        public IEnumerable<MenuCategory> GetMenuCategory()
21
+        {
22
+            return dBContext.MenuCategories.ToList();
23
+        }
24
+
25
+        public IEnumerable<MenuCategory> GetMenuCategories(Func<MenuCategory, bool> where)
26
+        {
27
+            return dBContext.MenuCategories.Where(where).ToList();
28
+        }
29
+
30
+        public MenuCategory GetMenuCategory(Func<MenuCategory, bool> where)
31
+        {
32
+            return dBContext.MenuCategories.Where(where).FirstOrDefault();
33
+        }
34
+
35
+        public void Insert(MenuCategory MenuCategory)
36
+        {
37
+            dBContext.Add(MenuCategory);
38
+            Save();
39
+        }
40
+
41
+        public void Remove(MenuCategory MenuCategory)
42
+        {
43
+            dBContext.Remove(MenuCategory);
44
+            Save();
45
+        }
46
+
47
+        public void Save()
48
+        {
49
+            dBContext.SaveChanges();
50
+        }
51
+
52
+        public void Update(MenuCategory MenuCategory)
53
+        {
54
+            dBContext.Entry(MenuCategory).State = EntityState.Modified;
55
+            Save();
56
+        }
57
+    }
58
+}

+ 56
- 0
ProRestaurant/Repository/Restaurants/RestaurantCategoryRepository.cs 查看文件

@@ -0,0 +1,56 @@
1
+using Microsoft.EntityFrameworkCore;
2
+using ProRestaurant.Classes;
3
+using ProRestaurant.DBContexts;
4
+using ProRestaurant.Models.Restaurants;
5
+using System.Collections.Generic;
6
+using System.Linq;
7
+
8
+namespace ProRestaurant.Repository.Restaurants
9
+{
10
+    public class RestaurantCategoryRepository : IRestaurantCategoryRepository
11
+    {
12
+        private readonly DBContext dBContext;
13
+
14
+        public RestaurantCategoryRepository(DBContext _DB)
15
+        {
16
+            dBContext = _DB;
17
+        }
18
+
19
+        public ICollection<RestaurantCategory> Get()
20
+        {
21
+            var cats = dBContext.RestaurantCategories.OrderBy(c => c.Description).ToList();
22
+
23
+            foreach (var cat in cats)
24
+            {
25
+                if (!string.IsNullOrEmpty(cat.Image) && !cat.Image.Contains("data:image"))
26
+                    cat.Image = ImageFormatter.ImageToBase64(cat.Image);
27
+            }
28
+
29
+            return cats;
30
+        }
31
+
32
+        public void Insert(RestaurantCategory RestaurantCategory)
33
+        {
34
+            dBContext.Add(RestaurantCategory);
35
+            Save();
36
+        }
37
+
38
+        public void Remove(int id)
39
+        {
40
+            var category = dBContext.RestaurantCategories.Where(r => r.Id == id).FirstOrDefault();
41
+            dBContext.Remove(category);
42
+            Save();
43
+        }
44
+
45
+        public void Save()
46
+        {
47
+            dBContext.SaveChanges();
48
+        }
49
+
50
+        public void Update(RestaurantCategory RestaurantCategory)
51
+        {
52
+            dBContext.Entry(RestaurantCategory).State = EntityState.Modified;
53
+            Save();
54
+        }
55
+    }
56
+}

+ 32
- 3
ProRestaurant/Repository/Restaurants/RestaurantRepository.cs 查看文件

@@ -1,10 +1,11 @@
1 1
 using Microsoft.EntityFrameworkCore;
2
+using ProRestaurant.Classes;
3
+using ProRestaurant.Containers;
2 4
 using ProRestaurant.DBContexts;
3 5
 using ProRestaurant.Models.Restaurants;
4 6
 using System;
5 7
 using System.Collections.Generic;
6 8
 using System.Linq;
7
-using System.Threading.Tasks;
8 9
 
9 10
 namespace ProRestaurant.Repository.Restaurants
10 11
 {
@@ -22,11 +23,39 @@ namespace ProRestaurant.Repository.Restaurants
22 23
             return dBContext.Restaurants.Where(where).FirstOrDefault();
23 24
         }
24 25
 
25
-        public IEnumerable<Restaurant> GetUsers()
26
+        public IEnumerable<Restaurant> GetRestaurants()
26 27
         {
27 28
             return dBContext.Restaurants.ToList();
28 29
         }
29 30
 
31
+        public List<RestaurantCard> GetSearch()
32
+        {
33
+            var restaurants = dBContext.Restaurants.ToList();
34
+
35
+            List<RestaurantCard> cards = new List<RestaurantCard>();
36
+
37
+            foreach (var rest in restaurants)
38
+            {
39
+                var card = new RestaurantCard
40
+                {
41
+                    Id = rest.Id,
42
+                    Name = rest.Name,
43
+                    Suburb = rest.Suburb,
44
+                    SubText = rest.Categories,
45
+                    DeliveryFee = string.Format("{0:C}", rest.DeliveryFee),
46
+                    DeliveryTime = rest.DeliveryTime
47
+                };
48
+                if (!rest.Logo.Contains("data:image"))
49
+                    card.Logo = ImageFormatter.ImageToBase64(rest.Logo);
50
+                else
51
+                    card.Logo = rest.Logo;
52
+
53
+                cards.Add(card);
54
+            }
55
+
56
+            return cards;
57
+        }
58
+
30 59
         public void Insert(Restaurant restaurant)
31 60
         {
32 61
             dBContext.Add(restaurant);
@@ -48,6 +77,6 @@ namespace ProRestaurant.Repository.Restaurants
48 77
         {
49 78
             dBContext.Entry(restaurant).State = EntityState.Modified;
50 79
             Save();
51
-        }
80
+        }        
52 81
     }
53 82
 }

+ 40
- 2
ProRestaurant/Startup.cs 查看文件

@@ -1,7 +1,9 @@
1 1
 using System;
2 2
 using System.Collections.Generic;
3 3
 using System.Linq;
4
+using System.Text;
4 5
 using System.Threading.Tasks;
6
+using Microsoft.AspNetCore.Authentication.JwtBearer;
5 7
 using Microsoft.AspNetCore.Builder;
6 8
 using Microsoft.AspNetCore.Hosting;
7 9
 using Microsoft.AspNetCore.HttpsPolicy;
@@ -12,8 +14,11 @@ using Microsoft.Extensions.Configuration;
12 14
 using Microsoft.Extensions.DependencyInjection;
13 15
 using Microsoft.Extensions.Logging;
14 16
 using Microsoft.Extensions.Options;
17
+using Microsoft.IdentityModel.Tokens;
18
+using ProRestaurant.Classes;
15 19
 using ProRestaurant.DBContexts;
16 20
 using ProRestaurant.Repository.Accounts;
21
+using ProRestaurant.Repository.Restaurants;
17 22
 
18 23
 namespace ProRestaurant
19 24
 {
@@ -35,10 +40,43 @@ namespace ProRestaurant
35 40
                        .AllowAnyHeader();
36 41
             }));
37 42
             services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
38
-            services.AddDbContext<DBContext>(o => o.UseSqlServer(Configuration.GetConnectionString("DefaultDatabase")));
39 43
 
40
-            services.AddTransient<IUserRepository, UserRepository>();
44
+            #region Authentication Setup
45
+            // configure strongly typed settings objects
46
+            var appSettingsSection = Configuration.GetSection("AppSettings");
47
+            services.Configure<AppSettings>(appSettingsSection);
41 48
 
49
+            // configure jwt authentication
50
+            var appSettings = appSettingsSection.Get<AppSettings>();
51
+            var key = Encoding.ASCII.GetBytes(appSettings.Secret);
52
+            services.AddAuthentication(x =>
53
+            {
54
+                x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
55
+                x.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
56
+            })
57
+            .AddJwtBearer(x =>
58
+            {
59
+                x.RequireHttpsMetadata = false;
60
+                x.SaveToken = true;
61
+                x.TokenValidationParameters = new TokenValidationParameters
62
+                {
63
+                    ValidateIssuerSigningKey = true,
64
+                    IssuerSigningKey = new SymmetricSecurityKey(key),
65
+                    ValidateIssuer = false,
66
+                    ValidateAudience = false
67
+                };
68
+            });
69
+
70
+            // configure DI for application services
71
+            services.AddScoped<IAuthenticateRepository, AuthenticateRepository>();
72
+            #endregion
73
+
74
+
75
+            services.AddDbContext<DBContext>(o => o.UseSqlServer(Configuration.GetConnectionString("DefaultDatabase")));           
76
+
77
+            services.AddTransient<IRegistrationRepository, RegistrationRepository>();
78
+            services.AddTransient<IRestaurantCategoryRepository, RestaurantCategoryRepository>();
79
+            services.AddTransient<IRestaurantRepository, RestaurantRepository>();
42 80
 
43 81
             services.Configure<MvcOptions>(options =>
44 82
             {

+ 4
- 1
ProRestaurant/appsettings.json 查看文件

@@ -1,4 +1,7 @@
1
-{
1
+{
2
+  "AppSettings": {
3
+    "Secret": "≡∆≤≥√∞ProVision!"
4
+  },
2 5
   "Logging": {
3 6
     "LogLevel": {
4 7
       "Default": "Warning"

+ 182
- 48
ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.deps.json 查看文件

@@ -29,7 +29,9 @@
29 29
           "Microsoft.EntityFrameworkCore": "2.2.0",
30 30
           "Microsoft.EntityFrameworkCore.SqlServer": "2.2.0",
31 31
           "Microsoft.NETCore.App": "2.2.0",
32
-          "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0"
32
+          "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0",
33
+          "System.Data.SQLite": "1.0.113.1",
34
+          "System.Drawing.Common": "4.7.0"
33 35
         },
34 36
         "runtime": {
35 37
           "ProRestaurant.dll": {}
@@ -38,6 +40,26 @@
38 40
           "ProRestaurant.dll": {}
39 41
         }
40 42
       },
43
+      "Microsoft.NETCore.Platforms/3.1.0": {},
44
+      "Microsoft.Win32.SystemEvents/4.7.0": {
45
+        "dependencies": {
46
+          "Microsoft.NETCore.Platforms": "3.1.0"
47
+        },
48
+        "runtime": {
49
+          "lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll": {
50
+            "assemblyVersion": "4.0.2.0",
51
+            "fileVersion": "4.700.19.56404"
52
+          }
53
+        },
54
+        "runtimeTargets": {
55
+          "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.dll": {
56
+            "rid": "win",
57
+            "assetType": "runtime",
58
+            "assemblyVersion": "4.0.2.0",
59
+            "fileVersion": "4.700.19.56404"
60
+          }
61
+        }
62
+      },
41 63
       "Npgsql/4.0.4": {
42 64
         "dependencies": {
43 65
           "System.Runtime.CompilerServices.Unsafe": "4.5.1",
@@ -71,6 +93,93 @@
71 93
           "lib/netstandard2.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {}
72 94
         }
73 95
       },
96
+      "System.Data.SQLite/1.0.113.1": {
97
+        "dependencies": {
98
+          "System.Data.SQLite.Core": "1.0.113.1"
99
+        }
100
+      },
101
+      "System.Data.SQLite.Core/1.0.113.1": {
102
+        "runtime": {
103
+          "lib/netstandard2.0/System.Data.SQLite.dll": {
104
+            "assemblyVersion": "1.0.113.0",
105
+            "fileVersion": "1.0.113.0"
106
+          }
107
+        },
108
+        "runtimeTargets": {
109
+          "runtimes/linux-x64/native/netstandard2.0/SQLite.Interop.dll": {
110
+            "rid": "linux-x64",
111
+            "assetType": "native",
112
+            "fileVersion": "0.0.0.0"
113
+          },
114
+          "runtimes/linux-x64/native/netstandard2.1/SQLite.Interop.dll": {
115
+            "rid": "linux-x64",
116
+            "assetType": "native",
117
+            "fileVersion": "0.0.0.0"
118
+          },
119
+          "runtimes/osx-x64/native/netstandard2.0/SQLite.Interop.dll": {
120
+            "rid": "osx-x64",
121
+            "assetType": "native",
122
+            "fileVersion": "0.0.0.0"
123
+          },
124
+          "runtimes/osx-x64/native/netstandard2.1/SQLite.Interop.dll": {
125
+            "rid": "osx-x64",
126
+            "assetType": "native",
127
+            "fileVersion": "0.0.0.0"
128
+          },
129
+          "runtimes/win-x64/native/netstandard2.0/SQLite.Interop.dll": {
130
+            "rid": "win-x64",
131
+            "assetType": "native",
132
+            "fileVersion": "1.0.113.0"
133
+          },
134
+          "runtimes/win-x64/native/netstandard2.1/SQLite.Interop.dll": {
135
+            "rid": "win-x64",
136
+            "assetType": "native",
137
+            "fileVersion": "1.0.113.0"
138
+          },
139
+          "runtimes/win-x86/native/netstandard2.0/SQLite.Interop.dll": {
140
+            "rid": "win-x86",
141
+            "assetType": "native",
142
+            "fileVersion": "1.0.113.0"
143
+          },
144
+          "runtimes/win-x86/native/netstandard2.1/SQLite.Interop.dll": {
145
+            "rid": "win-x86",
146
+            "assetType": "native",
147
+            "fileVersion": "1.0.113.0"
148
+          }
149
+        },
150
+        "compile": {
151
+          "lib/netstandard2.0/System.Data.SQLite.dll": {}
152
+        }
153
+      },
154
+      "System.Drawing.Common/4.7.0": {
155
+        "dependencies": {
156
+          "Microsoft.NETCore.Platforms": "3.1.0",
157
+          "Microsoft.Win32.SystemEvents": "4.7.0"
158
+        },
159
+        "runtime": {
160
+          "lib/netstandard2.0/System.Drawing.Common.dll": {
161
+            "assemblyVersion": "4.0.0.1",
162
+            "fileVersion": "4.6.26919.2"
163
+          }
164
+        },
165
+        "runtimeTargets": {
166
+          "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll": {
167
+            "rid": "unix",
168
+            "assetType": "runtime",
169
+            "assemblyVersion": "4.0.0.1",
170
+            "fileVersion": "4.6.26919.2"
171
+          },
172
+          "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll": {
173
+            "rid": "win",
174
+            "assetType": "runtime",
175
+            "assemblyVersion": "4.0.0.1",
176
+            "fileVersion": "4.6.26919.2"
177
+          }
178
+        },
179
+        "compile": {
180
+          "ref/netstandard2.0/System.Drawing.Common.dll": {}
181
+        }
182
+      },
74 183
       "System.ValueTuple/4.5.0": {},
75 184
       "Microsoft.AspNet.WebApi.Client/5.2.6": {
76 185
         "dependencies": {
@@ -2032,7 +2141,7 @@
2032 2141
       "Microsoft.NETCore.App/2.2.0": {
2033 2142
         "dependencies": {
2034 2143
           "Microsoft.NETCore.DotNetHostPolicy": "2.2.0",
2035
-          "Microsoft.NETCore.Platforms": "2.2.0",
2144
+          "Microsoft.NETCore.Platforms": "3.1.0",
2036 2145
           "Microsoft.NETCore.Targets": "2.0.0",
2037 2146
           "NETStandard.Library": "2.0.3"
2038 2147
         },
@@ -2198,9 +2307,6 @@
2198 2307
         },
2199 2308
         "compileOnly": true
2200 2309
       },
2201
-      "Microsoft.NETCore.Platforms/2.2.0": {
2202
-        "compileOnly": true
2203
-      },
2204 2310
       "Microsoft.NETCore.Targets/2.0.0": {
2205 2311
         "compileOnly": true
2206 2312
       },
@@ -2216,7 +2322,7 @@
2216 2322
       },
2217 2323
       "NETStandard.Library/2.0.3": {
2218 2324
         "dependencies": {
2219
-          "Microsoft.NETCore.Platforms": "2.2.0"
2325
+          "Microsoft.NETCore.Platforms": "3.1.0"
2220 2326
         },
2221 2327
         "compileOnly": true
2222 2328
       },
@@ -2266,7 +2372,7 @@
2266 2372
       },
2267 2373
       "runtime.native.System/4.3.0": {
2268 2374
         "dependencies": {
2269
-          "Microsoft.NETCore.Platforms": "2.2.0",
2375
+          "Microsoft.NETCore.Platforms": "3.1.0",
2270 2376
           "Microsoft.NETCore.Targets": "2.0.0"
2271 2377
         },
2272 2378
         "compileOnly": true
@@ -2281,14 +2387,14 @@
2281 2387
       },
2282 2388
       "runtime.native.System.IO.Compression/4.3.0": {
2283 2389
         "dependencies": {
2284
-          "Microsoft.NETCore.Platforms": "2.2.0",
2390
+          "Microsoft.NETCore.Platforms": "3.1.0",
2285 2391
           "Microsoft.NETCore.Targets": "2.0.0"
2286 2392
         },
2287 2393
         "compileOnly": true
2288 2394
       },
2289 2395
       "runtime.native.System.Net.Http/4.3.0": {
2290 2396
         "dependencies": {
2291
-          "Microsoft.NETCore.Platforms": "2.2.0",
2397
+          "Microsoft.NETCore.Platforms": "3.1.0",
2292 2398
           "Microsoft.NETCore.Targets": "2.0.0"
2293 2399
         },
2294 2400
         "compileOnly": true
@@ -2358,7 +2464,7 @@
2358 2464
       },
2359 2465
       "System.Collections/4.3.0": {
2360 2466
         "dependencies": {
2361
-          "Microsoft.NETCore.Platforms": "2.2.0",
2467
+          "Microsoft.NETCore.Platforms": "3.1.0",
2362 2468
           "Microsoft.NETCore.Targets": "2.0.0",
2363 2469
           "System.Runtime": "4.3.0"
2364 2470
         },
@@ -2410,7 +2516,7 @@
2410 2516
       },
2411 2517
       "System.Console/4.3.0": {
2412 2518
         "dependencies": {
2413
-          "Microsoft.NETCore.Platforms": "2.2.0",
2519
+          "Microsoft.NETCore.Platforms": "3.1.0",
2414 2520
           "Microsoft.NETCore.Targets": "2.0.0",
2415 2521
           "System.IO": "4.3.0",
2416 2522
           "System.Runtime": "4.3.0",
@@ -2438,7 +2544,7 @@
2438 2544
       },
2439 2545
       "System.Diagnostics.Debug/4.3.0": {
2440 2546
         "dependencies": {
2441
-          "Microsoft.NETCore.Platforms": "2.2.0",
2547
+          "Microsoft.NETCore.Platforms": "3.1.0",
2442 2548
           "Microsoft.NETCore.Targets": "2.0.0",
2443 2549
           "System.Runtime": "4.3.0"
2444 2550
         },
@@ -2449,7 +2555,7 @@
2449 2555
       },
2450 2556
       "System.Diagnostics.FileVersionInfo/4.3.0": {
2451 2557
         "dependencies": {
2452
-          "Microsoft.NETCore.Platforms": "2.2.0",
2558
+          "Microsoft.NETCore.Platforms": "3.1.0",
2453 2559
           "System.Globalization": "4.3.0",
2454 2560
           "System.IO": "4.3.0",
2455 2561
           "System.IO.FileSystem": "4.3.0",
@@ -2472,7 +2578,7 @@
2472 2578
       },
2473 2579
       "System.Diagnostics.Tools/4.3.0": {
2474 2580
         "dependencies": {
2475
-          "Microsoft.NETCore.Platforms": "2.2.0",
2581
+          "Microsoft.NETCore.Platforms": "3.1.0",
2476 2582
           "Microsoft.NETCore.Targets": "2.0.0",
2477 2583
           "System.Runtime": "4.3.0"
2478 2584
         },
@@ -2480,7 +2586,7 @@
2480 2586
       },
2481 2587
       "System.Diagnostics.Tracing/4.3.0": {
2482 2588
         "dependencies": {
2483
-          "Microsoft.NETCore.Platforms": "2.2.0",
2589
+          "Microsoft.NETCore.Platforms": "3.1.0",
2484 2590
           "Microsoft.NETCore.Targets": "2.0.0",
2485 2591
           "System.Runtime": "4.3.0"
2486 2592
         },
@@ -2507,7 +2613,7 @@
2507 2613
       },
2508 2614
       "System.Globalization/4.3.0": {
2509 2615
         "dependencies": {
2510
-          "Microsoft.NETCore.Platforms": "2.2.0",
2616
+          "Microsoft.NETCore.Platforms": "3.1.0",
2511 2617
           "Microsoft.NETCore.Targets": "2.0.0",
2512 2618
           "System.Runtime": "4.3.0"
2513 2619
         },
@@ -2515,7 +2621,7 @@
2515 2621
       },
2516 2622
       "System.Globalization.Calendars/4.3.0": {
2517 2623
         "dependencies": {
2518
-          "Microsoft.NETCore.Platforms": "2.2.0",
2624
+          "Microsoft.NETCore.Platforms": "3.1.0",
2519 2625
           "Microsoft.NETCore.Targets": "2.0.0",
2520 2626
           "System.Globalization": "4.3.0",
2521 2627
           "System.Runtime": "4.3.0"
@@ -2524,7 +2630,7 @@
2524 2630
       },
2525 2631
       "System.Globalization.Extensions/4.3.0": {
2526 2632
         "dependencies": {
2527
-          "Microsoft.NETCore.Platforms": "2.2.0",
2633
+          "Microsoft.NETCore.Platforms": "3.1.0",
2528 2634
           "System.Globalization": "4.3.0",
2529 2635
           "System.Resources.ResourceManager": "4.3.0",
2530 2636
           "System.Runtime": "4.3.0",
@@ -2552,7 +2658,7 @@
2552 2658
       },
2553 2659
       "System.IO/4.3.0": {
2554 2660
         "dependencies": {
2555
-          "Microsoft.NETCore.Platforms": "2.2.0",
2661
+          "Microsoft.NETCore.Platforms": "3.1.0",
2556 2662
           "Microsoft.NETCore.Targets": "2.0.0",
2557 2663
           "System.Runtime": "4.3.0",
2558 2664
           "System.Text.Encoding": "4.3.0",
@@ -2562,7 +2668,7 @@
2562 2668
       },
2563 2669
       "System.IO.Compression/4.3.0": {
2564 2670
         "dependencies": {
2565
-          "Microsoft.NETCore.Platforms": "2.2.0",
2671
+          "Microsoft.NETCore.Platforms": "3.1.0",
2566 2672
           "System.Buffers": "4.5.0",
2567 2673
           "System.Collections": "4.3.0",
2568 2674
           "System.Diagnostics.Debug": "4.3.0",
@@ -2582,7 +2688,7 @@
2582 2688
       },
2583 2689
       "System.IO.FileSystem/4.3.0": {
2584 2690
         "dependencies": {
2585
-          "Microsoft.NETCore.Platforms": "2.2.0",
2691
+          "Microsoft.NETCore.Platforms": "3.1.0",
2586 2692
           "Microsoft.NETCore.Targets": "2.0.0",
2587 2693
           "System.IO": "4.3.0",
2588 2694
           "System.IO.FileSystem.Primitives": "4.3.0",
@@ -2655,7 +2761,7 @@
2655 2761
       },
2656 2762
       "System.Net.Http/4.3.0": {
2657 2763
         "dependencies": {
2658
-          "Microsoft.NETCore.Platforms": "2.2.0",
2764
+          "Microsoft.NETCore.Platforms": "3.1.0",
2659 2765
           "System.Collections": "4.3.0",
2660 2766
           "System.Diagnostics.Debug": "4.3.0",
2661 2767
           "System.Diagnostics.DiagnosticSource": "4.5.0",
@@ -2686,7 +2792,7 @@
2686 2792
       },
2687 2793
       "System.Net.Primitives/4.3.0": {
2688 2794
         "dependencies": {
2689
-          "Microsoft.NETCore.Platforms": "2.2.0",
2795
+          "Microsoft.NETCore.Platforms": "3.1.0",
2690 2796
           "Microsoft.NETCore.Targets": "2.0.0",
2691 2797
           "System.Runtime": "4.3.0",
2692 2798
           "System.Runtime.Handles": "4.3.0"
@@ -2744,7 +2850,7 @@
2744 2850
       },
2745 2851
       "System.Reflection/4.3.0": {
2746 2852
         "dependencies": {
2747
-          "Microsoft.NETCore.Platforms": "2.2.0",
2853
+          "Microsoft.NETCore.Platforms": "3.1.0",
2748 2854
           "Microsoft.NETCore.Targets": "2.0.0",
2749 2855
           "System.IO": "4.3.0",
2750 2856
           "System.Reflection.Primitives": "4.3.0",
@@ -2781,7 +2887,7 @@
2781 2887
       },
2782 2888
       "System.Reflection.Extensions/4.3.0": {
2783 2889
         "dependencies": {
2784
-          "Microsoft.NETCore.Platforms": "2.2.0",
2890
+          "Microsoft.NETCore.Platforms": "3.1.0",
2785 2891
           "Microsoft.NETCore.Targets": "2.0.0",
2786 2892
           "System.Reflection": "4.3.0",
2787 2893
           "System.Runtime": "4.3.0"
@@ -2793,7 +2899,7 @@
2793 2899
       },
2794 2900
       "System.Reflection.Primitives/4.3.0": {
2795 2901
         "dependencies": {
2796
-          "Microsoft.NETCore.Platforms": "2.2.0",
2902
+          "Microsoft.NETCore.Platforms": "3.1.0",
2797 2903
           "Microsoft.NETCore.Targets": "2.0.0",
2798 2904
           "System.Runtime": "4.3.0"
2799 2905
         },
@@ -2808,7 +2914,7 @@
2808 2914
       },
2809 2915
       "System.Resources.ResourceManager/4.3.0": {
2810 2916
         "dependencies": {
2811
-          "Microsoft.NETCore.Platforms": "2.2.0",
2917
+          "Microsoft.NETCore.Platforms": "3.1.0",
2812 2918
           "Microsoft.NETCore.Targets": "2.0.0",
2813 2919
           "System.Globalization": "4.3.0",
2814 2920
           "System.Reflection": "4.3.0",
@@ -2818,7 +2924,7 @@
2818 2924
       },
2819 2925
       "System.Runtime/4.3.0": {
2820 2926
         "dependencies": {
2821
-          "Microsoft.NETCore.Platforms": "2.2.0",
2927
+          "Microsoft.NETCore.Platforms": "3.1.0",
2822 2928
           "Microsoft.NETCore.Targets": "2.0.0"
2823 2929
         },
2824 2930
         "compileOnly": true
@@ -2831,7 +2937,7 @@
2831 2937
       },
2832 2938
       "System.Runtime.Extensions/4.3.0": {
2833 2939
         "dependencies": {
2834
-          "Microsoft.NETCore.Platforms": "2.2.0",
2940
+          "Microsoft.NETCore.Platforms": "3.1.0",
2835 2941
           "Microsoft.NETCore.Targets": "2.0.0",
2836 2942
           "System.Runtime": "4.3.0"
2837 2943
         },
@@ -2839,7 +2945,7 @@
2839 2945
       },
2840 2946
       "System.Runtime.Handles/4.3.0": {
2841 2947
         "dependencies": {
2842
-          "Microsoft.NETCore.Platforms": "2.2.0",
2948
+          "Microsoft.NETCore.Platforms": "3.1.0",
2843 2949
           "Microsoft.NETCore.Targets": "2.0.0",
2844 2950
           "System.Runtime": "4.3.0"
2845 2951
         },
@@ -2847,7 +2953,7 @@
2847 2953
       },
2848 2954
       "System.Runtime.InteropServices/4.3.0": {
2849 2955
         "dependencies": {
2850
-          "Microsoft.NETCore.Platforms": "2.2.0",
2956
+          "Microsoft.NETCore.Platforms": "3.1.0",
2851 2957
           "Microsoft.NETCore.Targets": "2.0.0",
2852 2958
           "System.Reflection": "4.3.0",
2853 2959
           "System.Reflection.Primitives": "4.3.0",
@@ -2897,7 +3003,7 @@
2897 3003
       },
2898 3004
       "System.Security.AccessControl/4.5.0": {
2899 3005
         "dependencies": {
2900
-          "Microsoft.NETCore.Platforms": "2.2.0",
3006
+          "Microsoft.NETCore.Platforms": "3.1.0",
2901 3007
           "System.Security.Principal.Windows": "4.5.0"
2902 3008
         },
2903 3009
         "compile": {
@@ -2919,7 +3025,7 @@
2919 3025
       },
2920 3026
       "System.Security.Cryptography.Algorithms/4.3.0": {
2921 3027
         "dependencies": {
2922
-          "Microsoft.NETCore.Platforms": "2.2.0",
3028
+          "Microsoft.NETCore.Platforms": "3.1.0",
2923 3029
           "System.Collections": "4.3.0",
2924 3030
           "System.IO": "4.3.0",
2925 3031
           "System.Resources.ResourceManager": "4.3.0",
@@ -2944,7 +3050,7 @@
2944 3050
       },
2945 3051
       "System.Security.Cryptography.Csp/4.3.0": {
2946 3052
         "dependencies": {
2947
-          "Microsoft.NETCore.Platforms": "2.2.0",
3053
+          "Microsoft.NETCore.Platforms": "3.1.0",
2948 3054
           "System.IO": "4.3.0",
2949 3055
           "System.Reflection": "4.3.0",
2950 3056
           "System.Resources.ResourceManager": "4.3.0",
@@ -2962,7 +3068,7 @@
2962 3068
       },
2963 3069
       "System.Security.Cryptography.Encoding/4.3.0": {
2964 3070
         "dependencies": {
2965
-          "Microsoft.NETCore.Platforms": "2.2.0",
3071
+          "Microsoft.NETCore.Platforms": "3.1.0",
2966 3072
           "System.Collections": "4.3.0",
2967 3073
           "System.Collections.Concurrent": "4.3.0",
2968 3074
           "System.Linq": "4.3.0",
@@ -3015,7 +3121,7 @@
3015 3121
       },
3016 3122
       "System.Security.Cryptography.X509Certificates/4.3.0": {
3017 3123
         "dependencies": {
3018
-          "Microsoft.NETCore.Platforms": "2.2.0",
3124
+          "Microsoft.NETCore.Platforms": "3.1.0",
3019 3125
           "System.Collections": "4.3.0",
3020 3126
           "System.Diagnostics.Debug": "4.3.0",
3021 3127
           "System.Globalization": "4.3.0",
@@ -3070,7 +3176,7 @@
3070 3176
       },
3071 3177
       "System.Security.Principal.Windows/4.5.0": {
3072 3178
         "dependencies": {
3073
-          "Microsoft.NETCore.Platforms": "2.2.0"
3179
+          "Microsoft.NETCore.Platforms": "3.1.0"
3074 3180
         },
3075 3181
         "compile": {
3076 3182
           "ref/netstandard2.0/System.Security.Principal.Windows.dll": {}
@@ -3079,7 +3185,7 @@
3079 3185
       },
3080 3186
       "System.Text.Encoding/4.3.0": {
3081 3187
         "dependencies": {
3082
-          "Microsoft.NETCore.Platforms": "2.2.0",
3188
+          "Microsoft.NETCore.Platforms": "3.1.0",
3083 3189
           "Microsoft.NETCore.Targets": "2.0.0",
3084 3190
           "System.Runtime": "4.3.0"
3085 3191
         },
@@ -3087,14 +3193,14 @@
3087 3193
       },
3088 3194
       "System.Text.Encoding.CodePages/4.5.0": {
3089 3195
         "dependencies": {
3090
-          "Microsoft.NETCore.Platforms": "2.2.0",
3196
+          "Microsoft.NETCore.Platforms": "3.1.0",
3091 3197
           "System.Runtime.CompilerServices.Unsafe": "4.5.1"
3092 3198
         },
3093 3199
         "compileOnly": true
3094 3200
       },
3095 3201
       "System.Text.Encoding.Extensions/4.3.0": {
3096 3202
         "dependencies": {
3097
-          "Microsoft.NETCore.Platforms": "2.2.0",
3203
+          "Microsoft.NETCore.Platforms": "3.1.0",
3098 3204
           "Microsoft.NETCore.Targets": "2.0.0",
3099 3205
           "System.Runtime": "4.3.0",
3100 3206
           "System.Text.Encoding": "4.3.0"
@@ -3128,7 +3234,7 @@
3128 3234
       },
3129 3235
       "System.Threading.Tasks/4.3.0": {
3130 3236
         "dependencies": {
3131
-          "Microsoft.NETCore.Platforms": "2.2.0",
3237
+          "Microsoft.NETCore.Platforms": "3.1.0",
3132 3238
           "Microsoft.NETCore.Targets": "2.0.0",
3133 3239
           "System.Runtime": "4.3.0"
3134 3240
         },
@@ -3266,6 +3372,20 @@
3266 3372
       "serviceable": false,
3267 3373
       "sha512": ""
3268 3374
     },
3375
+    "Microsoft.NETCore.Platforms/3.1.0": {
3376
+      "type": "package",
3377
+      "serviceable": true,
3378
+      "sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
3379
+      "path": "microsoft.netcore.platforms/3.1.0",
3380
+      "hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
3381
+    },
3382
+    "Microsoft.Win32.SystemEvents/4.7.0": {
3383
+      "type": "package",
3384
+      "serviceable": true,
3385
+      "sha512": "sha512-mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==",
3386
+      "path": "microsoft.win32.systemevents/4.7.0",
3387
+      "hashPath": "microsoft.win32.systemevents.4.7.0.nupkg.sha512"
3388
+    },
3269 3389
     "Npgsql/4.0.4": {
3270 3390
       "type": "package",
3271 3391
       "serviceable": true,
@@ -3280,6 +3400,27 @@
3280 3400
       "path": "npgsql.entityframeworkcore.postgresql/2.2.0",
3281 3401
       "hashPath": "npgsql.entityframeworkcore.postgresql.2.2.0.nupkg.sha512"
3282 3402
     },
3403
+    "System.Data.SQLite/1.0.113.1": {
3404
+      "type": "package",
3405
+      "serviceable": true,
3406
+      "sha512": "sha512-80q28QKsEebMm1PhCBEKFoxTYiE6P1YtA+5IVlBeBxgB8LwDgbaAml6RIfGu719JoRtbmNqtLdhDA8jj84s0gA==",
3407
+      "path": "system.data.sqlite/1.0.113.1",
3408
+      "hashPath": "system.data.sqlite.1.0.113.1.nupkg.sha512"
3409
+    },
3410
+    "System.Data.SQLite.Core/1.0.113.1": {
3411
+      "type": "package",
3412
+      "serviceable": true,
3413
+      "sha512": "sha512-ymvB558/Tgdxj2MzJjhDvPLJ/S2WgG1KzQ1cmqzsW3+YQ5DO+eAU04OpY5deK6fndM+DEU8+lwmmYHxxUS2Qvw==",
3414
+      "path": "system.data.sqlite.core/1.0.113.1",
3415
+      "hashPath": "system.data.sqlite.core.1.0.113.1.nupkg.sha512"
3416
+    },
3417
+    "System.Drawing.Common/4.7.0": {
3418
+      "type": "package",
3419
+      "serviceable": true,
3420
+      "sha512": "sha512-v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==",
3421
+      "path": "system.drawing.common/4.7.0",
3422
+      "hashPath": "system.drawing.common.4.7.0.nupkg.sha512"
3423
+    },
3283 3424
     "System.ValueTuple/4.5.0": {
3284 3425
       "type": "package",
3285 3426
       "serviceable": true,
@@ -4463,13 +4604,6 @@
4463 4604
       "path": "microsoft.netcore.dotnethostresolver/2.2.0",
4464 4605
       "hashPath": "microsoft.netcore.dotnethostresolver.2.2.0.nupkg.sha512"
4465 4606
     },
4466
-    "Microsoft.NETCore.Platforms/2.2.0": {
4467
-      "type": "package",
4468
-      "serviceable": true,
4469
-      "sha512": "sha512-39+GVHdbm+cmoOjdvm+fhiMbddnuVyUlBdYS8Yhn5xsNaBoTXpgBsxQQlI2Sv9EjIP0F+itG6yrDaOM2OEGupQ==",
4470
-      "path": "microsoft.netcore.platforms/2.2.0",
4471
-      "hashPath": "microsoft.netcore.platforms.2.2.0.nupkg.sha512"
4472
-    },
4473 4607
     "Microsoft.NETCore.Targets/2.0.0": {
4474 4608
       "type": "package",
4475 4609
       "serviceable": true,

二進制
ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.dll 查看文件


二進制
ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.pdb 查看文件


+ 4
- 1
ProRestaurant/bin/Debug/netcoreapp2.2/appsettings.json 查看文件

@@ -1,4 +1,7 @@
1
-{
1
+{
2
+  "AppSettings": {
3
+    "Secret": "≡∆≤≥√∞ProVision!"
4
+  },
2 5
   "Logging": {
3 6
     "LogLevel": {
4 7
       "Default": "Warning"

二進制
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.assets.cache 查看文件


+ 1
- 1
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.CoreCompileInputs.cache 查看文件

@@ -1 +1 @@
1
-77194c0e6065fe8ba524baf1a69af7e606ad6513
1
+d43a7af6b2b5d7d9d5ce44deb53c19ad484cc2cc

+ 1
- 1
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.FileListAbsolute.txt 查看文件

@@ -27,10 +27,10 @@ C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\bin\Debug\net
27 27
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csprojAssemblyReference.cache
28 28
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.AssemblyInfoInputs.cache
29 29
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.AssemblyInfo.cs
30
-C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csproj.CoreCompileInputs.cache
31 30
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorAssemblyInfo.cache
32 31
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorAssemblyInfo.cs
33 32
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorTargetAssemblyInfo.cache
34 33
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.dll
35 34
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.pdb
36 35
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.genruntimeconfig.cache
36
+C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csproj.CoreCompileInputs.cache

二進制
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csprojAssemblyReference.cache 查看文件


二進制
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.dll 查看文件


二進制
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.pdb 查看文件


+ 8
- 0
ProRestaurant/obj/ProRestaurant.csproj.nuget.dgspec.json 查看文件

@@ -71,6 +71,14 @@
71 71
             "Npgsql.EntityFrameworkCore.PostgreSQL": {
72 72
               "target": "Package",
73 73
               "version": "[2.2.0, )"
74
+            },
75
+            "System.Data.SQLite": {
76
+              "target": "Package",
77
+              "version": "[1.0.113.1, )"
78
+            },
79
+            "System.Drawing.Common": {
80
+              "target": "Package",
81
+              "version": "[4.7.0, )"
74 82
             }
75 83
           },
76 84
           "imports": [

+ 240
- 6
ProRestaurant/obj/project.assets.json 查看文件

@@ -2668,7 +2668,7 @@
2668 2668
           "Microsoft.NETCore.DotNetAppHost": "2.2.0"
2669 2669
         }
2670 2670
       },
2671
-      "Microsoft.NETCore.Platforms/2.2.0": {
2671
+      "Microsoft.NETCore.Platforms/3.1.0": {
2672 2672
         "type": "package",
2673 2673
         "compile": {
2674 2674
           "lib/netstandard1.0/_._": {}
@@ -2709,6 +2709,24 @@
2709 2709
           }
2710 2710
         }
2711 2711
       },
2712
+      "Microsoft.Win32.SystemEvents/4.7.0": {
2713
+        "type": "package",
2714
+        "dependencies": {
2715
+          "Microsoft.NETCore.Platforms": "3.1.0"
2716
+        },
2717
+        "compile": {
2718
+          "ref/netstandard2.0/_._": {}
2719
+        },
2720
+        "runtime": {
2721
+          "lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll": {}
2722
+        },
2723
+        "runtimeTargets": {
2724
+          "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.dll": {
2725
+            "assetType": "runtime",
2726
+            "rid": "win"
2727
+          }
2728
+        }
2729
+      },
2712 2730
       "NETStandard.Library/2.0.3": {
2713 2731
         "type": "package",
2714 2732
         "dependencies": {
@@ -3147,6 +3165,55 @@
3147 3165
           }
3148 3166
         }
3149 3167
       },
3168
+      "System.Data.SQLite/1.0.113.1": {
3169
+        "type": "package",
3170
+        "dependencies": {
3171
+          "System.Data.SQLite.Core": "1.0.113.1"
3172
+        }
3173
+      },
3174
+      "System.Data.SQLite.Core/1.0.113.1": {
3175
+        "type": "package",
3176
+        "compile": {
3177
+          "lib/netstandard2.0/System.Data.SQLite.dll": {}
3178
+        },
3179
+        "runtime": {
3180
+          "lib/netstandard2.0/System.Data.SQLite.dll": {}
3181
+        },
3182
+        "runtimeTargets": {
3183
+          "runtimes/linux-x64/native/netstandard2.0/SQLite.Interop.dll": {
3184
+            "assetType": "native",
3185
+            "rid": "linux-x64"
3186
+          },
3187
+          "runtimes/linux-x64/native/netstandard2.1/SQLite.Interop.dll": {
3188
+            "assetType": "native",
3189
+            "rid": "linux-x64"
3190
+          },
3191
+          "runtimes/osx-x64/native/netstandard2.0/SQLite.Interop.dll": {
3192
+            "assetType": "native",
3193
+            "rid": "osx-x64"
3194
+          },
3195
+          "runtimes/osx-x64/native/netstandard2.1/SQLite.Interop.dll": {
3196
+            "assetType": "native",
3197
+            "rid": "osx-x64"
3198
+          },
3199
+          "runtimes/win-x64/native/netstandard2.0/SQLite.Interop.dll": {
3200
+            "assetType": "native",
3201
+            "rid": "win-x64"
3202
+          },
3203
+          "runtimes/win-x64/native/netstandard2.1/SQLite.Interop.dll": {
3204
+            "assetType": "native",
3205
+            "rid": "win-x64"
3206
+          },
3207
+          "runtimes/win-x86/native/netstandard2.0/SQLite.Interop.dll": {
3208
+            "assetType": "native",
3209
+            "rid": "win-x86"
3210
+          },
3211
+          "runtimes/win-x86/native/netstandard2.1/SQLite.Interop.dll": {
3212
+            "assetType": "native",
3213
+            "rid": "win-x86"
3214
+          }
3215
+        }
3216
+      },
3150 3217
       "System.Diagnostics.Contracts/4.3.0": {
3151 3218
         "type": "package",
3152 3219
         "dependencies": {
@@ -3243,6 +3310,29 @@
3243 3310
           "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {}
3244 3311
         }
3245 3312
       },
3313
+      "System.Drawing.Common/4.7.0": {
3314
+        "type": "package",
3315
+        "dependencies": {
3316
+          "Microsoft.NETCore.Platforms": "3.1.0",
3317
+          "Microsoft.Win32.SystemEvents": "4.7.0"
3318
+        },
3319
+        "compile": {
3320
+          "ref/netstandard2.0/System.Drawing.Common.dll": {}
3321
+        },
3322
+        "runtime": {
3323
+          "lib/netstandard2.0/System.Drawing.Common.dll": {}
3324
+        },
3325
+        "runtimeTargets": {
3326
+          "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll": {
3327
+            "assetType": "runtime",
3328
+            "rid": "unix"
3329
+          },
3330
+          "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll": {
3331
+            "assetType": "runtime",
3332
+            "rid": "win"
3333
+          }
3334
+        }
3335
+      },
3246 3336
       "System.Dynamic.Runtime/4.3.0": {
3247 3337
         "type": "package",
3248 3338
         "dependencies": {
@@ -7158,17 +7248,17 @@
7158 7248
         "runtime.json"
7159 7249
       ]
7160 7250
     },
7161
-    "Microsoft.NETCore.Platforms/2.2.0": {
7162
-      "sha512": "39+GVHdbm+cmoOjdvm+fhiMbddnuVyUlBdYS8Yhn5xsNaBoTXpgBsxQQlI2Sv9EjIP0F+itG6yrDaOM2OEGupQ==",
7251
+    "Microsoft.NETCore.Platforms/3.1.0": {
7252
+      "sha512": "z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
7163 7253
       "type": "package",
7164
-      "path": "microsoft.netcore.platforms/2.2.0",
7254
+      "path": "microsoft.netcore.platforms/3.1.0",
7165 7255
       "files": [
7166 7256
         ".nupkg.metadata",
7167 7257
         ".signature.p7s",
7168 7258
         "LICENSE.TXT",
7169 7259
         "THIRD-PARTY-NOTICES.TXT",
7170 7260
         "lib/netstandard1.0/_._",
7171
-        "microsoft.netcore.platforms.2.2.0.nupkg.sha512",
7261
+        "microsoft.netcore.platforms.3.1.0.nupkg.sha512",
7172 7262
         "microsoft.netcore.platforms.nuspec",
7173 7263
         "runtime.json",
7174 7264
         "useSharedDesignerContext.txt",
@@ -7231,6 +7321,35 @@
7231 7321
         "version.txt"
7232 7322
       ]
7233 7323
     },
7324
+    "Microsoft.Win32.SystemEvents/4.7.0": {
7325
+      "sha512": "mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==",
7326
+      "type": "package",
7327
+      "path": "microsoft.win32.systemevents/4.7.0",
7328
+      "files": [
7329
+        ".nupkg.metadata",
7330
+        ".signature.p7s",
7331
+        "LICENSE.TXT",
7332
+        "THIRD-PARTY-NOTICES.TXT",
7333
+        "lib/net461/Microsoft.Win32.SystemEvents.dll",
7334
+        "lib/net461/Microsoft.Win32.SystemEvents.xml",
7335
+        "lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll",
7336
+        "lib/netstandard2.0/Microsoft.Win32.SystemEvents.xml",
7337
+        "microsoft.win32.systemevents.4.7.0.nupkg.sha512",
7338
+        "microsoft.win32.systemevents.nuspec",
7339
+        "ref/net461/Microsoft.Win32.SystemEvents.dll",
7340
+        "ref/net461/Microsoft.Win32.SystemEvents.xml",
7341
+        "ref/net472/Microsoft.Win32.SystemEvents.dll",
7342
+        "ref/net472/Microsoft.Win32.SystemEvents.xml",
7343
+        "ref/netstandard2.0/Microsoft.Win32.SystemEvents.dll",
7344
+        "ref/netstandard2.0/Microsoft.Win32.SystemEvents.xml",
7345
+        "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.dll",
7346
+        "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.xml",
7347
+        "runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll",
7348
+        "runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.xml",
7349
+        "useSharedDesignerContext.txt",
7350
+        "version.txt"
7351
+      ]
7352
+    },
7234 7353
     "NETStandard.Library/2.0.3": {
7235 7354
       "sha512": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
7236 7355
       "type": "package",
@@ -8243,6 +8362,72 @@
8243 8362
         "version.txt"
8244 8363
       ]
8245 8364
     },
8365
+    "System.Data.SQLite/1.0.113.1": {
8366
+      "sha512": "80q28QKsEebMm1PhCBEKFoxTYiE6P1YtA+5IVlBeBxgB8LwDgbaAml6RIfGu719JoRtbmNqtLdhDA8jj84s0gA==",
8367
+      "type": "package",
8368
+      "path": "system.data.sqlite/1.0.113.1",
8369
+      "files": [
8370
+        ".nupkg.metadata",
8371
+        ".signature.p7s",
8372
+        "system.data.sqlite.1.0.113.1.nupkg.sha512",
8373
+        "system.data.sqlite.nuspec"
8374
+      ]
8375
+    },
8376
+    "System.Data.SQLite.Core/1.0.113.1": {
8377
+      "sha512": "ymvB558/Tgdxj2MzJjhDvPLJ/S2WgG1KzQ1cmqzsW3+YQ5DO+eAU04OpY5deK6fndM+DEU8+lwmmYHxxUS2Qvw==",
8378
+      "type": "package",
8379
+      "path": "system.data.sqlite.core/1.0.113.1",
8380
+      "files": [
8381
+        ".nupkg.metadata",
8382
+        ".signature.p7s",
8383
+        "build/net20/System.Data.SQLite.Core.targets",
8384
+        "build/net20/x64/SQLite.Interop.dll",
8385
+        "build/net20/x86/SQLite.Interop.dll",
8386
+        "build/net40/System.Data.SQLite.Core.targets",
8387
+        "build/net40/x64/SQLite.Interop.dll",
8388
+        "build/net40/x86/SQLite.Interop.dll",
8389
+        "build/net45/System.Data.SQLite.Core.targets",
8390
+        "build/net45/x64/SQLite.Interop.dll",
8391
+        "build/net45/x86/SQLite.Interop.dll",
8392
+        "build/net451/System.Data.SQLite.Core.targets",
8393
+        "build/net451/x64/SQLite.Interop.dll",
8394
+        "build/net451/x86/SQLite.Interop.dll",
8395
+        "build/net46/System.Data.SQLite.Core.targets",
8396
+        "build/net46/x64/SQLite.Interop.dll",
8397
+        "build/net46/x86/SQLite.Interop.dll",
8398
+        "lib/net20/System.Data.SQLite.dll",
8399
+        "lib/net20/System.Data.SQLite.dll.config",
8400
+        "lib/net20/System.Data.SQLite.xml",
8401
+        "lib/net40/System.Data.SQLite.dll",
8402
+        "lib/net40/System.Data.SQLite.dll.config",
8403
+        "lib/net40/System.Data.SQLite.xml",
8404
+        "lib/net45/System.Data.SQLite.dll",
8405
+        "lib/net45/System.Data.SQLite.dll.config",
8406
+        "lib/net45/System.Data.SQLite.xml",
8407
+        "lib/net451/System.Data.SQLite.dll",
8408
+        "lib/net451/System.Data.SQLite.dll.config",
8409
+        "lib/net451/System.Data.SQLite.xml",
8410
+        "lib/net46/System.Data.SQLite.dll",
8411
+        "lib/net46/System.Data.SQLite.dll.config",
8412
+        "lib/net46/System.Data.SQLite.xml",
8413
+        "lib/netstandard2.0/System.Data.SQLite.dll",
8414
+        "lib/netstandard2.0/System.Data.SQLite.dll.config",
8415
+        "lib/netstandard2.0/System.Data.SQLite.xml",
8416
+        "lib/netstandard2.1/System.Data.SQLite.dll",
8417
+        "lib/netstandard2.1/System.Data.SQLite.dll.config",
8418
+        "lib/netstandard2.1/System.Data.SQLite.xml",
8419
+        "runtimes/linux-x64/native/netstandard2.0/SQLite.Interop.dll",
8420
+        "runtimes/linux-x64/native/netstandard2.1/SQLite.Interop.dll",
8421
+        "runtimes/osx-x64/native/netstandard2.0/SQLite.Interop.dll",
8422
+        "runtimes/osx-x64/native/netstandard2.1/SQLite.Interop.dll",
8423
+        "runtimes/win-x64/native/netstandard2.0/SQLite.Interop.dll",
8424
+        "runtimes/win-x64/native/netstandard2.1/SQLite.Interop.dll",
8425
+        "runtimes/win-x86/native/netstandard2.0/SQLite.Interop.dll",
8426
+        "runtimes/win-x86/native/netstandard2.1/SQLite.Interop.dll",
8427
+        "system.data.sqlite.core.1.0.113.1.nupkg.sha512",
8428
+        "system.data.sqlite.core.nuspec"
8429
+      ]
8430
+    },
8246 8431
     "System.Diagnostics.Contracts/4.3.0": {
8247 8432
       "sha512": "clL6acqvIbbx3JYunlkrWV5sP9qGd0sLl612eXrBVVwakTTlMNtvZB5RiC2rU2uYxSnIt2ssUQgA2adrYSqYhA==",
8248 8433
       "type": "package",
@@ -8621,6 +8806,45 @@
8621 8806
         "system.diagnostics.tracing.nuspec"
8622 8807
       ]
8623 8808
     },
8809
+    "System.Drawing.Common/4.7.0": {
8810
+      "sha512": "v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==",
8811
+      "type": "package",
8812
+      "path": "system.drawing.common/4.7.0",
8813
+      "files": [
8814
+        ".nupkg.metadata",
8815
+        ".signature.p7s",
8816
+        "LICENSE.TXT",
8817
+        "THIRD-PARTY-NOTICES.TXT",
8818
+        "lib/MonoAndroid10/_._",
8819
+        "lib/MonoTouch10/_._",
8820
+        "lib/net461/System.Drawing.Common.dll",
8821
+        "lib/netstandard2.0/System.Drawing.Common.dll",
8822
+        "lib/xamarinios10/_._",
8823
+        "lib/xamarinmac20/_._",
8824
+        "lib/xamarintvos10/_._",
8825
+        "lib/xamarinwatchos10/_._",
8826
+        "ref/MonoAndroid10/_._",
8827
+        "ref/MonoTouch10/_._",
8828
+        "ref/net461/System.Drawing.Common.dll",
8829
+        "ref/netcoreapp3.0/System.Drawing.Common.dll",
8830
+        "ref/netcoreapp3.0/System.Drawing.Common.xml",
8831
+        "ref/netstandard2.0/System.Drawing.Common.dll",
8832
+        "ref/xamarinios10/_._",
8833
+        "ref/xamarinmac20/_._",
8834
+        "ref/xamarintvos10/_._",
8835
+        "ref/xamarinwatchos10/_._",
8836
+        "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll",
8837
+        "runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll",
8838
+        "runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.xml",
8839
+        "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll",
8840
+        "runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll",
8841
+        "runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.xml",
8842
+        "system.drawing.common.4.7.0.nupkg.sha512",
8843
+        "system.drawing.common.nuspec",
8844
+        "useSharedDesignerContext.txt",
8845
+        "version.txt"
8846
+      ]
8847
+    },
8624 8848
     "System.Dynamic.Runtime/4.3.0": {
8625 8849
       "sha512": "SNVi1E/vfWUAs/WYKhE9+qlS6KqK0YVhnlT0HQtr8pMIA8YX3lwy3uPMownDwdYISBdmAF/2holEIldVp85Wag==",
8626 8850
       "type": "package",
@@ -12164,7 +12388,9 @@
12164 12388
       "Microsoft.EntityFrameworkCore >= 2.2.0",
12165 12389
       "Microsoft.EntityFrameworkCore.SqlServer >= 2.2.0",
12166 12390
       "Microsoft.NETCore.App >= 2.2.0",
12167
-      "Npgsql.EntityFrameworkCore.PostgreSQL >= 2.2.0"
12391
+      "Npgsql.EntityFrameworkCore.PostgreSQL >= 2.2.0",
12392
+      "System.Data.SQLite >= 1.0.113.1",
12393
+      "System.Drawing.Common >= 4.7.0"
12168 12394
     ]
12169 12395
   },
12170 12396
   "packageFolders": {
@@ -12238,6 +12464,14 @@
12238 12464
           "Npgsql.EntityFrameworkCore.PostgreSQL": {
12239 12465
             "target": "Package",
12240 12466
             "version": "[2.2.0, )"
12467
+          },
12468
+          "System.Data.SQLite": {
12469
+            "target": "Package",
12470
+            "version": "[1.0.113.1, )"
12471
+          },
12472
+          "System.Drawing.Common": {
12473
+            "target": "Package",
12474
+            "version": "[4.7.0, )"
12241 12475
           }
12242 12476
         },
12243 12477
         "imports": [

+ 6
- 2
ProRestaurant/obj/project.nuget.cache 查看文件

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "version": 2,
3
-  "dgSpecHash": "UKkCi2QfTZjSh7Mo0X5a3rAzjsBDnMmv390wbgjtgsJjh822kapoCSoPoj2ogBN40mGlTEqkNrv/q6FLyQUZhw==",
3
+  "dgSpecHash": "0J0rJ7jz4g1WAA6fvo+sC4zFuEM3V67QHc0Kx7Nyy0ep9xx2FB8NdqxEERsAlbcOf71VJmnIpE5N39cE2x52ZA==",
4 4
   "success": true,
5 5
   "projectFilePath": "C:\\Work\\Development\\ProRestaurant\\RestaurantSite_API\\ProRestaurant\\ProRestaurant.csproj",
6 6
   "expectedPackageFiles": [
@@ -172,9 +172,10 @@
172 172
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnetapphost\\2.2.0\\microsoft.netcore.dotnetapphost.2.2.0.nupkg.sha512",
173 173
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnethostpolicy\\2.2.0\\microsoft.netcore.dotnethostpolicy.2.2.0.nupkg.sha512",
174 174
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnethostresolver\\2.2.0\\microsoft.netcore.dotnethostresolver.2.2.0.nupkg.sha512",
175
-    "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.platforms\\2.2.0\\microsoft.netcore.platforms.2.2.0.nupkg.sha512",
175
+    "C:\\Users\\georg\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512",
176 176
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\2.0.0\\microsoft.netcore.targets.2.0.0.nupkg.sha512",
177 177
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.win32.registry\\4.5.0\\microsoft.win32.registry.4.5.0.nupkg.sha512",
178
+    "C:\\Users\\georg\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512",
178 179
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\netstandard.library\\2.0.3\\netstandard.library.2.0.3.nupkg.sha512",
179 180
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\newtonsoft.json\\11.0.2\\newtonsoft.json.11.0.2.nupkg.sha512",
180 181
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\newtonsoft.json.bson\\1.0.1\\newtonsoft.json.bson.1.0.1.nupkg.sha512",
@@ -211,6 +212,8 @@
211 212
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.componentmodel.annotations\\4.5.0\\system.componentmodel.annotations.4.5.0.nupkg.sha512",
212 213
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.console\\4.3.0\\system.console.4.3.0.nupkg.sha512",
213 214
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.data.sqlclient\\4.6.0\\system.data.sqlclient.4.6.0.nupkg.sha512",
215
+    "C:\\Users\\georg\\.nuget\\packages\\system.data.sqlite\\1.0.113.1\\system.data.sqlite.1.0.113.1.nupkg.sha512",
216
+    "C:\\Users\\georg\\.nuget\\packages\\system.data.sqlite.core\\1.0.113.1\\system.data.sqlite.core.1.0.113.1.nupkg.sha512",
214 217
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.contracts\\4.3.0\\system.diagnostics.contracts.4.3.0.nupkg.sha512",
215 218
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
216 219
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.diagnosticsource\\4.5.0\\system.diagnostics.diagnosticsource.4.5.0.nupkg.sha512",
@@ -218,6 +221,7 @@
218 221
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.stacktrace\\4.3.0\\system.diagnostics.stacktrace.4.3.0.nupkg.sha512",
219 222
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.tools\\4.3.0\\system.diagnostics.tools.4.3.0.nupkg.sha512",
220 223
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512",
224
+    "C:\\Users\\georg\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512",
221 225
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.dynamic.runtime\\4.3.0\\system.dynamic.runtime.4.3.0.nupkg.sha512",
222 226
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
223 227
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization.calendars\\4.3.0\\system.globalization.calendars.4.3.0.nupkg.sha512",

Loading…
取消
儲存