Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

20200703123907_MenuOption FK nullable to Category.Designer.cs 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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("20200703123907_MenuOption FK nullable to Category")]
  13. partial class MenuOptionFKnullabletoCategory
  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<bool>("OverrideOptions");
  124. b.Property<decimal>("Price");
  125. b.Property<int>("RestaurantId");
  126. b.HasKey("Id");
  127. b.HasIndex("RestaurantId");
  128. b.ToTable("MenuItems");
  129. });
  130. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  131. {
  132. b.Property<int>("Id")
  133. .ValueGeneratedOnAdd()
  134. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  135. b.Property<int?>("CategoryId");
  136. b.Property<DateTime>("Created");
  137. b.Property<string>("Description");
  138. b.Property<bool>("IsBasePrice");
  139. b.Property<bool>("IsDeleted");
  140. b.Property<int>("MenuItemId");
  141. b.Property<DateTime>("Modified");
  142. b.Property<string>("ModifiedBy");
  143. b.Property<int>("OptionLimit");
  144. b.Property<int>("OptionType");
  145. b.Property<int>("Rank");
  146. b.HasKey("Id");
  147. b.HasIndex("CategoryId");
  148. b.ToTable("MenuOptions");
  149. });
  150. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  151. {
  152. b.Property<int>("Id")
  153. .ValueGeneratedOnAdd()
  154. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  155. b.Property<DateTime>("Created");
  156. b.Property<string>("Description");
  157. b.Property<bool>("IsDeleted");
  158. b.Property<int?>("MenuOptionId");
  159. b.Property<DateTime>("Modified");
  160. b.Property<string>("ModifiedBy");
  161. b.Property<decimal>("Price");
  162. b.Property<int>("Rank");
  163. b.HasKey("Id");
  164. b.HasIndex("MenuOptionId");
  165. b.ToTable("MenuOptionItems");
  166. });
  167. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  168. {
  169. b.Property<int>("Id")
  170. .ValueGeneratedOnAdd()
  171. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  172. b.Property<string>("Categories");
  173. b.Property<string>("City");
  174. b.Property<string>("Country");
  175. b.Property<DateTime>("Created");
  176. b.Property<decimal>("DeliveryFee");
  177. b.Property<decimal>("DeliveryRadius");
  178. b.Property<string>("DeliveryTime");
  179. b.Property<string>("GoogleMapUrl");
  180. b.Property<bool>("IsDeleted");
  181. b.Property<decimal>("Latitude");
  182. b.Property<string>("Logo");
  183. b.Property<decimal>("Longitude");
  184. b.Property<string>("MethodsOfPayment");
  185. b.Property<DateTime>("Modified");
  186. b.Property<string>("ModifiedBy");
  187. b.Property<string>("Name");
  188. b.Property<string>("PostalCode");
  189. b.Property<string>("Province");
  190. b.Property<string>("ShopNumber");
  191. b.Property<string>("ShoppingCentre");
  192. b.Property<string>("StreetName");
  193. b.Property<string>("StreetNumber");
  194. b.Property<string>("Suburb");
  195. b.HasKey("Id");
  196. b.ToTable("Restaurants");
  197. });
  198. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
  199. {
  200. b.Property<int>("Id")
  201. .ValueGeneratedOnAdd()
  202. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  203. b.Property<string>("Description");
  204. b.Property<string>("Image");
  205. b.HasKey("Id");
  206. b.ToTable("RestaurantCategories");
  207. });
  208. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  209. {
  210. b.Property<int>("Id")
  211. .ValueGeneratedOnAdd()
  212. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  213. b.Property<DateTime>("Created");
  214. b.Property<bool>("IsDeleted");
  215. b.Property<DateTime>("Modified");
  216. b.Property<string>("ModifiedBy");
  217. b.Property<int>("RestaurantId");
  218. b.Property<int>("UserId");
  219. b.HasKey("Id");
  220. b.HasIndex("RestaurantId");
  221. b.HasIndex("UserId");
  222. b.ToTable("RestaurantUsers");
  223. });
  224. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  225. {
  226. b.Property<int>("Id")
  227. .ValueGeneratedOnAdd()
  228. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  229. b.Property<bool>("Closed");
  230. b.Property<DateTime>("ClosingTime");
  231. b.Property<DateTime>("Created");
  232. b.Property<string>("Description");
  233. b.Property<bool>("IsDeleted");
  234. b.Property<DateTime>("Modified");
  235. b.Property<string>("ModifiedBy");
  236. b.Property<bool>("Opened24H");
  237. b.Property<DateTime>("OpeningTime");
  238. b.Property<int>("RestaurantId");
  239. b.HasKey("Id");
  240. b.HasIndex("RestaurantId");
  241. b.ToTable("TradingHours");
  242. });
  243. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  244. {
  245. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  246. .WithOne("DriverDetails")
  247. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  248. .OnDelete(DeleteBehavior.Cascade);
  249. });
  250. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  251. {
  252. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  253. .WithMany("Addresses")
  254. .HasForeignKey("UserId")
  255. .OnDelete(DeleteBehavior.Cascade);
  256. });
  257. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  258. {
  259. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  260. .WithMany()
  261. .HasForeignKey("RestaurantId")
  262. .OnDelete(DeleteBehavior.Cascade);
  263. });
  264. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  265. {
  266. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  267. .WithMany()
  268. .HasForeignKey("RestaurantId")
  269. .OnDelete(DeleteBehavior.Cascade);
  270. });
  271. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  272. {
  273. b.HasOne("ProRestaurant.Models.Restaurants.MenuCategory", "Category")
  274. .WithMany("Options")
  275. .HasForeignKey("CategoryId");
  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. }