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.

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