JellyfinDbModelSnapshot.cs 22 KB

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