JellyfinDbModelSnapshot.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. // <auto-generated />
  2. using System;
  3. using Jellyfin.Server.Implementations;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  7. #nullable disable
  8. namespace Jellyfin.Server.Implementations.Migrations
  9. {
  10. [DbContext(typeof(JellyfinDbContext))]
  11. partial class JellyfinDbModelSnapshot : ModelSnapshot
  12. {
  13. protected override void BuildModel(ModelBuilder modelBuilder)
  14. {
  15. #pragma warning disable 612, 618
  16. modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
  17. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  18. {
  19. b.Property<int>("Id")
  20. .ValueGeneratedOnAdd()
  21. .HasColumnType("INTEGER");
  22. b.Property<int>("DayOfWeek")
  23. .HasColumnType("INTEGER");
  24. b.Property<double>("EndHour")
  25. .HasColumnType("REAL");
  26. b.Property<double>("StartHour")
  27. .HasColumnType("REAL");
  28. b.Property<Guid>("UserId")
  29. .HasColumnType("TEXT");
  30. b.HasKey("Id");
  31. b.HasIndex("UserId");
  32. b.ToTable("AccessSchedules");
  33. });
  34. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  35. {
  36. b.Property<int>("Id")
  37. .ValueGeneratedOnAdd()
  38. .HasColumnType("INTEGER");
  39. b.Property<DateTime>("DateCreated")
  40. .HasColumnType("TEXT");
  41. b.Property<string>("ItemId")
  42. .HasMaxLength(256)
  43. .HasColumnType("TEXT");
  44. b.Property<int>("LogSeverity")
  45. .HasColumnType("INTEGER");
  46. b.Property<string>("Name")
  47. .IsRequired()
  48. .HasMaxLength(512)
  49. .HasColumnType("TEXT");
  50. b.Property<string>("Overview")
  51. .HasMaxLength(512)
  52. .HasColumnType("TEXT");
  53. b.Property<uint>("RowVersion")
  54. .IsConcurrencyToken()
  55. .HasColumnType("INTEGER");
  56. b.Property<string>("ShortOverview")
  57. .HasMaxLength(512)
  58. .HasColumnType("TEXT");
  59. b.Property<string>("Type")
  60. .IsRequired()
  61. .HasMaxLength(256)
  62. .HasColumnType("TEXT");
  63. b.Property<Guid>("UserId")
  64. .HasColumnType("TEXT");
  65. b.HasKey("Id");
  66. b.HasIndex("DateCreated");
  67. b.ToTable("ActivityLogs");
  68. });
  69. modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
  70. {
  71. b.Property<int>("Id")
  72. .ValueGeneratedOnAdd()
  73. .HasColumnType("INTEGER");
  74. b.Property<string>("Client")
  75. .IsRequired()
  76. .HasMaxLength(32)
  77. .HasColumnType("TEXT");
  78. b.Property<Guid>("ItemId")
  79. .HasColumnType("TEXT");
  80. b.Property<string>("Key")
  81. .IsRequired()
  82. .HasColumnType("TEXT");
  83. b.Property<Guid>("UserId")
  84. .HasColumnType("TEXT");
  85. b.Property<string>("Value")
  86. .HasColumnType("TEXT");
  87. b.HasKey("Id");
  88. b.HasIndex("UserId", "ItemId", "Client", "Key")
  89. .IsUnique();
  90. b.ToTable("CustomItemDisplayPreferences");
  91. });
  92. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  93. {
  94. b.Property<int>("Id")
  95. .ValueGeneratedOnAdd()
  96. .HasColumnType("INTEGER");
  97. b.Property<int>("ChromecastVersion")
  98. .HasColumnType("INTEGER");
  99. b.Property<string>("Client")
  100. .IsRequired()
  101. .HasMaxLength(32)
  102. .HasColumnType("TEXT");
  103. b.Property<string>("DashboardTheme")
  104. .HasMaxLength(32)
  105. .HasColumnType("TEXT");
  106. b.Property<bool>("EnableNextVideoInfoOverlay")
  107. .HasColumnType("INTEGER");
  108. b.Property<int?>("IndexBy")
  109. .HasColumnType("INTEGER");
  110. b.Property<Guid>("ItemId")
  111. .HasColumnType("TEXT");
  112. b.Property<int>("ScrollDirection")
  113. .HasColumnType("INTEGER");
  114. b.Property<bool>("ShowBackdrop")
  115. .HasColumnType("INTEGER");
  116. b.Property<bool>("ShowSidebar")
  117. .HasColumnType("INTEGER");
  118. b.Property<int>("SkipBackwardLength")
  119. .HasColumnType("INTEGER");
  120. b.Property<int>("SkipForwardLength")
  121. .HasColumnType("INTEGER");
  122. b.Property<string>("TvHome")
  123. .HasMaxLength(32)
  124. .HasColumnType("TEXT");
  125. b.Property<Guid>("UserId")
  126. .HasColumnType("TEXT");
  127. b.HasKey("Id");
  128. b.HasIndex("UserId", "ItemId", "Client")
  129. .IsUnique();
  130. b.ToTable("DisplayPreferences");
  131. });
  132. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  133. {
  134. b.Property<int>("Id")
  135. .ValueGeneratedOnAdd()
  136. .HasColumnType("INTEGER");
  137. b.Property<int>("DisplayPreferencesId")
  138. .HasColumnType("INTEGER");
  139. b.Property<int>("Order")
  140. .HasColumnType("INTEGER");
  141. b.Property<int>("Type")
  142. .HasColumnType("INTEGER");
  143. b.HasKey("Id");
  144. b.HasIndex("DisplayPreferencesId");
  145. b.ToTable("HomeSection");
  146. });
  147. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  148. {
  149. b.Property<int>("Id")
  150. .ValueGeneratedOnAdd()
  151. .HasColumnType("INTEGER");
  152. b.Property<DateTime>("LastModified")
  153. .HasColumnType("TEXT");
  154. b.Property<string>("Path")
  155. .IsRequired()
  156. .HasMaxLength(512)
  157. .HasColumnType("TEXT");
  158. b.Property<Guid?>("UserId")
  159. .HasColumnType("TEXT");
  160. b.HasKey("Id");
  161. b.HasIndex("UserId")
  162. .IsUnique();
  163. b.ToTable("ImageInfos");
  164. });
  165. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  166. {
  167. b.Property<int>("Id")
  168. .ValueGeneratedOnAdd()
  169. .HasColumnType("INTEGER");
  170. b.Property<string>("Client")
  171. .IsRequired()
  172. .HasMaxLength(32)
  173. .HasColumnType("TEXT");
  174. b.Property<int?>("IndexBy")
  175. .HasColumnType("INTEGER");
  176. b.Property<Guid>("ItemId")
  177. .HasColumnType("TEXT");
  178. b.Property<bool>("RememberIndexing")
  179. .HasColumnType("INTEGER");
  180. b.Property<bool>("RememberSorting")
  181. .HasColumnType("INTEGER");
  182. b.Property<string>("SortBy")
  183. .IsRequired()
  184. .HasMaxLength(64)
  185. .HasColumnType("TEXT");
  186. b.Property<int>("SortOrder")
  187. .HasColumnType("INTEGER");
  188. b.Property<Guid>("UserId")
  189. .HasColumnType("TEXT");
  190. b.Property<int>("ViewType")
  191. .HasColumnType("INTEGER");
  192. b.HasKey("Id");
  193. b.HasIndex("UserId");
  194. b.ToTable("ItemDisplayPreferences");
  195. });
  196. modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
  197. {
  198. b.Property<Guid>("Id")
  199. .ValueGeneratedOnAdd()
  200. .HasColumnType("TEXT");
  201. b.Property<long>("EndTicks")
  202. .HasColumnType("INTEGER");
  203. b.Property<Guid>("ItemId")
  204. .HasColumnType("TEXT");
  205. b.Property<string>("SegmentProviderId")
  206. .IsRequired()
  207. .HasColumnType("TEXT");
  208. b.Property<long>("StartTicks")
  209. .HasColumnType("INTEGER");
  210. b.Property<int>("Type")
  211. .HasColumnType("INTEGER");
  212. b.HasKey("Id");
  213. b.ToTable("MediaSegments");
  214. });
  215. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  216. {
  217. b.Property<int>("Id")
  218. .ValueGeneratedOnAdd()
  219. .HasColumnType("INTEGER");
  220. b.Property<int>("Kind")
  221. .HasColumnType("INTEGER");
  222. b.Property<Guid?>("Permission_Permissions_Guid")
  223. .HasColumnType("TEXT");
  224. b.Property<uint>("RowVersion")
  225. .IsConcurrencyToken()
  226. .HasColumnType("INTEGER");
  227. b.Property<Guid?>("UserId")
  228. .HasColumnType("TEXT");
  229. b.Property<bool>("Value")
  230. .HasColumnType("INTEGER");
  231. b.HasKey("Id");
  232. b.HasIndex("UserId", "Kind")
  233. .IsUnique()
  234. .HasFilter("[UserId] IS NOT NULL");
  235. b.ToTable("Permissions");
  236. });
  237. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  238. {
  239. b.Property<int>("Id")
  240. .ValueGeneratedOnAdd()
  241. .HasColumnType("INTEGER");
  242. b.Property<int>("Kind")
  243. .HasColumnType("INTEGER");
  244. b.Property<Guid?>("Preference_Preferences_Guid")
  245. .HasColumnType("TEXT");
  246. b.Property<uint>("RowVersion")
  247. .IsConcurrencyToken()
  248. .HasColumnType("INTEGER");
  249. b.Property<Guid?>("UserId")
  250. .HasColumnType("TEXT");
  251. b.Property<string>("Value")
  252. .IsRequired()
  253. .HasMaxLength(65535)
  254. .HasColumnType("TEXT");
  255. b.HasKey("Id");
  256. b.HasIndex("UserId", "Kind")
  257. .IsUnique()
  258. .HasFilter("[UserId] IS NOT NULL");
  259. b.ToTable("Preferences");
  260. });
  261. modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
  262. {
  263. b.Property<int>("Id")
  264. .ValueGeneratedOnAdd()
  265. .HasColumnType("INTEGER");
  266. b.Property<string>("AccessToken")
  267. .IsRequired()
  268. .HasColumnType("TEXT");
  269. b.Property<DateTime>("DateCreated")
  270. .HasColumnType("TEXT");
  271. b.Property<DateTime>("DateLastActivity")
  272. .HasColumnType("TEXT");
  273. b.Property<string>("Name")
  274. .IsRequired()
  275. .HasMaxLength(64)
  276. .HasColumnType("TEXT");
  277. b.HasKey("Id");
  278. b.HasIndex("AccessToken")
  279. .IsUnique();
  280. b.ToTable("ApiKeys");
  281. });
  282. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  283. {
  284. b.Property<int>("Id")
  285. .ValueGeneratedOnAdd()
  286. .HasColumnType("INTEGER");
  287. b.Property<string>("AccessToken")
  288. .IsRequired()
  289. .HasColumnType("TEXT");
  290. b.Property<string>("AppName")
  291. .IsRequired()
  292. .HasMaxLength(64)
  293. .HasColumnType("TEXT");
  294. b.Property<string>("AppVersion")
  295. .IsRequired()
  296. .HasMaxLength(32)
  297. .HasColumnType("TEXT");
  298. b.Property<DateTime>("DateCreated")
  299. .HasColumnType("TEXT");
  300. b.Property<DateTime>("DateLastActivity")
  301. .HasColumnType("TEXT");
  302. b.Property<DateTime>("DateModified")
  303. .HasColumnType("TEXT");
  304. b.Property<string>("DeviceId")
  305. .IsRequired()
  306. .HasMaxLength(256)
  307. .HasColumnType("TEXT");
  308. b.Property<string>("DeviceName")
  309. .IsRequired()
  310. .HasMaxLength(64)
  311. .HasColumnType("TEXT");
  312. b.Property<bool>("IsActive")
  313. .HasColumnType("INTEGER");
  314. b.Property<Guid>("UserId")
  315. .HasColumnType("TEXT");
  316. b.HasKey("Id");
  317. b.HasIndex("DeviceId");
  318. b.HasIndex("AccessToken", "DateLastActivity");
  319. b.HasIndex("DeviceId", "DateLastActivity");
  320. b.HasIndex("UserId", "DeviceId");
  321. b.ToTable("Devices");
  322. });
  323. modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
  324. {
  325. b.Property<int>("Id")
  326. .ValueGeneratedOnAdd()
  327. .HasColumnType("INTEGER");
  328. b.Property<string>("CustomName")
  329. .HasColumnType("TEXT");
  330. b.Property<string>("DeviceId")
  331. .IsRequired()
  332. .HasColumnType("TEXT");
  333. b.HasKey("Id");
  334. b.HasIndex("DeviceId")
  335. .IsUnique();
  336. b.ToTable("DeviceOptions");
  337. });
  338. modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
  339. {
  340. b.Property<Guid>("ItemId")
  341. .HasColumnType("TEXT");
  342. b.Property<int>("Width")
  343. .HasColumnType("INTEGER");
  344. b.Property<int>("Bandwidth")
  345. .HasColumnType("INTEGER");
  346. b.Property<int>("Height")
  347. .HasColumnType("INTEGER");
  348. b.Property<int>("Interval")
  349. .HasColumnType("INTEGER");
  350. b.Property<int>("ThumbnailCount")
  351. .HasColumnType("INTEGER");
  352. b.Property<int>("TileHeight")
  353. .HasColumnType("INTEGER");
  354. b.Property<int>("TileWidth")
  355. .HasColumnType("INTEGER");
  356. b.HasKey("ItemId", "Width");
  357. b.ToTable("TrickplayInfos");
  358. });
  359. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  360. {
  361. b.Property<Guid>("Id")
  362. .ValueGeneratedOnAdd()
  363. .HasColumnType("TEXT");
  364. b.Property<string>("AudioLanguagePreference")
  365. .HasMaxLength(255)
  366. .HasColumnType("TEXT");
  367. b.Property<string>("AuthenticationProviderId")
  368. .IsRequired()
  369. .HasMaxLength(255)
  370. .HasColumnType("TEXT");
  371. b.Property<string>("CastReceiverId")
  372. .HasMaxLength(32)
  373. .HasColumnType("TEXT");
  374. b.Property<bool>("DisplayCollectionsView")
  375. .HasColumnType("INTEGER");
  376. b.Property<bool>("DisplayMissingEpisodes")
  377. .HasColumnType("INTEGER");
  378. b.Property<bool>("EnableAutoLogin")
  379. .HasColumnType("INTEGER");
  380. b.Property<bool>("EnableLocalPassword")
  381. .HasColumnType("INTEGER");
  382. b.Property<bool>("EnableNextEpisodeAutoPlay")
  383. .HasColumnType("INTEGER");
  384. b.Property<bool>("EnableUserPreferenceAccess")
  385. .HasColumnType("INTEGER");
  386. b.Property<bool>("HidePlayedInLatest")
  387. .HasColumnType("INTEGER");
  388. b.Property<long>("InternalId")
  389. .HasColumnType("INTEGER");
  390. b.Property<int>("InvalidLoginAttemptCount")
  391. .HasColumnType("INTEGER");
  392. b.Property<DateTime?>("LastActivityDate")
  393. .HasColumnType("TEXT");
  394. b.Property<DateTime?>("LastLoginDate")
  395. .HasColumnType("TEXT");
  396. b.Property<int?>("LoginAttemptsBeforeLockout")
  397. .HasColumnType("INTEGER");
  398. b.Property<int>("MaxActiveSessions")
  399. .HasColumnType("INTEGER");
  400. b.Property<int?>("MaxParentalAgeRating")
  401. .HasColumnType("INTEGER");
  402. b.Property<bool>("MustUpdatePassword")
  403. .HasColumnType("INTEGER");
  404. b.Property<string>("Password")
  405. .HasMaxLength(65535)
  406. .HasColumnType("TEXT");
  407. b.Property<string>("PasswordResetProviderId")
  408. .IsRequired()
  409. .HasMaxLength(255)
  410. .HasColumnType("TEXT");
  411. b.Property<bool>("PlayDefaultAudioTrack")
  412. .HasColumnType("INTEGER");
  413. b.Property<bool>("RememberAudioSelections")
  414. .HasColumnType("INTEGER");
  415. b.Property<bool>("RememberSubtitleSelections")
  416. .HasColumnType("INTEGER");
  417. b.Property<int?>("RemoteClientBitrateLimit")
  418. .HasColumnType("INTEGER");
  419. b.Property<uint>("RowVersion")
  420. .IsConcurrencyToken()
  421. .HasColumnType("INTEGER");
  422. b.Property<string>("SubtitleLanguagePreference")
  423. .HasMaxLength(255)
  424. .HasColumnType("TEXT");
  425. b.Property<int>("SubtitleMode")
  426. .HasColumnType("INTEGER");
  427. b.Property<int>("SyncPlayAccess")
  428. .HasColumnType("INTEGER");
  429. b.Property<string>("Username")
  430. .IsRequired()
  431. .HasMaxLength(255)
  432. .HasColumnType("TEXT")
  433. .UseCollation("NOCASE");
  434. b.HasKey("Id");
  435. b.HasIndex("Username")
  436. .IsUnique();
  437. b.ToTable("Users");
  438. });
  439. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  440. {
  441. b.HasOne("Jellyfin.Data.Entities.User", null)
  442. .WithMany("AccessSchedules")
  443. .HasForeignKey("UserId")
  444. .OnDelete(DeleteBehavior.Cascade)
  445. .IsRequired();
  446. });
  447. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  448. {
  449. b.HasOne("Jellyfin.Data.Entities.User", null)
  450. .WithMany("DisplayPreferences")
  451. .HasForeignKey("UserId")
  452. .OnDelete(DeleteBehavior.Cascade)
  453. .IsRequired();
  454. });
  455. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  456. {
  457. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  458. .WithMany("HomeSections")
  459. .HasForeignKey("DisplayPreferencesId")
  460. .OnDelete(DeleteBehavior.Cascade)
  461. .IsRequired();
  462. });
  463. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  464. {
  465. b.HasOne("Jellyfin.Data.Entities.User", null)
  466. .WithOne("ProfileImage")
  467. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  468. .OnDelete(DeleteBehavior.Cascade);
  469. });
  470. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  471. {
  472. b.HasOne("Jellyfin.Data.Entities.User", null)
  473. .WithMany("ItemDisplayPreferences")
  474. .HasForeignKey("UserId")
  475. .OnDelete(DeleteBehavior.Cascade)
  476. .IsRequired();
  477. });
  478. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  479. {
  480. b.HasOne("Jellyfin.Data.Entities.User", null)
  481. .WithMany("Permissions")
  482. .HasForeignKey("UserId")
  483. .OnDelete(DeleteBehavior.Cascade);
  484. });
  485. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  486. {
  487. b.HasOne("Jellyfin.Data.Entities.User", null)
  488. .WithMany("Preferences")
  489. .HasForeignKey("UserId")
  490. .OnDelete(DeleteBehavior.Cascade);
  491. });
  492. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  493. {
  494. b.HasOne("Jellyfin.Data.Entities.User", "User")
  495. .WithMany()
  496. .HasForeignKey("UserId")
  497. .OnDelete(DeleteBehavior.Cascade)
  498. .IsRequired();
  499. b.Navigation("User");
  500. });
  501. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  502. {
  503. b.Navigation("HomeSections");
  504. });
  505. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  506. {
  507. b.Navigation("AccessSchedules");
  508. b.Navigation("DisplayPreferences");
  509. b.Navigation("ItemDisplayPreferences");
  510. b.Navigation("Permissions");
  511. b.Navigation("Preferences");
  512. b.Navigation("ProfileImage");
  513. });
  514. #pragma warning restore 612, 618
  515. }
  516. }
  517. }