Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

20200630140752_Recreate Database.Designer.cs 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  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. namespace ProRestaurant.Migrations
  10. {
  11. [DbContext(typeof(DBContext))]
  12. [Migration("20200630140752_Recreate Database")]
  13. partial class RecreateDatabase
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
  20. .HasAnnotation("Relational:MaxIdentifierLength", 128)
  21. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  22. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  23. {
  24. b.Property<int>("Id")
  25. .ValueGeneratedOnAdd()
  26. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  27. b.Property<DateTime>("Created");
  28. b.Property<bool>("IsDeleted");
  29. b.Property<DateTime>("Modified");
  30. b.Property<string>("ModifiedBy");
  31. b.Property<string>("Photo");
  32. b.Property<string>("RegistrationNumber");
  33. b.Property<int>("UserId");
  34. b.HasKey("Id");
  35. b.HasIndex("UserId")
  36. .IsUnique();
  37. b.ToTable("DriverDetails");
  38. });
  39. modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
  40. {
  41. b.Property<int>("Id")
  42. .ValueGeneratedOnAdd()
  43. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  44. b.Property<string>("Cellphone");
  45. b.Property<DateTime>("Created");
  46. b.Property<string>("EmailAddress");
  47. b.Property<string>("FirstName");
  48. b.Property<bool>("IsDeleted");
  49. b.Property<DateTime>("Modified");
  50. b.Property<string>("ModifiedBy");
  51. b.Property<string>("Password");
  52. b.Property<string>("Surname");
  53. b.Property<int>("SystemRole");
  54. b.HasKey("Id");
  55. b.ToTable("Users");
  56. });
  57. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  58. {
  59. b.Property<int>("Id")
  60. .ValueGeneratedOnAdd()
  61. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  62. b.Property<string>("City");
  63. b.Property<string>("ComplexName");
  64. b.Property<string>("Country");
  65. b.Property<DateTime>("Created");
  66. b.Property<string>("GoogleMapUrl");
  67. b.Property<bool>("IsComplex");
  68. b.Property<bool>("IsDefault");
  69. b.Property<bool>("IsDeleted");
  70. b.Property<decimal>("Latitude");
  71. b.Property<decimal>("Longitude");
  72. b.Property<DateTime>("Modified");
  73. b.Property<string>("ModifiedBy");
  74. b.Property<string>("PostalCode");
  75. b.Property<string>("Province");
  76. b.Property<string>("StreetName");
  77. b.Property<string>("StreetNumber");
  78. b.Property<string>("Suburb");
  79. b.Property<string>("UnitNumber");
  80. b.Property<int>("UserId");
  81. b.HasKey("Id");
  82. b.HasIndex("UserId");
  83. b.ToTable("UserAddresses");
  84. });
  85. modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
  86. {
  87. b.Property<int>("Id")
  88. .ValueGeneratedOnAdd()
  89. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  90. b.Property<string>("CategoryStore");
  91. b.Property<string>("ImageStore");
  92. b.HasKey("Id");
  93. b.ToTable("Locations");
  94. });
  95. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  96. {
  97. b.Property<int>("Id")
  98. .ValueGeneratedOnAdd()
  99. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  100. b.Property<DateTime>("Created");
  101. b.Property<string>("Description");
  102. b.Property<bool>("IsDeleted");
  103. b.Property<DateTime>("Modified");
  104. b.Property<string>("ModifiedBy");
  105. b.Property<int>("RestaurantId");
  106. b.HasKey("Id");
  107. b.HasIndex("RestaurantId");
  108. b.ToTable("MenuCategories");
  109. });
  110. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  111. {
  112. b.Property<int>("Id")
  113. .ValueGeneratedOnAdd()
  114. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  115. b.Property<int>("CategoryId");
  116. b.Property<DateTime>("Created");
  117. b.Property<string>("Description");
  118. b.Property<string>("Image");
  119. b.Property<bool>("IsDeleted");
  120. b.Property<DateTime>("Modified");
  121. b.Property<string>("ModifiedBy");
  122. b.Property<string>("Name");
  123. b.Property<decimal>("Price");
  124. b.Property<int>("RestaurantId");
  125. b.HasKey("Id");
  126. b.HasIndex("RestaurantId");
  127. b.ToTable("MenuItems");
  128. });
  129. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  130. {
  131. b.Property<int>("Id")
  132. .ValueGeneratedOnAdd()
  133. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  134. b.Property<int>("CategoryId");
  135. b.Property<DateTime>("Created");
  136. b.Property<string>("Description");
  137. b.Property<bool>("IsBasePrice");
  138. b.Property<bool>("IsDeleted");
  139. b.Property<int>("MenuItemId");
  140. b.Property<DateTime>("Modified");
  141. b.Property<string>("ModifiedBy");
  142. b.Property<int>("OptionLimit");
  143. b.Property<int>("OptionType");
  144. b.Property<int>("Rank");
  145. b.HasKey("Id");
  146. b.HasIndex("CategoryId");
  147. b.ToTable("MenuOptions");
  148. });
  149. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  150. {
  151. b.Property<int>("Id")
  152. .ValueGeneratedOnAdd()
  153. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  154. b.Property<DateTime>("Created");
  155. b.Property<string>("Description");
  156. b.Property<bool>("IsDeleted");
  157. b.Property<int?>("MenuOptionId");
  158. b.Property<DateTime>("Modified");
  159. b.Property<string>("ModifiedBy");
  160. b.Property<decimal>("Price");
  161. b.Property<int>("Rank");
  162. b.HasKey("Id");
  163. b.HasIndex("MenuOptionId");
  164. b.ToTable("MenuOptionItems");
  165. });
  166. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  167. {
  168. b.Property<int>("Id")
  169. .ValueGeneratedOnAdd()
  170. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  171. b.Property<string>("Categories");
  172. b.Property<string>("City");
  173. b.Property<string>("Country");
  174. b.Property<DateTime>("Created");
  175. b.Property<decimal>("DeliveryFee");
  176. b.Property<decimal>("DeliveryRadius");
  177. b.Property<string>("DeliveryTime");
  178. b.Property<string>("GoogleMapUrl");
  179. b.Property<bool>("IsDeleted");
  180. b.Property<decimal>("Latitude");
  181. b.Property<string>("Logo");
  182. b.Property<decimal>("Longitude");
  183. b.Property<string>("MethodsOfPayment");
  184. b.Property<DateTime>("Modified");
  185. b.Property<string>("ModifiedBy");
  186. b.Property<string>("Name");
  187. b.Property<string>("PostalCode");
  188. b.Property<string>("Provice");
  189. b.Property<string>("ShopNumber");
  190. b.Property<string>("ShoppingCentre");
  191. b.Property<string>("StreetName");
  192. b.Property<string>("StreetNumber");
  193. b.Property<string>("Suburb");
  194. b.HasKey("Id");
  195. b.ToTable("Restaurants");
  196. });
  197. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
  198. {
  199. b.Property<int>("Id")
  200. .ValueGeneratedOnAdd()
  201. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  202. b.Property<string>("Description");
  203. b.Property<string>("Image");
  204. b.HasKey("Id");
  205. b.ToTable("RestaurantCategories");
  206. });
  207. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  208. {
  209. b.Property<int>("Id")
  210. .ValueGeneratedOnAdd()
  211. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  212. b.Property<DateTime>("Created");
  213. b.Property<bool>("IsDeleted");
  214. b.Property<DateTime>("Modified");
  215. b.Property<string>("ModifiedBy");
  216. b.Property<int>("RestaurantId");
  217. b.Property<int>("UserId");
  218. b.HasKey("Id");
  219. b.HasIndex("RestaurantId");
  220. b.HasIndex("UserId");
  221. b.ToTable("RestaurantUsers");
  222. });
  223. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  224. {
  225. b.Property<int>("Id")
  226. .ValueGeneratedOnAdd()
  227. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  228. b.Property<bool>("Closed");
  229. b.Property<DateTime>("ClosingTime");
  230. b.Property<DateTime>("Created");
  231. b.Property<string>("Description");
  232. b.Property<bool>("IsDeleted");
  233. b.Property<DateTime>("Modified");
  234. b.Property<string>("ModifiedBy");
  235. b.Property<bool>("Opened24H");
  236. b.Property<DateTime>("OpeningTime");
  237. b.Property<int>("RestaurantId");
  238. b.HasKey("Id");
  239. b.HasIndex("RestaurantId");
  240. b.ToTable("TradingHours");
  241. });
  242. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  243. {
  244. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  245. .WithOne("DriverDetails")
  246. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  247. .OnDelete(DeleteBehavior.Cascade);
  248. });
  249. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  250. {
  251. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  252. .WithMany("Addresses")
  253. .HasForeignKey("UserId")
  254. .OnDelete(DeleteBehavior.Cascade);
  255. });
  256. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  257. {
  258. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  259. .WithMany()
  260. .HasForeignKey("RestaurantId")
  261. .OnDelete(DeleteBehavior.Cascade);
  262. });
  263. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  264. {
  265. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  266. .WithMany()
  267. .HasForeignKey("RestaurantId")
  268. .OnDelete(DeleteBehavior.Cascade);
  269. });
  270. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  271. {
  272. b.HasOne("ProRestaurant.Models.Restaurants.MenuCategory", "Category")
  273. .WithMany("Options")
  274. .HasForeignKey("CategoryId")
  275. .OnDelete(DeleteBehavior.Cascade);
  276. });
  277. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  278. {
  279. b.HasOne("ProRestaurant.Models.Restaurants.MenuOption", "MenuOption")
  280. .WithMany("Options")
  281. .HasForeignKey("MenuOptionId");
  282. });
  283. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  284. {
  285. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  286. .WithMany("Users")
  287. .HasForeignKey("RestaurantId")
  288. .OnDelete(DeleteBehavior.Cascade);
  289. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  290. .WithMany()
  291. .HasForeignKey("UserId")
  292. .OnDelete(DeleteBehavior.Cascade);
  293. });
  294. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  295. {
  296. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  297. .WithMany("TradingHours")
  298. .HasForeignKey("RestaurantId")
  299. .OnDelete(DeleteBehavior.Cascade);
  300. });
  301. #pragma warning restore 612, 618
  302. }
  303. }
  304. }