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.

DBContextModelSnapshot.cs 15KB

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