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.

20200609191325_004.Designer.cs 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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("20200609191325_004")]
  13. partial class _004
  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>("IsDefault");
  68. b.Property<bool>("IsDeleted");
  69. b.Property<decimal>("Latitude");
  70. b.Property<decimal>("Longitude");
  71. b.Property<DateTime>("Modified");
  72. b.Property<string>("ModifiedBy");
  73. b.Property<string>("PostalCode");
  74. b.Property<string>("Provice");
  75. b.Property<string>("SteetNumber");
  76. b.Property<string>("StreetName");
  77. b.Property<string>("Suburb");
  78. b.Property<string>("UnitNumber");
  79. b.Property<int>("UserId");
  80. b.HasKey("Id");
  81. b.HasIndex("UserId");
  82. b.ToTable("UserAddresses");
  83. });
  84. modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
  85. {
  86. b.Property<int>("Id")
  87. .ValueGeneratedOnAdd()
  88. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  89. b.Property<string>("CategoryStore");
  90. b.Property<string>("ImageStore");
  91. b.HasKey("Id");
  92. b.ToTable("Locations");
  93. });
  94. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  95. {
  96. b.Property<int>("Id")
  97. .ValueGeneratedOnAdd()
  98. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  99. b.Property<DateTime>("Created");
  100. b.Property<string>("Description");
  101. b.Property<bool>("IsDeleted");
  102. b.Property<DateTime>("Modified");
  103. b.Property<string>("ModifiedBy");
  104. b.Property<int>("RestaurantId");
  105. b.HasKey("Id");
  106. b.HasIndex("RestaurantId");
  107. b.ToTable("MenuCategories");
  108. });
  109. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  110. {
  111. b.Property<int>("Id")
  112. .ValueGeneratedOnAdd()
  113. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  114. b.Property<int>("CategoryId");
  115. b.Property<DateTime>("Created");
  116. b.Property<string>("Description");
  117. b.Property<string>("Image");
  118. b.Property<bool>("IsDeleted");
  119. b.Property<DateTime>("Modified");
  120. b.Property<string>("ModifiedBy");
  121. b.Property<decimal>("Price");
  122. b.Property<int>("RestaurantId");
  123. b.HasKey("Id");
  124. b.HasIndex("RestaurantId");
  125. b.ToTable("MenuItems");
  126. });
  127. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  128. {
  129. b.Property<int>("Id")
  130. .ValueGeneratedOnAdd()
  131. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  132. b.Property<string>("Categories");
  133. b.Property<string>("City");
  134. b.Property<string>("Country");
  135. b.Property<DateTime>("Created");
  136. b.Property<decimal>("DeliveryFee");
  137. b.Property<decimal>("DeliveryRadius");
  138. b.Property<string>("DeliveryTime");
  139. b.Property<string>("GoogleMapUrl");
  140. b.Property<bool>("IsDeleted");
  141. b.Property<decimal>("Latitude");
  142. b.Property<string>("Logo");
  143. b.Property<decimal>("Longitude");
  144. b.Property<string>("MethodsOfPayment");
  145. b.Property<DateTime>("Modified");
  146. b.Property<string>("ModifiedBy");
  147. b.Property<string>("Name");
  148. b.Property<string>("PostalCode");
  149. b.Property<string>("Provice");
  150. b.Property<string>("ShopNumber");
  151. b.Property<string>("ShoppingCentre");
  152. b.Property<string>("StreetName");
  153. b.Property<string>("StreetNumber");
  154. b.Property<string>("Suburb");
  155. b.HasKey("Id");
  156. b.ToTable("Restaurants");
  157. });
  158. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
  159. {
  160. b.Property<int>("Id")
  161. .ValueGeneratedOnAdd()
  162. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  163. b.Property<string>("Description");
  164. b.Property<string>("Image");
  165. b.HasKey("Id");
  166. b.ToTable("RestaurantCategories");
  167. });
  168. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  169. {
  170. b.Property<int>("Id")
  171. .ValueGeneratedOnAdd()
  172. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  173. b.Property<DateTime>("Created");
  174. b.Property<bool>("IsDeleted");
  175. b.Property<DateTime>("Modified");
  176. b.Property<string>("ModifiedBy");
  177. b.Property<int>("RestaurantId");
  178. b.Property<int>("UserId");
  179. b.HasKey("Id");
  180. b.HasIndex("RestaurantId");
  181. b.HasIndex("UserId");
  182. b.ToTable("RestaurantUsers");
  183. });
  184. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  185. {
  186. b.Property<int>("Id")
  187. .ValueGeneratedOnAdd()
  188. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  189. b.Property<bool>("Closed");
  190. b.Property<DateTime>("ClosingTime");
  191. b.Property<DateTime>("Created");
  192. b.Property<string>("Description");
  193. b.Property<bool>("IsDeleted");
  194. b.Property<DateTime>("Modified");
  195. b.Property<string>("ModifiedBy");
  196. b.Property<bool>("Opened24H");
  197. b.Property<DateTime>("OpeningTime");
  198. b.Property<int>("RestaurantId");
  199. b.HasKey("Id");
  200. b.HasIndex("RestaurantId");
  201. b.ToTable("TradingHours");
  202. });
  203. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  204. {
  205. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  206. .WithOne("DriverDetails")
  207. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  208. .OnDelete(DeleteBehavior.Cascade);
  209. });
  210. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  211. {
  212. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  213. .WithMany("Addresses")
  214. .HasForeignKey("UserId")
  215. .OnDelete(DeleteBehavior.Cascade);
  216. });
  217. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  218. {
  219. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  220. .WithMany()
  221. .HasForeignKey("RestaurantId")
  222. .OnDelete(DeleteBehavior.Cascade);
  223. });
  224. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  225. {
  226. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  227. .WithMany()
  228. .HasForeignKey("RestaurantId")
  229. .OnDelete(DeleteBehavior.Cascade);
  230. });
  231. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  232. {
  233. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  234. .WithMany("Users")
  235. .HasForeignKey("RestaurantId")
  236. .OnDelete(DeleteBehavior.Cascade);
  237. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  238. .WithMany()
  239. .HasForeignKey("UserId")
  240. .OnDelete(DeleteBehavior.Cascade);
  241. });
  242. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  243. {
  244. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  245. .WithMany("TradingHours")
  246. .HasForeignKey("RestaurantId")
  247. .OnDelete(DeleteBehavior.Cascade);
  248. });
  249. #pragma warning restore 612, 618
  250. }
  251. }
  252. }