您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

20200526094220_initialCreate.Designer.cs 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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("20200526094220_initialCreate")]
  13. partial class initialCreate
  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.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<bool>("IsDeleted");
  66. b.Property<decimal>("Latitude");
  67. b.Property<decimal>("Longitude");
  68. b.Property<DateTime>("Modified");
  69. b.Property<string>("ModifiedBy");
  70. b.Property<string>("PostalCode");
  71. b.Property<string>("Provice");
  72. b.Property<string>("SteetNumber");
  73. b.Property<string>("StreetName");
  74. b.Property<string>("Suburb");
  75. b.Property<string>("UnitNumber");
  76. b.Property<int>("UserId");
  77. b.HasKey("Id");
  78. b.HasIndex("UserId");
  79. b.ToTable("UserAddresses");
  80. });
  81. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  82. {
  83. b.Property<int>("Id")
  84. .ValueGeneratedOnAdd()
  85. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  86. b.Property<DateTime>("Created");
  87. b.Property<string>("Description");
  88. b.Property<bool>("IsDeleted");
  89. b.Property<DateTime>("Modified");
  90. b.Property<string>("ModifiedBy");
  91. b.Property<int>("RestaurantId");
  92. b.HasKey("Id");
  93. b.HasIndex("RestaurantId");
  94. b.ToTable("MenuCategories");
  95. });
  96. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  97. {
  98. b.Property<int>("Id")
  99. .ValueGeneratedOnAdd()
  100. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  101. b.Property<int>("CategoryId");
  102. b.Property<DateTime>("Created");
  103. b.Property<string>("Description");
  104. b.Property<string>("Image");
  105. b.Property<bool>("IsDeleted");
  106. b.Property<DateTime>("Modified");
  107. b.Property<string>("ModifiedBy");
  108. b.Property<decimal>("Price");
  109. b.Property<int>("RestaurantId");
  110. b.HasKey("Id");
  111. b.HasIndex("RestaurantId");
  112. b.ToTable("MenuItems");
  113. });
  114. modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
  115. {
  116. b.Property<int>("Id")
  117. .ValueGeneratedOnAdd()
  118. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  119. b.Property<bool>("Chain");
  120. b.Property<DateTime>("Created");
  121. b.Property<decimal>("DeliveryFee");
  122. b.Property<decimal>("DeliveryRadius");
  123. b.Property<bool>("IsDeleted");
  124. b.Property<string>("Location");
  125. b.Property<string>("Logo");
  126. b.Property<string>("MethodsOfPayment");
  127. b.Property<DateTime>("Modified");
  128. b.Property<string>("ModifiedBy");
  129. b.Property<string>("Name");
  130. b.HasKey("Id");
  131. b.ToTable("Restaurants");
  132. });
  133. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  134. {
  135. b.Property<int>("Id")
  136. .ValueGeneratedOnAdd()
  137. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  138. b.Property<DateTime>("ClosingTime");
  139. b.Property<DateTime>("Created");
  140. b.Property<string>("Description");
  141. b.Property<bool>("IsDeleted");
  142. b.Property<DateTime>("Modified");
  143. b.Property<string>("ModifiedBy");
  144. b.Property<DateTime>("OpeningTime");
  145. b.Property<int>("RestaurantId");
  146. b.HasKey("Id");
  147. b.HasIndex("RestaurantId");
  148. b.ToTable("TradingHours");
  149. });
  150. modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
  151. {
  152. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  153. .WithOne("DriverDetails")
  154. .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
  155. .OnDelete(DeleteBehavior.Cascade);
  156. });
  157. modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
  158. {
  159. b.HasOne("ProRestaurant.Models.Accounts.User", "User")
  160. .WithMany()
  161. .HasForeignKey("UserId")
  162. .OnDelete(DeleteBehavior.Cascade);
  163. });
  164. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
  165. {
  166. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  167. .WithMany()
  168. .HasForeignKey("RestaurantId")
  169. .OnDelete(DeleteBehavior.Cascade);
  170. });
  171. modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
  172. {
  173. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  174. .WithMany()
  175. .HasForeignKey("RestaurantId")
  176. .OnDelete(DeleteBehavior.Cascade);
  177. });
  178. modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
  179. {
  180. b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
  181. .WithMany("TradingHours")
  182. .HasForeignKey("RestaurantId")
  183. .OnDelete(DeleteBehavior.Cascade);
  184. });
  185. #pragma warning restore 612, 618
  186. }
  187. }
  188. }