JellyfinDbModelSnapshot.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  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", "7.0.11");
  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.Permission", b =>
  197. {
  198. b.Property<int>("Id")
  199. .ValueGeneratedOnAdd()
  200. .HasColumnType("INTEGER");
  201. b.Property<int>("Kind")
  202. .HasColumnType("INTEGER");
  203. b.Property<Guid?>("Permission_Permissions_Guid")
  204. .HasColumnType("TEXT");
  205. b.Property<uint>("RowVersion")
  206. .IsConcurrencyToken()
  207. .HasColumnType("INTEGER");
  208. b.Property<Guid?>("UserId")
  209. .HasColumnType("TEXT");
  210. b.Property<bool>("Value")
  211. .HasColumnType("INTEGER");
  212. b.HasKey("Id");
  213. b.HasIndex("UserId", "Kind")
  214. .IsUnique()
  215. .HasFilter("[UserId] IS NOT NULL");
  216. b.ToTable("Permissions");
  217. });
  218. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  219. {
  220. b.Property<int>("Id")
  221. .ValueGeneratedOnAdd()
  222. .HasColumnType("INTEGER");
  223. b.Property<int>("Kind")
  224. .HasColumnType("INTEGER");
  225. b.Property<Guid?>("Preference_Preferences_Guid")
  226. .HasColumnType("TEXT");
  227. b.Property<uint>("RowVersion")
  228. .IsConcurrencyToken()
  229. .HasColumnType("INTEGER");
  230. b.Property<Guid?>("UserId")
  231. .HasColumnType("TEXT");
  232. b.Property<string>("Value")
  233. .IsRequired()
  234. .HasMaxLength(65535)
  235. .HasColumnType("TEXT");
  236. b.HasKey("Id");
  237. b.HasIndex("UserId", "Kind")
  238. .IsUnique()
  239. .HasFilter("[UserId] IS NOT NULL");
  240. b.ToTable("Preferences");
  241. });
  242. modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
  243. {
  244. b.Property<int>("Id")
  245. .ValueGeneratedOnAdd()
  246. .HasColumnType("INTEGER");
  247. b.Property<string>("AccessToken")
  248. .IsRequired()
  249. .HasColumnType("TEXT");
  250. b.Property<DateTime>("DateCreated")
  251. .HasColumnType("TEXT");
  252. b.Property<DateTime>("DateLastActivity")
  253. .HasColumnType("TEXT");
  254. b.Property<string>("Name")
  255. .IsRequired()
  256. .HasMaxLength(64)
  257. .HasColumnType("TEXT");
  258. b.HasKey("Id");
  259. b.HasIndex("AccessToken")
  260. .IsUnique();
  261. b.ToTable("ApiKeys");
  262. });
  263. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  264. {
  265. b.Property<int>("Id")
  266. .ValueGeneratedOnAdd()
  267. .HasColumnType("INTEGER");
  268. b.Property<string>("AccessToken")
  269. .IsRequired()
  270. .HasColumnType("TEXT");
  271. b.Property<string>("AppName")
  272. .IsRequired()
  273. .HasMaxLength(64)
  274. .HasColumnType("TEXT");
  275. b.Property<string>("AppVersion")
  276. .IsRequired()
  277. .HasMaxLength(32)
  278. .HasColumnType("TEXT");
  279. b.Property<DateTime>("DateCreated")
  280. .HasColumnType("TEXT");
  281. b.Property<DateTime>("DateLastActivity")
  282. .HasColumnType("TEXT");
  283. b.Property<DateTime>("DateModified")
  284. .HasColumnType("TEXT");
  285. b.Property<string>("DeviceId")
  286. .IsRequired()
  287. .HasMaxLength(256)
  288. .HasColumnType("TEXT");
  289. b.Property<string>("DeviceName")
  290. .IsRequired()
  291. .HasMaxLength(64)
  292. .HasColumnType("TEXT");
  293. b.Property<bool>("IsActive")
  294. .HasColumnType("INTEGER");
  295. b.Property<Guid>("UserId")
  296. .HasColumnType("TEXT");
  297. b.HasKey("Id");
  298. b.HasIndex("DeviceId");
  299. b.HasIndex("AccessToken", "DateLastActivity");
  300. b.HasIndex("DeviceId", "DateLastActivity");
  301. b.HasIndex("UserId", "DeviceId");
  302. b.ToTable("Devices");
  303. });
  304. modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
  305. {
  306. b.Property<int>("Id")
  307. .ValueGeneratedOnAdd()
  308. .HasColumnType("INTEGER");
  309. b.Property<string>("CustomName")
  310. .HasColumnType("TEXT");
  311. b.Property<string>("DeviceId")
  312. .IsRequired()
  313. .HasColumnType("TEXT");
  314. b.HasKey("Id");
  315. b.HasIndex("DeviceId")
  316. .IsUnique();
  317. b.ToTable("DeviceOptions");
  318. });
  319. modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
  320. {
  321. b.Property<Guid>("ItemId")
  322. .HasColumnType("TEXT");
  323. b.Property<int>("Width")
  324. .HasColumnType("INTEGER");
  325. b.Property<int>("Bandwidth")
  326. .HasColumnType("INTEGER");
  327. b.Property<int>("Height")
  328. .HasColumnType("INTEGER");
  329. b.Property<int>("Interval")
  330. .HasColumnType("INTEGER");
  331. b.Property<int>("ThumbnailCount")
  332. .HasColumnType("INTEGER");
  333. b.Property<int>("TileHeight")
  334. .HasColumnType("INTEGER");
  335. b.Property<int>("TileWidth")
  336. .HasColumnType("INTEGER");
  337. b.HasKey("ItemId", "Width");
  338. b.ToTable("TrickplayInfos");
  339. });
  340. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  341. {
  342. b.Property<Guid>("Id")
  343. .ValueGeneratedOnAdd()
  344. .HasColumnType("TEXT");
  345. b.Property<string>("AudioLanguagePreference")
  346. .HasMaxLength(255)
  347. .HasColumnType("TEXT");
  348. b.Property<string>("AuthenticationProviderId")
  349. .IsRequired()
  350. .HasMaxLength(255)
  351. .HasColumnType("TEXT");
  352. b.Property<string>("CastReceiverId")
  353. .HasMaxLength(32)
  354. .HasColumnType("TEXT");
  355. b.Property<bool>("DisplayCollectionsView")
  356. .HasColumnType("INTEGER");
  357. b.Property<bool>("DisplayMissingEpisodes")
  358. .HasColumnType("INTEGER");
  359. b.Property<bool>("EnableAutoLogin")
  360. .HasColumnType("INTEGER");
  361. b.Property<bool>("EnableLocalPassword")
  362. .HasColumnType("INTEGER");
  363. b.Property<bool>("EnableNextEpisodeAutoPlay")
  364. .HasColumnType("INTEGER");
  365. b.Property<bool>("EnableUserPreferenceAccess")
  366. .HasColumnType("INTEGER");
  367. b.Property<bool>("HidePlayedInLatest")
  368. .HasColumnType("INTEGER");
  369. b.Property<long>("InternalId")
  370. .HasColumnType("INTEGER");
  371. b.Property<int>("InvalidLoginAttemptCount")
  372. .HasColumnType("INTEGER");
  373. b.Property<DateTime?>("LastActivityDate")
  374. .HasColumnType("TEXT");
  375. b.Property<DateTime?>("LastLoginDate")
  376. .HasColumnType("TEXT");
  377. b.Property<int?>("LoginAttemptsBeforeLockout")
  378. .HasColumnType("INTEGER");
  379. b.Property<int>("MaxActiveSessions")
  380. .HasColumnType("INTEGER");
  381. b.Property<int?>("MaxParentalAgeRating")
  382. .HasColumnType("INTEGER");
  383. b.Property<bool>("MustUpdatePassword")
  384. .HasColumnType("INTEGER");
  385. b.Property<string>("Password")
  386. .HasMaxLength(65535)
  387. .HasColumnType("TEXT");
  388. b.Property<string>("PasswordResetProviderId")
  389. .IsRequired()
  390. .HasMaxLength(255)
  391. .HasColumnType("TEXT");
  392. b.Property<bool>("PlayDefaultAudioTrack")
  393. .HasColumnType("INTEGER");
  394. b.Property<bool>("RememberAudioSelections")
  395. .HasColumnType("INTEGER");
  396. b.Property<bool>("RememberSubtitleSelections")
  397. .HasColumnType("INTEGER");
  398. b.Property<int?>("RemoteClientBitrateLimit")
  399. .HasColumnType("INTEGER");
  400. b.Property<uint>("RowVersion")
  401. .IsConcurrencyToken()
  402. .HasColumnType("INTEGER");
  403. b.Property<string>("SubtitleLanguagePreference")
  404. .HasMaxLength(255)
  405. .HasColumnType("TEXT");
  406. b.Property<int>("SubtitleMode")
  407. .HasColumnType("INTEGER");
  408. b.Property<int>("SyncPlayAccess")
  409. .HasColumnType("INTEGER");
  410. b.Property<string>("Username")
  411. .IsRequired()
  412. .HasMaxLength(255)
  413. .HasColumnType("TEXT")
  414. .UseCollation("NOCASE");
  415. b.HasKey("Id");
  416. b.HasIndex("Username")
  417. .IsUnique();
  418. b.ToTable("Users");
  419. });
  420. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  421. {
  422. b.HasOne("Jellyfin.Data.Entities.User", null)
  423. .WithMany("AccessSchedules")
  424. .HasForeignKey("UserId")
  425. .OnDelete(DeleteBehavior.Cascade)
  426. .IsRequired();
  427. });
  428. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  429. {
  430. b.HasOne("Jellyfin.Data.Entities.User", null)
  431. .WithMany("DisplayPreferences")
  432. .HasForeignKey("UserId")
  433. .OnDelete(DeleteBehavior.Cascade)
  434. .IsRequired();
  435. });
  436. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  437. {
  438. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  439. .WithMany("HomeSections")
  440. .HasForeignKey("DisplayPreferencesId")
  441. .OnDelete(DeleteBehavior.Cascade)
  442. .IsRequired();
  443. });
  444. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  445. {
  446. b.HasOne("Jellyfin.Data.Entities.User", null)
  447. .WithOne("ProfileImage")
  448. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  449. .OnDelete(DeleteBehavior.Cascade);
  450. });
  451. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  452. {
  453. b.HasOne("Jellyfin.Data.Entities.User", null)
  454. .WithMany("ItemDisplayPreferences")
  455. .HasForeignKey("UserId")
  456. .OnDelete(DeleteBehavior.Cascade)
  457. .IsRequired();
  458. });
  459. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  460. {
  461. b.HasOne("Jellyfin.Data.Entities.User", null)
  462. .WithMany("Permissions")
  463. .HasForeignKey("UserId")
  464. .OnDelete(DeleteBehavior.Cascade);
  465. });
  466. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  467. {
  468. b.HasOne("Jellyfin.Data.Entities.User", null)
  469. .WithMany("Preferences")
  470. .HasForeignKey("UserId")
  471. .OnDelete(DeleteBehavior.Cascade);
  472. });
  473. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  474. {
  475. b.HasOne("Jellyfin.Data.Entities.User", "User")
  476. .WithMany()
  477. .HasForeignKey("UserId")
  478. .OnDelete(DeleteBehavior.Cascade)
  479. .IsRequired();
  480. b.Navigation("User");
  481. });
  482. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  483. {
  484. b.Navigation("HomeSections");
  485. });
  486. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  487. {
  488. b.Navigation("AccessSchedules");
  489. b.Navigation("DisplayPreferences");
  490. b.Navigation("ItemDisplayPreferences");
  491. b.Navigation("Permissions");
  492. b.Navigation("Preferences");
  493. b.Navigation("ProfileImage");
  494. });
  495. #pragma warning restore 612, 618
  496. }
  497. }
  498. }