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.

20200608113150_001.Designer.cs 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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("20200608113150_001")]
  13. partial class _001
  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>("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<decimal>("Price");
  121. b.Property<int>("RestaurantId");
  122. b.HasKey("Id");
  123. b.HasIndex("RestaurantId");
  124. b.ToTable("MenuItems");
  125. });
  126. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  127. {
  128. b.Property<int>("Id")
  129. .ValueGeneratedOnAdd()
  130. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  131. b.Property<bool>("Chain");
  132. b.Property<string>("City");
  133. b.Property<string>("Country");
  134. b.Property<DateTime>("Created");
  135. b.Property<decimal>("DeliveryFee");
  136. b.Property<decimal>("DeliveryRadius");
  137. b.Property<string>("GoogleMapUrl");
  138. b.Property<bool>("IsDeleted");
  139. b.Property<decimal>("Latitude");
  140. b.Property<string>("Logo");
  141. b.Property<decimal>("Longitude");
  142. b.Property<string>("MethodsOfPayment");
  143. b.Property<DateTime>("Modified");
  144. b.Property<string>("ModifiedBy");
  145. b.Property<string>("Name");
  146. b.Property<string>("PostalCode");
  147. b.Property<string>("Provice");
  148. b.Property<string>("ShopNumber");
  149. b.Property<string>("ShoppingCentre");
  150. b.Property<string>("StreetName");
  151. b.Property<string>("StreetNumber");
  152. b.Property<string>("Suburb");
  153. b.HasKey("Id");
  154. b.ToTable("Restaurants");
  155. });
  156. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  157. {
  158. b.Property<int>("Id")
  159. .ValueGeneratedOnAdd()
  160. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  161. b.Property<DateTime>("Created");
  162. b.Property<bool>("IsDeleted");
  163. b.Property<DateTime>("Modified");
  164. b.Property<string>("ModifiedBy");
  165. b.Property<int>("RestaurantId");
  166. b.Property<int>("UserId");
  167. b.HasKey("Id");
  168. b.HasIndex("RestaurantId");
  169. b.HasIndex("UserId");
  170. b.ToTable("RestaurantUsers");
  171. });
  172. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  173. {
  174. b.Property<int>("Id")
  175. .ValueGeneratedOnAdd()
  176. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  177. b.Property<bool>("Closed");
  178. b.Property<DateTime>("ClosingTime");
  179. b.Property<DateTime>("Created");
  180. b.Property<string>("Description");
  181. b.Property<bool>("IsDeleted");
  182. b.Property<DateTime>("Modified");
  183. b.Property<string>("ModifiedBy");
  184. b.Property<bool>("Opened24H");
  185. b.Property<DateTime>("OpeningTime");
  186. b.Property<int>("RestaurantId");
  187. b.HasKey("Id");
  188. b.HasIndex("RestaurantId");
  189. b.ToTable("TradingHours");
  190. });
  191. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  192. {
  193. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  194. .WithOne("DriverDetails")
  195. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  196. .OnDelete(DeleteBehavior.Cascade);
  197. });
  198. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  199. {
  200. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  201. .WithMany("Addresses")
  202. .HasForeignKey("UserId")
  203. .OnDelete(DeleteBehavior.Cascade);
  204. });
  205. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  206. {
  207. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  208. .WithMany()
  209. .HasForeignKey("RestaurantId")
  210. .OnDelete(DeleteBehavior.Cascade);
  211. });
  212. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  213. {
  214. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  215. .WithMany()
  216. .HasForeignKey("RestaurantId")
  217. .OnDelete(DeleteBehavior.Cascade);
  218. });
  219. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  220. {
  221. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  222. .WithMany("Users")
  223. .HasForeignKey("RestaurantId")
  224. .OnDelete(DeleteBehavior.Cascade);
  225. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  226. .WithMany()
  227. .HasForeignKey("UserId")
  228. .OnDelete(DeleteBehavior.Cascade);
  229. });
  230. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  231. {
  232. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  233. .WithMany("TradingHours")
  234. .HasForeignKey("RestaurantId")
  235. .OnDelete(DeleteBehavior.Cascade);
  236. });
  237. #pragma warning restore 612, 618
  238. }
  239. }
  240. }