You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  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("20200728060700_colRename")]
  13. partial class colRename
  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<bool>("ChangePassword");
  46. b.Property<DateTime>("Created");
  47. b.Property<string>("EmailAddress");
  48. b.Property<string>("FirstName");
  49. b.Property<bool>("IsDeleted");
  50. b.Property<DateTime>("Modified");
  51. b.Property<string>("ModifiedBy");
  52. b.Property<string>("Password");
  53. b.Property<string>("Surname");
  54. b.Property<int>("SystemRole");
  55. b.HasKey("Id");
  56. b.ToTable("Users");
  57. });
  58. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  59. {
  60. b.Property<int>("Id")
  61. .ValueGeneratedOnAdd()
  62. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  63. b.Property<string>("City");
  64. b.Property<string>("ComplexName");
  65. b.Property<string>("Country");
  66. b.Property<DateTime>("Created");
  67. b.Property<string>("GoogleMapUrl");
  68. b.Property<bool>("IsComplex");
  69. b.Property<bool>("IsDefault");
  70. b.Property<bool>("IsDeleted");
  71. b.Property<decimal>("Latitude");
  72. b.Property<decimal>("Longitude");
  73. b.Property<DateTime>("Modified");
  74. b.Property<string>("ModifiedBy");
  75. b.Property<string>("PostalCode");
  76. b.Property<string>("Province");
  77. b.Property<string>("StreetName");
  78. b.Property<string>("StreetNumber");
  79. b.Property<string>("Suburb");
  80. b.Property<string>("UnitNumber");
  81. b.Property<int>("UserId");
  82. b.HasKey("Id");
  83. b.HasIndex("UserId");
  84. b.ToTable("UserAddresses");
  85. });
  86. modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
  87. {
  88. b.Property<int>("Id")
  89. .ValueGeneratedOnAdd()
  90. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  91. b.Property<string>("CategoryStore");
  92. b.Property<string>("ImageStore");
  93. b.HasKey("Id");
  94. b.ToTable("Locations");
  95. });
  96. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  97. {
  98. b.Property<int>("Id")
  99. .ValueGeneratedOnAdd()
  100. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  101. b.Property<DateTime>("Created");
  102. b.Property<string>("Description");
  103. b.Property<bool>("IsDeleted");
  104. b.Property<DateTime>("Modified");
  105. b.Property<string>("ModifiedBy");
  106. b.Property<int>("RestaurantId");
  107. b.HasKey("Id");
  108. b.HasIndex("RestaurantId");
  109. b.ToTable("MenuCategories");
  110. });
  111. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  112. {
  113. b.Property<int>("Id")
  114. .ValueGeneratedOnAdd()
  115. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  116. b.Property<int>("CategoryId");
  117. b.Property<DateTime>("Created");
  118. b.Property<string>("Description");
  119. b.Property<string>("Image");
  120. b.Property<bool>("IsDeleted");
  121. b.Property<DateTime>("Modified");
  122. b.Property<string>("ModifiedBy");
  123. b.Property<string>("Name");
  124. b.Property<bool>("OutOfStock");
  125. b.Property<bool>("OverrideOptions");
  126. b.Property<decimal>("Price");
  127. b.Property<int>("RestaurantId");
  128. b.HasKey("Id");
  129. b.HasIndex("RestaurantId");
  130. b.ToTable("MenuItems");
  131. });
  132. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  133. {
  134. b.Property<int>("Id")
  135. .ValueGeneratedOnAdd()
  136. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  137. b.Property<int>("CategoryId");
  138. b.Property<DateTime>("Created");
  139. b.Property<string>("Description");
  140. b.Property<bool>("IsBasePrice");
  141. b.Property<bool>("IsDeleted");
  142. b.Property<int?>("MenuCategoryId");
  143. b.Property<int>("MenuItemId");
  144. b.Property<DateTime>("Modified");
  145. b.Property<string>("ModifiedBy");
  146. b.Property<int>("OptionLimit");
  147. b.Property<int>("OptionType");
  148. b.Property<int>("Rank");
  149. b.Property<int>("RestaurantId");
  150. b.HasKey("Id");
  151. b.HasIndex("MenuCategoryId");
  152. b.HasIndex("RestaurantId");
  153. b.ToTable("MenuOptions");
  154. });
  155. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  156. {
  157. b.Property<int>("Id")
  158. .ValueGeneratedOnAdd()
  159. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  160. b.Property<DateTime>("Created");
  161. b.Property<string>("Description");
  162. b.Property<bool>("IsDeleted");
  163. b.Property<int?>("MenuOptionId");
  164. b.Property<DateTime>("Modified");
  165. b.Property<string>("ModifiedBy");
  166. b.Property<decimal>("Price");
  167. b.Property<int>("Rank");
  168. b.HasKey("Id");
  169. b.HasIndex("MenuOptionId");
  170. b.ToTable("MenuOptionItems");
  171. });
  172. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  173. {
  174. b.Property<int>("Id")
  175. .ValueGeneratedOnAdd()
  176. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  177. b.Property<string>("Categories");
  178. b.Property<string>("City");
  179. b.Property<string>("Country");
  180. b.Property<DateTime>("Created");
  181. b.Property<decimal>("DeliveryFee");
  182. b.Property<decimal>("DeliveryRadius");
  183. b.Property<string>("DeliveryTime");
  184. b.Property<string>("GoogleMapUrl");
  185. b.Property<bool>("IsDeleted");
  186. b.Property<decimal>("Latitude");
  187. b.Property<string>("Logo");
  188. b.Property<decimal>("Longitude");
  189. b.Property<string>("MethodsOfPayment");
  190. b.Property<DateTime>("Modified");
  191. b.Property<string>("ModifiedBy");
  192. b.Property<string>("Name");
  193. b.Property<string>("PostalCode");
  194. b.Property<string>("Province");
  195. b.Property<string>("ShopNumber");
  196. b.Property<string>("ShoppingCentre");
  197. b.Property<string>("StreetName");
  198. b.Property<string>("StreetNumber");
  199. b.Property<string>("Suburb");
  200. b.HasKey("Id");
  201. b.ToTable("Restaurants");
  202. });
  203. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
  204. {
  205. b.Property<int>("Id")
  206. .ValueGeneratedOnAdd()
  207. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  208. b.Property<string>("Description");
  209. b.Property<string>("Image");
  210. b.HasKey("Id");
  211. b.ToTable("RestaurantCategories");
  212. });
  213. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRole", b =>
  214. {
  215. b.Property<int>("Id")
  216. .ValueGeneratedOnAdd()
  217. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  218. b.Property<DateTime>("Created");
  219. b.Property<bool>("IsDeleted");
  220. b.Property<DateTime>("Modified");
  221. b.Property<string>("ModifiedBy");
  222. b.Property<int>("RestaurantId");
  223. b.Property<string>("RoleName");
  224. b.HasKey("Id");
  225. b.HasIndex("RestaurantId");
  226. b.ToTable("RestaurantRoles");
  227. });
  228. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRolePremission", b =>
  229. {
  230. b.Property<int>("Id")
  231. .ValueGeneratedOnAdd()
  232. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  233. b.Property<bool>("Create");
  234. b.Property<DateTime>("Created");
  235. b.Property<bool>("Delete");
  236. b.Property<bool>("IsDeleted");
  237. b.Property<DateTime>("Modified");
  238. b.Property<string>("ModifiedBy");
  239. b.Property<bool>("Navigate");
  240. b.Property<bool>("Read");
  241. b.Property<int>("RoleId");
  242. b.Property<string>("Target");
  243. b.Property<bool>("Write");
  244. b.HasKey("Id");
  245. b.HasIndex("RoleId");
  246. b.ToTable("RestaurantRolePremissions");
  247. });
  248. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  249. {
  250. b.Property<int>("Id")
  251. .ValueGeneratedOnAdd()
  252. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  253. b.Property<DateTime>("Created");
  254. b.Property<bool>("IsDeleted");
  255. b.Property<DateTime>("Modified");
  256. b.Property<string>("ModifiedBy");
  257. b.Property<int>("RestaurantId");
  258. b.Property<int>("UserId");
  259. b.HasKey("Id");
  260. b.HasIndex("RestaurantId");
  261. b.HasIndex("UserId");
  262. b.ToTable("RestaurantUsers");
  263. });
  264. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUserRestaurantRole", b =>
  265. {
  266. b.Property<int>("Id")
  267. .ValueGeneratedOnAdd()
  268. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  269. b.Property<DateTime>("Created");
  270. b.Property<bool>("IsDeleted");
  271. b.Property<DateTime>("Modified");
  272. b.Property<string>("ModifiedBy");
  273. b.Property<int?>("RestaurantRoleId");
  274. b.Property<int?>("UserId");
  275. b.HasKey("Id");
  276. b.ToTable("RestaurantUserRestaurantRoles");
  277. });
  278. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  279. {
  280. b.Property<int>("Id")
  281. .ValueGeneratedOnAdd()
  282. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  283. b.Property<bool>("Closed");
  284. b.Property<DateTime>("ClosingTime");
  285. b.Property<DateTime>("Created");
  286. b.Property<string>("Description");
  287. b.Property<bool>("IsDeleted");
  288. b.Property<DateTime>("Modified");
  289. b.Property<string>("ModifiedBy");
  290. b.Property<bool>("Opened24H");
  291. b.Property<DateTime>("OpeningTime");
  292. b.Property<int>("RestaurantId");
  293. b.HasKey("Id");
  294. b.HasIndex("RestaurantId");
  295. b.ToTable("TradingHours");
  296. });
  297. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  298. {
  299. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  300. .WithOne("DriverDetails")
  301. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  302. .OnDelete(DeleteBehavior.Cascade);
  303. });
  304. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  305. {
  306. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  307. .WithMany("Addresses")
  308. .HasForeignKey("UserId")
  309. .OnDelete(DeleteBehavior.Cascade);
  310. });
  311. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  312. {
  313. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  314. .WithMany()
  315. .HasForeignKey("RestaurantId")
  316. .OnDelete(DeleteBehavior.Cascade);
  317. });
  318. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  319. {
  320. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  321. .WithMany()
  322. .HasForeignKey("RestaurantId")
  323. .OnDelete(DeleteBehavior.Cascade);
  324. });
  325. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  326. {
  327. b.HasOne("ProRestaurant.Models.Restaurants.MenuCategory")
  328. .WithMany("Options")
  329. .HasForeignKey("MenuCategoryId");
  330. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  331. .WithMany()
  332. .HasForeignKey("RestaurantId")
  333. .OnDelete(DeleteBehavior.Cascade);
  334. });
  335. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  336. {
  337. b.HasOne("ProRestaurant.Models.Restaurants.MenuOption", "MenuOption")
  338. .WithMany("Options")
  339. .HasForeignKey("MenuOptionId");
  340. });
  341. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRole", b =>
  342. {
  343. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  344. .WithMany()
  345. .HasForeignKey("RestaurantId")
  346. .OnDelete(DeleteBehavior.Cascade);
  347. });
  348. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRolePremission", b =>
  349. {
  350. b.HasOne("ProRestaurant.Models.Restaurants.RestaurantRole", "Role")
  351. .WithMany("Permissions")
  352. .HasForeignKey("RoleId")
  353. .OnDelete(DeleteBehavior.Cascade);
  354. });
  355. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  356. {
  357. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  358. .WithMany("Users")
  359. .HasForeignKey("RestaurantId")
  360. .OnDelete(DeleteBehavior.Cascade);
  361. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  362. .WithMany()
  363. .HasForeignKey("UserId")
  364. .OnDelete(DeleteBehavior.Cascade);
  365. });
  366. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  367. {
  368. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  369. .WithMany("TradingHours")
  370. .HasForeignKey("RestaurantId")
  371. .OnDelete(DeleteBehavior.Cascade);
  372. });
  373. #pragma warning restore 612, 618
  374. }
  375. }
  376. }