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

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