Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

DBContextModelSnapshot.cs 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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<bool>("ChangePassword");
  44. b.Property<DateTime>("Created");
  45. b.Property<string>("EmailAddress");
  46. b.Property<string>("FirstName");
  47. b.Property<bool>("IsDeleted");
  48. b.Property<DateTime>("Modified");
  49. b.Property<string>("ModifiedBy");
  50. b.Property<string>("Password");
  51. b.Property<string>("Surname");
  52. b.Property<int>("SystemRole");
  53. b.HasKey("Id");
  54. b.ToTable("Users");
  55. });
  56. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  57. {
  58. b.Property<int>("Id")
  59. .ValueGeneratedOnAdd()
  60. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  61. b.Property<string>("City");
  62. b.Property<string>("ComplexName");
  63. b.Property<string>("Country");
  64. b.Property<DateTime>("Created");
  65. b.Property<string>("GoogleMapUrl");
  66. b.Property<bool>("IsComplex");
  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>("Province");
  75. b.Property<string>("StreetName");
  76. b.Property<string>("StreetNumber");
  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<string>("Name");
  122. b.Property<bool>("OutOfStock");
  123. b.Property<bool>("OverrideOptions");
  124. b.Property<decimal>("Price");
  125. b.Property<int>("RestaurantId");
  126. b.HasKey("Id");
  127. b.HasIndex("RestaurantId");
  128. b.ToTable("MenuItems");
  129. });
  130. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  131. {
  132. b.Property<int>("Id")
  133. .ValueGeneratedOnAdd()
  134. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  135. b.Property<int>("CategoryId");
  136. b.Property<DateTime>("Created");
  137. b.Property<string>("Description");
  138. b.Property<bool>("IsBasePrice");
  139. b.Property<bool>("IsDeleted");
  140. b.Property<int?>("MenuCategoryId");
  141. b.Property<int>("MenuItemId");
  142. b.Property<DateTime>("Modified");
  143. b.Property<string>("ModifiedBy");
  144. b.Property<int>("OptionLimit");
  145. b.Property<int>("OptionType");
  146. b.Property<int>("Rank");
  147. b.Property<int>("RestaurantId");
  148. b.HasKey("Id");
  149. b.HasIndex("MenuCategoryId");
  150. b.HasIndex("RestaurantId");
  151. b.ToTable("MenuOptions");
  152. });
  153. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  154. {
  155. b.Property<int>("Id")
  156. .ValueGeneratedOnAdd()
  157. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  158. b.Property<DateTime>("Created");
  159. b.Property<string>("Description");
  160. b.Property<bool>("IsDeleted");
  161. b.Property<int?>("MenuOptionId");
  162. b.Property<DateTime>("Modified");
  163. b.Property<string>("ModifiedBy");
  164. b.Property<decimal>("Price");
  165. b.Property<int>("Rank");
  166. b.HasKey("Id");
  167. b.HasIndex("MenuOptionId");
  168. b.ToTable("MenuOptionItems");
  169. });
  170. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  171. {
  172. b.Property<int>("Id")
  173. .ValueGeneratedOnAdd()
  174. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  175. b.Property<string>("Categories");
  176. b.Property<string>("City");
  177. b.Property<string>("Country");
  178. b.Property<DateTime>("Created");
  179. b.Property<decimal>("DeliveryFee");
  180. b.Property<decimal>("DeliveryRadius");
  181. b.Property<string>("DeliveryTime");
  182. b.Property<string>("GoogleMapUrl");
  183. b.Property<bool>("IsDeleted");
  184. b.Property<decimal>("Latitude");
  185. b.Property<string>("Logo");
  186. b.Property<decimal>("Longitude");
  187. b.Property<string>("MethodsOfPayment");
  188. b.Property<DateTime>("Modified");
  189. b.Property<string>("ModifiedBy");
  190. b.Property<string>("Name");
  191. b.Property<string>("PostalCode");
  192. b.Property<string>("Province");
  193. b.Property<string>("ShopNumber");
  194. b.Property<string>("ShoppingCentre");
  195. b.Property<string>("StreetName");
  196. b.Property<string>("StreetNumber");
  197. b.Property<string>("Suburb");
  198. b.HasKey("Id");
  199. b.ToTable("Restaurants");
  200. });
  201. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
  202. {
  203. b.Property<int>("Id")
  204. .ValueGeneratedOnAdd()
  205. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  206. b.Property<string>("Description");
  207. b.Property<string>("Image");
  208. b.HasKey("Id");
  209. b.ToTable("RestaurantCategories");
  210. });
  211. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRole", b =>
  212. {
  213. b.Property<int>("Id")
  214. .ValueGeneratedOnAdd()
  215. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  216. b.Property<DateTime>("Created");
  217. b.Property<bool>("IsDeleted");
  218. b.Property<DateTime>("Modified");
  219. b.Property<string>("ModifiedBy");
  220. b.Property<int>("RestaurantId");
  221. b.Property<string>("RoleName");
  222. b.HasKey("Id");
  223. b.HasIndex("RestaurantId");
  224. b.ToTable("RestaurantRoles");
  225. });
  226. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRolePremission", b =>
  227. {
  228. b.Property<int>("Id")
  229. .ValueGeneratedOnAdd()
  230. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  231. b.Property<bool>("Create");
  232. b.Property<DateTime>("Created");
  233. b.Property<bool>("Delete");
  234. b.Property<bool>("IsDeleted");
  235. b.Property<DateTime>("Modified");
  236. b.Property<string>("ModifiedBy");
  237. b.Property<bool>("Navigate");
  238. b.Property<bool>("Read");
  239. b.Property<int>("RoleId");
  240. b.Property<string>("Target");
  241. b.Property<bool>("Write");
  242. b.HasKey("Id");
  243. b.HasIndex("RoleId");
  244. b.ToTable("RestaurantRolePremissions");
  245. });
  246. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  247. {
  248. b.Property<int>("Id")
  249. .ValueGeneratedOnAdd()
  250. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  251. b.Property<DateTime>("Created");
  252. b.Property<bool>("IsDeleted");
  253. b.Property<DateTime>("Modified");
  254. b.Property<string>("ModifiedBy");
  255. b.Property<int>("RestaurantId");
  256. b.Property<int>("UserId");
  257. b.HasKey("Id");
  258. b.HasIndex("RestaurantId");
  259. b.HasIndex("UserId");
  260. b.ToTable("RestaurantUsers");
  261. });
  262. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUserRestaurantRole", b =>
  263. {
  264. b.Property<int>("Id")
  265. .ValueGeneratedOnAdd()
  266. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  267. b.Property<DateTime>("Created");
  268. b.Property<bool>("IsDeleted");
  269. b.Property<DateTime>("Modified");
  270. b.Property<string>("ModifiedBy");
  271. b.Property<int?>("RestaurantRoleId");
  272. b.Property<int?>("UserId");
  273. b.HasKey("Id");
  274. b.ToTable("RestaurantUserRestaurantRoles");
  275. });
  276. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  277. {
  278. b.Property<int>("Id")
  279. .ValueGeneratedOnAdd()
  280. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  281. b.Property<bool>("Closed");
  282. b.Property<DateTime>("ClosingTime");
  283. b.Property<DateTime>("Created");
  284. b.Property<string>("Description");
  285. b.Property<bool>("IsDeleted");
  286. b.Property<DateTime>("Modified");
  287. b.Property<string>("ModifiedBy");
  288. b.Property<bool>("Opened24H");
  289. b.Property<DateTime>("OpeningTime");
  290. b.Property<int>("RestaurantId");
  291. b.HasKey("Id");
  292. b.HasIndex("RestaurantId");
  293. b.ToTable("TradingHours");
  294. });
  295. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  296. {
  297. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  298. .WithOne("DriverDetails")
  299. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  300. .OnDelete(DeleteBehavior.Cascade);
  301. });
  302. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  303. {
  304. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  305. .WithMany("Addresses")
  306. .HasForeignKey("UserId")
  307. .OnDelete(DeleteBehavior.Cascade);
  308. });
  309. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  310. {
  311. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  312. .WithMany()
  313. .HasForeignKey("RestaurantId")
  314. .OnDelete(DeleteBehavior.Cascade);
  315. });
  316. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  317. {
  318. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  319. .WithMany()
  320. .HasForeignKey("RestaurantId")
  321. .OnDelete(DeleteBehavior.Cascade);
  322. });
  323. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOption", b =>
  324. {
  325. b.HasOne("ProRestaurant.Models.Restaurants.MenuCategory")
  326. .WithMany("Options")
  327. .HasForeignKey("MenuCategoryId");
  328. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  329. .WithMany()
  330. .HasForeignKey("RestaurantId")
  331. .OnDelete(DeleteBehavior.Cascade);
  332. });
  333. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuOptionItem", b =>
  334. {
  335. b.HasOne("ProRestaurant.Models.Restaurants.MenuOption", "MenuOption")
  336. .WithMany("Options")
  337. .HasForeignKey("MenuOptionId");
  338. });
  339. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRole", b =>
  340. {
  341. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  342. .WithMany()
  343. .HasForeignKey("RestaurantId")
  344. .OnDelete(DeleteBehavior.Cascade);
  345. });
  346. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantRolePremission", b =>
  347. {
  348. b.HasOne("ProRestaurant.Models.Restaurants.RestaurantRole", "Role")
  349. .WithMany("Permissions")
  350. .HasForeignKey("RoleId")
  351. .OnDelete(DeleteBehavior.Cascade);
  352. });
  353. modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
  354. {
  355. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  356. .WithMany("Users")
  357. .HasForeignKey("RestaurantId")
  358. .OnDelete(DeleteBehavior.Cascade);
  359. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  360. .WithMany()
  361. .HasForeignKey("UserId")
  362. .OnDelete(DeleteBehavior.Cascade);
  363. });
  364. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  365. {
  366. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  367. .WithMany("TradingHours")
  368. .HasForeignKey("RestaurantId")
  369. .OnDelete(DeleteBehavior.Cascade);
  370. });
  371. #pragma warning restore 612, 618
  372. }
  373. }
  374. }