20200517002411_AddUsers.Designer.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. #pragma warning disable CS1591
  2. #pragma warning disable SA1601
  3. // <auto-generated />
  4. using System;
  5. using Jellyfin.Server.Implementations;
  6. using Microsoft.EntityFrameworkCore;
  7. using Microsoft.EntityFrameworkCore.Infrastructure;
  8. using Microsoft.EntityFrameworkCore.Migrations;
  9. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  10. namespace Jellyfin.Server.Implementations.Migrations
  11. {
  12. [DbContext(typeof(JellyfinDb))]
  13. [Migration("20200517002411_AddUsers")]
  14. partial class AddUsers
  15. {
  16. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  17. {
  18. #pragma warning disable 612, 618
  19. modelBuilder
  20. .HasDefaultSchema("jellyfin")
  21. .HasAnnotation("ProductVersion", "3.1.3");
  22. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  23. {
  24. b.Property<int>("Id")
  25. .ValueGeneratedOnAdd()
  26. .HasColumnType("INTEGER");
  27. b.Property<int>("DayOfWeek")
  28. .HasColumnType("INTEGER");
  29. b.Property<double>("EndHour")
  30. .HasColumnType("REAL");
  31. b.Property<double>("StartHour")
  32. .HasColumnType("REAL");
  33. b.Property<Guid>("UserId")
  34. .HasColumnType("TEXT");
  35. b.HasKey("Id");
  36. b.HasIndex("UserId");
  37. b.ToTable("AccessSchedule");
  38. });
  39. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  40. {
  41. b.Property<int>("Id")
  42. .ValueGeneratedOnAdd()
  43. .HasColumnType("INTEGER");
  44. b.Property<DateTime>("DateCreated")
  45. .HasColumnType("TEXT");
  46. b.Property<string>("ItemId")
  47. .HasColumnType("TEXT")
  48. .HasMaxLength(256);
  49. b.Property<int>("LogSeverity")
  50. .HasColumnType("INTEGER");
  51. b.Property<string>("Name")
  52. .IsRequired()
  53. .HasColumnType("TEXT")
  54. .HasMaxLength(512);
  55. b.Property<string>("Overview")
  56. .HasColumnType("TEXT")
  57. .HasMaxLength(512);
  58. b.Property<uint>("RowVersion")
  59. .IsConcurrencyToken()
  60. .HasColumnType("INTEGER");
  61. b.Property<string>("ShortOverview")
  62. .HasColumnType("TEXT")
  63. .HasMaxLength(512);
  64. b.Property<string>("Type")
  65. .IsRequired()
  66. .HasColumnType("TEXT")
  67. .HasMaxLength(256);
  68. b.Property<Guid>("UserId")
  69. .HasColumnType("TEXT");
  70. b.HasKey("Id");
  71. b.ToTable("ActivityLogs");
  72. });
  73. modelBuilder.Entity("Jellyfin.Data.Entities.Group", b =>
  74. {
  75. b.Property<Guid>("Id")
  76. .ValueGeneratedOnAdd()
  77. .HasColumnType("TEXT");
  78. b.Property<Guid?>("Group_Groups_Guid")
  79. .HasColumnType("TEXT");
  80. b.Property<string>("Name")
  81. .IsRequired()
  82. .HasColumnType("TEXT")
  83. .HasMaxLength(255);
  84. b.Property<uint>("RowVersion")
  85. .IsConcurrencyToken()
  86. .HasColumnType("INTEGER");
  87. b.HasKey("Id");
  88. b.HasIndex("Group_Groups_Guid");
  89. b.ToTable("Groups");
  90. });
  91. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  92. {
  93. b.Property<int>("Id")
  94. .ValueGeneratedOnAdd()
  95. .HasColumnType("INTEGER");
  96. b.Property<DateTime>("LastModified")
  97. .HasColumnType("TEXT");
  98. b.Property<string>("Path")
  99. .IsRequired()
  100. .HasColumnType("TEXT");
  101. b.HasKey("Id");
  102. b.ToTable("ImageInfo");
  103. });
  104. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  105. {
  106. b.Property<int>("Id")
  107. .ValueGeneratedOnAdd()
  108. .HasColumnType("INTEGER");
  109. b.Property<int>("Kind")
  110. .HasColumnType("INTEGER");
  111. b.Property<Guid?>("Permission_GroupPermissions_Id")
  112. .HasColumnType("TEXT");
  113. b.Property<Guid?>("Permission_Permissions_Guid")
  114. .HasColumnType("TEXT");
  115. b.Property<uint>("RowVersion")
  116. .IsConcurrencyToken()
  117. .HasColumnType("INTEGER");
  118. b.Property<bool>("Value")
  119. .HasColumnType("INTEGER");
  120. b.HasKey("Id");
  121. b.HasIndex("Permission_GroupPermissions_Id");
  122. b.HasIndex("Permission_Permissions_Guid");
  123. b.ToTable("Permissions");
  124. });
  125. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  126. {
  127. b.Property<int>("Id")
  128. .ValueGeneratedOnAdd()
  129. .HasColumnType("INTEGER");
  130. b.Property<int>("Kind")
  131. .HasColumnType("INTEGER");
  132. b.Property<Guid?>("Preference_Preferences_Guid")
  133. .HasColumnType("TEXT");
  134. b.Property<Guid?>("Preference_Preferences_Id")
  135. .HasColumnType("TEXT");
  136. b.Property<uint>("RowVersion")
  137. .IsConcurrencyToken()
  138. .HasColumnType("INTEGER");
  139. b.Property<string>("Value")
  140. .IsRequired()
  141. .HasColumnType("TEXT")
  142. .HasMaxLength(65535);
  143. b.HasKey("Id");
  144. b.HasIndex("Preference_Preferences_Guid");
  145. b.HasIndex("Preference_Preferences_Id");
  146. b.ToTable("Preferences");
  147. });
  148. modelBuilder.Entity("Jellyfin.Data.Entities.ProviderMapping", b =>
  149. {
  150. b.Property<int>("Id")
  151. .ValueGeneratedOnAdd()
  152. .HasColumnType("INTEGER");
  153. b.Property<string>("ProviderData")
  154. .IsRequired()
  155. .HasColumnType("TEXT")
  156. .HasMaxLength(65535);
  157. b.Property<Guid?>("ProviderMapping_ProviderMappings_Id")
  158. .HasColumnType("TEXT");
  159. b.Property<string>("ProviderName")
  160. .IsRequired()
  161. .HasColumnType("TEXT")
  162. .HasMaxLength(255);
  163. b.Property<string>("ProviderSecrets")
  164. .IsRequired()
  165. .HasColumnType("TEXT")
  166. .HasMaxLength(65535);
  167. b.Property<uint>("RowVersion")
  168. .IsConcurrencyToken()
  169. .HasColumnType("INTEGER");
  170. b.HasKey("Id");
  171. b.HasIndex("ProviderMapping_ProviderMappings_Id");
  172. b.ToTable("ProviderMapping");
  173. });
  174. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  175. {
  176. b.Property<Guid>("Id")
  177. .ValueGeneratedOnAdd()
  178. .HasColumnType("TEXT");
  179. b.Property<string>("AudioLanguagePreference")
  180. .HasColumnType("TEXT")
  181. .HasMaxLength(255);
  182. b.Property<string>("AuthenticationProviderId")
  183. .IsRequired()
  184. .HasColumnType("TEXT")
  185. .HasMaxLength(255);
  186. b.Property<bool>("DisplayCollectionsView")
  187. .HasColumnType("INTEGER");
  188. b.Property<bool>("DisplayMissingEpisodes")
  189. .HasColumnType("INTEGER");
  190. b.Property<string>("EasyPassword")
  191. .HasColumnType("TEXT")
  192. .HasMaxLength(65535);
  193. b.Property<bool>("EnableAutoLogin")
  194. .HasColumnType("INTEGER");
  195. b.Property<bool>("EnableLocalPassword")
  196. .HasColumnType("INTEGER");
  197. b.Property<bool>("EnableNextEpisodeAutoPlay")
  198. .HasColumnType("INTEGER");
  199. b.Property<bool>("EnableUserPreferenceAccess")
  200. .HasColumnType("INTEGER");
  201. b.Property<bool>("HidePlayedInLatest")
  202. .HasColumnType("INTEGER");
  203. b.Property<long>("InternalId")
  204. .HasColumnType("INTEGER");
  205. b.Property<int>("InvalidLoginAttemptCount")
  206. .HasColumnType("INTEGER");
  207. b.Property<DateTime>("LastActivityDate")
  208. .HasColumnType("TEXT");
  209. b.Property<DateTime>("LastLoginDate")
  210. .HasColumnType("TEXT");
  211. b.Property<int?>("LoginAttemptsBeforeLockout")
  212. .HasColumnType("INTEGER");
  213. b.Property<int?>("MaxParentalAgeRating")
  214. .HasColumnType("INTEGER");
  215. b.Property<bool>("MustUpdatePassword")
  216. .HasColumnType("INTEGER");
  217. b.Property<string>("Password")
  218. .HasColumnType("TEXT")
  219. .HasMaxLength(65535);
  220. b.Property<string>("PasswordResetProviderId")
  221. .IsRequired()
  222. .HasColumnType("TEXT")
  223. .HasMaxLength(255);
  224. b.Property<bool>("PlayDefaultAudioTrack")
  225. .HasColumnType("INTEGER");
  226. b.Property<int?>("ProfileImageId")
  227. .HasColumnType("INTEGER");
  228. b.Property<bool>("RememberAudioSelections")
  229. .HasColumnType("INTEGER");
  230. b.Property<bool>("RememberSubtitleSelections")
  231. .HasColumnType("INTEGER");
  232. b.Property<int?>("RemoteClientBitrateLimit")
  233. .HasColumnType("INTEGER");
  234. b.Property<uint>("RowVersion")
  235. .IsConcurrencyToken()
  236. .HasColumnType("INTEGER");
  237. b.Property<string>("SubtitleLanguagePreference")
  238. .HasColumnType("TEXT")
  239. .HasMaxLength(255);
  240. b.Property<int>("SubtitleMode")
  241. .HasColumnType("INTEGER");
  242. b.Property<string>("Username")
  243. .IsRequired()
  244. .HasColumnType("TEXT")
  245. .HasMaxLength(255);
  246. b.HasKey("Id");
  247. b.HasIndex("ProfileImageId");
  248. b.ToTable("Users");
  249. });
  250. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  251. {
  252. b.HasOne("Jellyfin.Data.Entities.User", null)
  253. .WithMany("AccessSchedules")
  254. .HasForeignKey("UserId")
  255. .OnDelete(DeleteBehavior.Cascade)
  256. .IsRequired();
  257. });
  258. modelBuilder.Entity("Jellyfin.Data.Entities.Group", b =>
  259. {
  260. b.HasOne("Jellyfin.Data.Entities.User", null)
  261. .WithMany("Groups")
  262. .HasForeignKey("Group_Groups_Guid");
  263. });
  264. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  265. {
  266. b.HasOne("Jellyfin.Data.Entities.Group", null)
  267. .WithMany("Permissions")
  268. .HasForeignKey("Permission_GroupPermissions_Id");
  269. b.HasOne("Jellyfin.Data.Entities.User", null)
  270. .WithMany("Permissions")
  271. .HasForeignKey("Permission_Permissions_Guid");
  272. });
  273. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  274. {
  275. b.HasOne("Jellyfin.Data.Entities.User", null)
  276. .WithMany("Preferences")
  277. .HasForeignKey("Preference_Preferences_Guid");
  278. b.HasOne("Jellyfin.Data.Entities.Group", null)
  279. .WithMany("Preferences")
  280. .HasForeignKey("Preference_Preferences_Id");
  281. });
  282. modelBuilder.Entity("Jellyfin.Data.Entities.ProviderMapping", b =>
  283. {
  284. b.HasOne("Jellyfin.Data.Entities.Group", null)
  285. .WithMany("ProviderMappings")
  286. .HasForeignKey("ProviderMapping_ProviderMappings_Id");
  287. b.HasOne("Jellyfin.Data.Entities.User", null)
  288. .WithMany("ProviderMappings")
  289. .HasForeignKey("ProviderMapping_ProviderMappings_Id");
  290. });
  291. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  292. {
  293. b.HasOne("Jellyfin.Data.Entities.ImageInfo", "ProfileImage")
  294. .WithMany()
  295. .HasForeignKey("ProfileImageId");
  296. });
  297. #pragma warning restore 612, 618
  298. }
  299. }
  300. }