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

DBContextModelSnapshot.cs 9.2KB

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