20241009231203_FixedAncestorIds.Designer.cs 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536
  1. // <auto-generated />
  2. using System;
  3. using Jellyfin.Server.Implementations;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. #nullable disable
  9. namespace Jellyfin.Server.Implementations.Migrations
  10. {
  11. [DbContext(typeof(JellyfinDbContext))]
  12. [Migration("20241009231203_FixedAncestorIds")]
  13. partial class FixedAncestorIds
  14. {
  15. /// <inheritdoc />
  16. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  17. {
  18. #pragma warning disable 612, 618
  19. modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
  20. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  21. {
  22. b.Property<int>("Id")
  23. .ValueGeneratedOnAdd()
  24. .HasColumnType("INTEGER");
  25. b.Property<int>("DayOfWeek")
  26. .HasColumnType("INTEGER");
  27. b.Property<double>("EndHour")
  28. .HasColumnType("REAL");
  29. b.Property<double>("StartHour")
  30. .HasColumnType("REAL");
  31. b.Property<Guid>("UserId")
  32. .HasColumnType("TEXT");
  33. b.HasKey("Id");
  34. b.HasIndex("UserId");
  35. b.ToTable("AccessSchedules");
  36. });
  37. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  38. {
  39. b.Property<int>("Id")
  40. .ValueGeneratedOnAdd()
  41. .HasColumnType("INTEGER");
  42. b.Property<DateTime>("DateCreated")
  43. .HasColumnType("TEXT");
  44. b.Property<string>("ItemId")
  45. .HasMaxLength(256)
  46. .HasColumnType("TEXT");
  47. b.Property<int>("LogSeverity")
  48. .HasColumnType("INTEGER");
  49. b.Property<string>("Name")
  50. .IsRequired()
  51. .HasMaxLength(512)
  52. .HasColumnType("TEXT");
  53. b.Property<string>("Overview")
  54. .HasMaxLength(512)
  55. .HasColumnType("TEXT");
  56. b.Property<uint>("RowVersion")
  57. .IsConcurrencyToken()
  58. .HasColumnType("INTEGER");
  59. b.Property<string>("ShortOverview")
  60. .HasMaxLength(512)
  61. .HasColumnType("TEXT");
  62. b.Property<string>("Type")
  63. .IsRequired()
  64. .HasMaxLength(256)
  65. .HasColumnType("TEXT");
  66. b.Property<Guid>("UserId")
  67. .HasColumnType("TEXT");
  68. b.HasKey("Id");
  69. b.HasIndex("DateCreated");
  70. b.ToTable("ActivityLogs");
  71. });
  72. modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
  73. {
  74. b.Property<Guid>("ItemId")
  75. .HasColumnType("TEXT");
  76. b.Property<Guid>("ParentItemId")
  77. .HasColumnType("TEXT");
  78. b.Property<Guid?>("BaseItemEntityId")
  79. .HasColumnType("TEXT");
  80. b.HasKey("ItemId", "ParentItemId");
  81. b.HasIndex("BaseItemEntityId");
  82. b.HasIndex("ParentItemId");
  83. b.ToTable("AncestorIds");
  84. });
  85. modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
  86. {
  87. b.Property<Guid>("ItemId")
  88. .HasColumnType("TEXT");
  89. b.Property<int>("Index")
  90. .HasColumnType("INTEGER");
  91. b.Property<string>("Codec")
  92. .IsRequired()
  93. .HasColumnType("TEXT");
  94. b.Property<string>("CodecTag")
  95. .HasColumnType("TEXT");
  96. b.Property<string>("Comment")
  97. .HasColumnType("TEXT");
  98. b.Property<string>("Filename")
  99. .HasColumnType("TEXT");
  100. b.Property<string>("MimeType")
  101. .HasColumnType("TEXT");
  102. b.HasKey("ItemId", "Index");
  103. b.ToTable("AttachmentStreamInfos");
  104. });
  105. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
  106. {
  107. b.Property<Guid>("Id")
  108. .ValueGeneratedOnAdd()
  109. .HasColumnType("TEXT");
  110. b.Property<string>("Album")
  111. .HasColumnType("TEXT");
  112. b.Property<string>("AlbumArtists")
  113. .HasColumnType("TEXT");
  114. b.Property<string>("Artists")
  115. .HasColumnType("TEXT");
  116. b.Property<int?>("Audio")
  117. .HasColumnType("INTEGER");
  118. b.Property<string>("ChannelId")
  119. .HasColumnType("TEXT");
  120. b.Property<string>("CleanName")
  121. .HasColumnType("TEXT");
  122. b.Property<float?>("CommunityRating")
  123. .HasColumnType("REAL");
  124. b.Property<float?>("CriticRating")
  125. .HasColumnType("REAL");
  126. b.Property<string>("CustomRating")
  127. .HasColumnType("TEXT");
  128. b.Property<string>("Data")
  129. .HasColumnType("TEXT");
  130. b.Property<DateTime?>("DateCreated")
  131. .HasColumnType("TEXT");
  132. b.Property<DateTime?>("DateLastMediaAdded")
  133. .HasColumnType("TEXT");
  134. b.Property<DateTime?>("DateLastRefreshed")
  135. .HasColumnType("TEXT");
  136. b.Property<DateTime?>("DateLastSaved")
  137. .HasColumnType("TEXT");
  138. b.Property<DateTime?>("DateModified")
  139. .HasColumnType("TEXT");
  140. b.Property<DateTime>("EndDate")
  141. .HasColumnType("TEXT");
  142. b.Property<string>("EpisodeTitle")
  143. .HasColumnType("TEXT");
  144. b.Property<string>("ExternalId")
  145. .HasColumnType("TEXT");
  146. b.Property<string>("ExternalSeriesId")
  147. .HasColumnType("TEXT");
  148. b.Property<string>("ExternalServiceId")
  149. .HasColumnType("TEXT");
  150. b.Property<string>("ExtraIds")
  151. .HasColumnType("TEXT");
  152. b.Property<int?>("ExtraType")
  153. .HasColumnType("INTEGER");
  154. b.Property<string>("ForcedSortName")
  155. .HasColumnType("TEXT");
  156. b.Property<string>("Genres")
  157. .HasColumnType("TEXT");
  158. b.Property<int?>("Height")
  159. .HasColumnType("INTEGER");
  160. b.Property<int?>("IndexNumber")
  161. .HasColumnType("INTEGER");
  162. b.Property<int?>("InheritedParentalRatingValue")
  163. .HasColumnType("INTEGER");
  164. b.Property<bool>("IsFolder")
  165. .HasColumnType("INTEGER");
  166. b.Property<bool>("IsInMixedFolder")
  167. .HasColumnType("INTEGER");
  168. b.Property<bool>("IsLocked")
  169. .HasColumnType("INTEGER");
  170. b.Property<bool>("IsMovie")
  171. .HasColumnType("INTEGER");
  172. b.Property<bool>("IsRepeat")
  173. .HasColumnType("INTEGER");
  174. b.Property<bool>("IsSeries")
  175. .HasColumnType("INTEGER");
  176. b.Property<bool>("IsVirtualItem")
  177. .HasColumnType("INTEGER");
  178. b.Property<float?>("LUFS")
  179. .HasColumnType("REAL");
  180. b.Property<string>("MediaType")
  181. .HasColumnType("TEXT");
  182. b.Property<string>("Name")
  183. .HasColumnType("TEXT");
  184. b.Property<float?>("NormalizationGain")
  185. .HasColumnType("REAL");
  186. b.Property<string>("OfficialRating")
  187. .HasColumnType("TEXT");
  188. b.Property<string>("OriginalTitle")
  189. .HasColumnType("TEXT");
  190. b.Property<string>("Overview")
  191. .HasColumnType("TEXT");
  192. b.Property<string>("OwnerId")
  193. .HasColumnType("TEXT");
  194. b.Property<Guid?>("ParentId")
  195. .HasColumnType("TEXT");
  196. b.Property<int?>("ParentIndexNumber")
  197. .HasColumnType("INTEGER");
  198. b.Property<string>("Path")
  199. .HasColumnType("TEXT");
  200. b.Property<string>("PreferredMetadataCountryCode")
  201. .HasColumnType("TEXT");
  202. b.Property<string>("PreferredMetadataLanguage")
  203. .HasColumnType("TEXT");
  204. b.Property<DateTime?>("PremiereDate")
  205. .HasColumnType("TEXT");
  206. b.Property<string>("PresentationUniqueKey")
  207. .HasColumnType("TEXT");
  208. b.Property<string>("PrimaryVersionId")
  209. .HasColumnType("TEXT");
  210. b.Property<string>("ProductionLocations")
  211. .HasColumnType("TEXT");
  212. b.Property<int?>("ProductionYear")
  213. .HasColumnType("INTEGER");
  214. b.Property<long?>("RunTimeTicks")
  215. .HasColumnType("INTEGER");
  216. b.Property<Guid?>("SeasonId")
  217. .HasColumnType("TEXT");
  218. b.Property<string>("SeasonName")
  219. .HasColumnType("TEXT");
  220. b.Property<Guid?>("SeriesId")
  221. .HasColumnType("TEXT");
  222. b.Property<string>("SeriesName")
  223. .HasColumnType("TEXT");
  224. b.Property<string>("SeriesPresentationUniqueKey")
  225. .HasColumnType("TEXT");
  226. b.Property<string>("ShowId")
  227. .HasColumnType("TEXT");
  228. b.Property<long?>("Size")
  229. .HasColumnType("INTEGER");
  230. b.Property<string>("SortName")
  231. .HasColumnType("TEXT");
  232. b.Property<DateTime>("StartDate")
  233. .HasColumnType("TEXT");
  234. b.Property<string>("Studios")
  235. .HasColumnType("TEXT");
  236. b.Property<string>("Tagline")
  237. .HasColumnType("TEXT");
  238. b.Property<string>("Tags")
  239. .HasColumnType("TEXT");
  240. b.Property<Guid?>("TopParentId")
  241. .HasColumnType("TEXT");
  242. b.Property<int?>("TotalBitrate")
  243. .HasColumnType("INTEGER");
  244. b.Property<string>("Type")
  245. .IsRequired()
  246. .HasColumnType("TEXT");
  247. b.Property<string>("UnratedType")
  248. .HasColumnType("TEXT");
  249. b.Property<string>("UserDataKey")
  250. .HasColumnType("TEXT");
  251. b.Property<int?>("Width")
  252. .HasColumnType("INTEGER");
  253. b.HasKey("Id");
  254. b.HasIndex("ParentId");
  255. b.HasIndex("Path");
  256. b.HasIndex("PresentationUniqueKey");
  257. b.HasIndex("TopParentId", "Id");
  258. b.HasIndex("UserDataKey", "Type");
  259. b.HasIndex("Type", "TopParentId", "Id");
  260. b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
  261. b.HasIndex("Type", "TopParentId", "StartDate");
  262. b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
  263. b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
  264. b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
  265. b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
  266. b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
  267. b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
  268. b.ToTable("BaseItems");
  269. });
  270. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
  271. {
  272. b.Property<Guid>("Id")
  273. .ValueGeneratedOnAdd()
  274. .HasColumnType("TEXT");
  275. b.Property<byte[]>("Blurhash")
  276. .HasColumnType("BLOB");
  277. b.Property<DateTime>("DateModified")
  278. .HasColumnType("TEXT");
  279. b.Property<int>("Height")
  280. .HasColumnType("INTEGER");
  281. b.Property<int>("ImageType")
  282. .HasColumnType("INTEGER");
  283. b.Property<Guid>("ItemId")
  284. .HasColumnType("TEXT");
  285. b.Property<string>("Path")
  286. .IsRequired()
  287. .HasColumnType("TEXT");
  288. b.Property<int>("Width")
  289. .HasColumnType("INTEGER");
  290. b.HasKey("Id");
  291. b.HasIndex("ItemId");
  292. b.ToTable("BaseItemImageInfos");
  293. });
  294. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
  295. {
  296. b.Property<int>("Id")
  297. .HasColumnType("INTEGER");
  298. b.Property<Guid>("ItemId")
  299. .HasColumnType("TEXT");
  300. b.HasKey("Id", "ItemId");
  301. b.HasIndex("ItemId");
  302. b.ToTable("BaseItemMetadataFields");
  303. });
  304. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
  305. {
  306. b.Property<Guid>("ItemId")
  307. .HasColumnType("TEXT");
  308. b.Property<string>("ProviderId")
  309. .HasColumnType("TEXT");
  310. b.Property<string>("ProviderValue")
  311. .IsRequired()
  312. .HasColumnType("TEXT");
  313. b.HasKey("ItemId", "ProviderId");
  314. b.HasIndex("ProviderId", "ProviderValue", "ItemId");
  315. b.ToTable("BaseItemProviders");
  316. });
  317. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
  318. {
  319. b.Property<int>("Id")
  320. .HasColumnType("INTEGER");
  321. b.Property<Guid>("ItemId")
  322. .HasColumnType("TEXT");
  323. b.HasKey("Id", "ItemId");
  324. b.HasIndex("ItemId");
  325. b.ToTable("BaseItemTrailerTypes");
  326. });
  327. modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
  328. {
  329. b.Property<Guid>("ItemId")
  330. .HasColumnType("TEXT");
  331. b.Property<int>("ChapterIndex")
  332. .HasColumnType("INTEGER");
  333. b.Property<DateTime?>("ImageDateModified")
  334. .HasColumnType("TEXT");
  335. b.Property<string>("ImagePath")
  336. .HasColumnType("TEXT");
  337. b.Property<string>("Name")
  338. .HasColumnType("TEXT");
  339. b.Property<long>("StartPositionTicks")
  340. .HasColumnType("INTEGER");
  341. b.HasKey("ItemId", "ChapterIndex");
  342. b.ToTable("Chapters");
  343. });
  344. modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
  345. {
  346. b.Property<int>("Id")
  347. .ValueGeneratedOnAdd()
  348. .HasColumnType("INTEGER");
  349. b.Property<string>("Client")
  350. .IsRequired()
  351. .HasMaxLength(32)
  352. .HasColumnType("TEXT");
  353. b.Property<Guid>("ItemId")
  354. .HasColumnType("TEXT");
  355. b.Property<string>("Key")
  356. .IsRequired()
  357. .HasColumnType("TEXT");
  358. b.Property<Guid>("UserId")
  359. .HasColumnType("TEXT");
  360. b.Property<string>("Value")
  361. .HasColumnType("TEXT");
  362. b.HasKey("Id");
  363. b.HasIndex("UserId", "ItemId", "Client", "Key")
  364. .IsUnique();
  365. b.ToTable("CustomItemDisplayPreferences");
  366. });
  367. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  368. {
  369. b.Property<int>("Id")
  370. .ValueGeneratedOnAdd()
  371. .HasColumnType("INTEGER");
  372. b.Property<int>("ChromecastVersion")
  373. .HasColumnType("INTEGER");
  374. b.Property<string>("Client")
  375. .IsRequired()
  376. .HasMaxLength(32)
  377. .HasColumnType("TEXT");
  378. b.Property<string>("DashboardTheme")
  379. .HasMaxLength(32)
  380. .HasColumnType("TEXT");
  381. b.Property<bool>("EnableNextVideoInfoOverlay")
  382. .HasColumnType("INTEGER");
  383. b.Property<int?>("IndexBy")
  384. .HasColumnType("INTEGER");
  385. b.Property<Guid>("ItemId")
  386. .HasColumnType("TEXT");
  387. b.Property<int>("ScrollDirection")
  388. .HasColumnType("INTEGER");
  389. b.Property<bool>("ShowBackdrop")
  390. .HasColumnType("INTEGER");
  391. b.Property<bool>("ShowSidebar")
  392. .HasColumnType("INTEGER");
  393. b.Property<int>("SkipBackwardLength")
  394. .HasColumnType("INTEGER");
  395. b.Property<int>("SkipForwardLength")
  396. .HasColumnType("INTEGER");
  397. b.Property<string>("TvHome")
  398. .HasMaxLength(32)
  399. .HasColumnType("TEXT");
  400. b.Property<Guid>("UserId")
  401. .HasColumnType("TEXT");
  402. b.HasKey("Id");
  403. b.HasIndex("UserId", "ItemId", "Client")
  404. .IsUnique();
  405. b.ToTable("DisplayPreferences");
  406. });
  407. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  408. {
  409. b.Property<int>("Id")
  410. .ValueGeneratedOnAdd()
  411. .HasColumnType("INTEGER");
  412. b.Property<int>("DisplayPreferencesId")
  413. .HasColumnType("INTEGER");
  414. b.Property<int>("Order")
  415. .HasColumnType("INTEGER");
  416. b.Property<int>("Type")
  417. .HasColumnType("INTEGER");
  418. b.HasKey("Id");
  419. b.HasIndex("DisplayPreferencesId");
  420. b.ToTable("HomeSection");
  421. });
  422. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  423. {
  424. b.Property<int>("Id")
  425. .ValueGeneratedOnAdd()
  426. .HasColumnType("INTEGER");
  427. b.Property<DateTime>("LastModified")
  428. .HasColumnType("TEXT");
  429. b.Property<string>("Path")
  430. .IsRequired()
  431. .HasMaxLength(512)
  432. .HasColumnType("TEXT");
  433. b.Property<Guid?>("UserId")
  434. .HasColumnType("TEXT");
  435. b.HasKey("Id");
  436. b.HasIndex("UserId")
  437. .IsUnique();
  438. b.ToTable("ImageInfos");
  439. });
  440. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  441. {
  442. b.Property<int>("Id")
  443. .ValueGeneratedOnAdd()
  444. .HasColumnType("INTEGER");
  445. b.Property<string>("Client")
  446. .IsRequired()
  447. .HasMaxLength(32)
  448. .HasColumnType("TEXT");
  449. b.Property<int?>("IndexBy")
  450. .HasColumnType("INTEGER");
  451. b.Property<Guid>("ItemId")
  452. .HasColumnType("TEXT");
  453. b.Property<bool>("RememberIndexing")
  454. .HasColumnType("INTEGER");
  455. b.Property<bool>("RememberSorting")
  456. .HasColumnType("INTEGER");
  457. b.Property<string>("SortBy")
  458. .IsRequired()
  459. .HasMaxLength(64)
  460. .HasColumnType("TEXT");
  461. b.Property<int>("SortOrder")
  462. .HasColumnType("INTEGER");
  463. b.Property<Guid>("UserId")
  464. .HasColumnType("TEXT");
  465. b.Property<int>("ViewType")
  466. .HasColumnType("INTEGER");
  467. b.HasKey("Id");
  468. b.HasIndex("UserId");
  469. b.ToTable("ItemDisplayPreferences");
  470. });
  471. modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
  472. {
  473. b.Property<Guid>("ItemId")
  474. .HasColumnType("TEXT");
  475. b.Property<int>("Type")
  476. .HasColumnType("INTEGER");
  477. b.Property<string>("Value")
  478. .HasColumnType("TEXT");
  479. b.Property<string>("CleanValue")
  480. .IsRequired()
  481. .HasColumnType("TEXT");
  482. b.HasKey("ItemId", "Type", "Value");
  483. b.HasIndex("ItemId", "Type", "CleanValue");
  484. b.ToTable("ItemValues");
  485. });
  486. modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
  487. {
  488. b.Property<Guid>("Id")
  489. .ValueGeneratedOnAdd()
  490. .HasColumnType("TEXT");
  491. b.Property<long>("EndTicks")
  492. .HasColumnType("INTEGER");
  493. b.Property<Guid>("ItemId")
  494. .HasColumnType("TEXT");
  495. b.Property<string>("SegmentProviderId")
  496. .IsRequired()
  497. .HasColumnType("TEXT");
  498. b.Property<long>("StartTicks")
  499. .HasColumnType("INTEGER");
  500. b.Property<int>("Type")
  501. .HasColumnType("INTEGER");
  502. b.HasKey("Id");
  503. b.ToTable("MediaSegments");
  504. });
  505. modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
  506. {
  507. b.Property<Guid>("ItemId")
  508. .HasColumnType("TEXT");
  509. b.Property<int>("StreamIndex")
  510. .HasColumnType("INTEGER");
  511. b.Property<string>("AspectRatio")
  512. .HasColumnType("TEXT");
  513. b.Property<float>("AverageFrameRate")
  514. .HasColumnType("REAL");
  515. b.Property<int>("BitDepth")
  516. .HasColumnType("INTEGER");
  517. b.Property<int>("BitRate")
  518. .HasColumnType("INTEGER");
  519. b.Property<int>("BlPresentFlag")
  520. .HasColumnType("INTEGER");
  521. b.Property<string>("ChannelLayout")
  522. .HasColumnType("TEXT");
  523. b.Property<int>("Channels")
  524. .HasColumnType("INTEGER");
  525. b.Property<string>("Codec")
  526. .HasColumnType("TEXT");
  527. b.Property<string>("CodecTag")
  528. .IsRequired()
  529. .HasColumnType("TEXT");
  530. b.Property<string>("CodecTimeBase")
  531. .IsRequired()
  532. .HasColumnType("TEXT");
  533. b.Property<string>("ColorPrimaries")
  534. .IsRequired()
  535. .HasColumnType("TEXT");
  536. b.Property<string>("ColorSpace")
  537. .IsRequired()
  538. .HasColumnType("TEXT");
  539. b.Property<string>("ColorTransfer")
  540. .IsRequired()
  541. .HasColumnType("TEXT");
  542. b.Property<string>("Comment")
  543. .IsRequired()
  544. .HasColumnType("TEXT");
  545. b.Property<int>("DvBlSignalCompatibilityId")
  546. .HasColumnType("INTEGER");
  547. b.Property<int>("DvLevel")
  548. .HasColumnType("INTEGER");
  549. b.Property<int>("DvProfile")
  550. .HasColumnType("INTEGER");
  551. b.Property<int>("DvVersionMajor")
  552. .HasColumnType("INTEGER");
  553. b.Property<int>("DvVersionMinor")
  554. .HasColumnType("INTEGER");
  555. b.Property<int>("ElPresentFlag")
  556. .HasColumnType("INTEGER");
  557. b.Property<int>("Height")
  558. .HasColumnType("INTEGER");
  559. b.Property<bool>("IsAnamorphic")
  560. .HasColumnType("INTEGER");
  561. b.Property<bool>("IsAvc")
  562. .HasColumnType("INTEGER");
  563. b.Property<bool>("IsDefault")
  564. .HasColumnType("INTEGER");
  565. b.Property<bool>("IsExternal")
  566. .HasColumnType("INTEGER");
  567. b.Property<bool>("IsForced")
  568. .HasColumnType("INTEGER");
  569. b.Property<bool>("IsHearingImpaired")
  570. .HasColumnType("INTEGER");
  571. b.Property<bool>("IsInterlaced")
  572. .HasColumnType("INTEGER");
  573. b.Property<string>("KeyFrames")
  574. .HasColumnType("TEXT");
  575. b.Property<string>("Language")
  576. .HasColumnType("TEXT");
  577. b.Property<float>("Level")
  578. .HasColumnType("REAL");
  579. b.Property<string>("NalLengthSize")
  580. .IsRequired()
  581. .HasColumnType("TEXT");
  582. b.Property<string>("Path")
  583. .HasColumnType("TEXT");
  584. b.Property<string>("PixelFormat")
  585. .HasColumnType("TEXT");
  586. b.Property<string>("Profile")
  587. .HasColumnType("TEXT");
  588. b.Property<float>("RealFrameRate")
  589. .HasColumnType("REAL");
  590. b.Property<int>("RefFrames")
  591. .HasColumnType("INTEGER");
  592. b.Property<int>("Rotation")
  593. .HasColumnType("INTEGER");
  594. b.Property<int>("RpuPresentFlag")
  595. .HasColumnType("INTEGER");
  596. b.Property<int>("SampleRate")
  597. .HasColumnType("INTEGER");
  598. b.Property<string>("StreamType")
  599. .HasColumnType("TEXT");
  600. b.Property<string>("TimeBase")
  601. .IsRequired()
  602. .HasColumnType("TEXT");
  603. b.Property<string>("Title")
  604. .IsRequired()
  605. .HasColumnType("TEXT");
  606. b.Property<int>("Width")
  607. .HasColumnType("INTEGER");
  608. b.HasKey("ItemId", "StreamIndex");
  609. b.HasIndex("StreamIndex");
  610. b.HasIndex("StreamType");
  611. b.HasIndex("StreamIndex", "StreamType");
  612. b.HasIndex("StreamIndex", "StreamType", "Language");
  613. b.ToTable("MediaStreamInfos");
  614. });
  615. modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
  616. {
  617. b.Property<Guid>("ItemId")
  618. .HasColumnType("TEXT");
  619. b.Property<string>("Role")
  620. .HasColumnType("TEXT");
  621. b.Property<int?>("ListOrder")
  622. .HasColumnType("INTEGER");
  623. b.Property<string>("Name")
  624. .IsRequired()
  625. .HasColumnType("TEXT");
  626. b.Property<string>("PersonType")
  627. .HasColumnType("TEXT");
  628. b.Property<int?>("SortOrder")
  629. .HasColumnType("INTEGER");
  630. b.HasKey("ItemId", "Role", "ListOrder");
  631. b.HasIndex("Name");
  632. b.HasIndex("ItemId", "ListOrder");
  633. b.ToTable("Peoples");
  634. });
  635. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  636. {
  637. b.Property<int>("Id")
  638. .ValueGeneratedOnAdd()
  639. .HasColumnType("INTEGER");
  640. b.Property<int>("Kind")
  641. .HasColumnType("INTEGER");
  642. b.Property<Guid?>("Permission_Permissions_Guid")
  643. .HasColumnType("TEXT");
  644. b.Property<uint>("RowVersion")
  645. .IsConcurrencyToken()
  646. .HasColumnType("INTEGER");
  647. b.Property<Guid?>("UserId")
  648. .HasColumnType("TEXT");
  649. b.Property<bool>("Value")
  650. .HasColumnType("INTEGER");
  651. b.HasKey("Id");
  652. b.HasIndex("UserId", "Kind")
  653. .IsUnique()
  654. .HasFilter("[UserId] IS NOT NULL");
  655. b.ToTable("Permissions");
  656. });
  657. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  658. {
  659. b.Property<int>("Id")
  660. .ValueGeneratedOnAdd()
  661. .HasColumnType("INTEGER");
  662. b.Property<int>("Kind")
  663. .HasColumnType("INTEGER");
  664. b.Property<Guid?>("Preference_Preferences_Guid")
  665. .HasColumnType("TEXT");
  666. b.Property<uint>("RowVersion")
  667. .IsConcurrencyToken()
  668. .HasColumnType("INTEGER");
  669. b.Property<Guid?>("UserId")
  670. .HasColumnType("TEXT");
  671. b.Property<string>("Value")
  672. .IsRequired()
  673. .HasMaxLength(65535)
  674. .HasColumnType("TEXT");
  675. b.HasKey("Id");
  676. b.HasIndex("UserId", "Kind")
  677. .IsUnique()
  678. .HasFilter("[UserId] IS NOT NULL");
  679. b.ToTable("Preferences");
  680. });
  681. modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
  682. {
  683. b.Property<int>("Id")
  684. .ValueGeneratedOnAdd()
  685. .HasColumnType("INTEGER");
  686. b.Property<string>("AccessToken")
  687. .IsRequired()
  688. .HasColumnType("TEXT");
  689. b.Property<DateTime>("DateCreated")
  690. .HasColumnType("TEXT");
  691. b.Property<DateTime>("DateLastActivity")
  692. .HasColumnType("TEXT");
  693. b.Property<string>("Name")
  694. .IsRequired()
  695. .HasMaxLength(64)
  696. .HasColumnType("TEXT");
  697. b.HasKey("Id");
  698. b.HasIndex("AccessToken")
  699. .IsUnique();
  700. b.ToTable("ApiKeys");
  701. });
  702. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  703. {
  704. b.Property<int>("Id")
  705. .ValueGeneratedOnAdd()
  706. .HasColumnType("INTEGER");
  707. b.Property<string>("AccessToken")
  708. .IsRequired()
  709. .HasColumnType("TEXT");
  710. b.Property<string>("AppName")
  711. .IsRequired()
  712. .HasMaxLength(64)
  713. .HasColumnType("TEXT");
  714. b.Property<string>("AppVersion")
  715. .IsRequired()
  716. .HasMaxLength(32)
  717. .HasColumnType("TEXT");
  718. b.Property<DateTime>("DateCreated")
  719. .HasColumnType("TEXT");
  720. b.Property<DateTime>("DateLastActivity")
  721. .HasColumnType("TEXT");
  722. b.Property<DateTime>("DateModified")
  723. .HasColumnType("TEXT");
  724. b.Property<string>("DeviceId")
  725. .IsRequired()
  726. .HasMaxLength(256)
  727. .HasColumnType("TEXT");
  728. b.Property<string>("DeviceName")
  729. .IsRequired()
  730. .HasMaxLength(64)
  731. .HasColumnType("TEXT");
  732. b.Property<bool>("IsActive")
  733. .HasColumnType("INTEGER");
  734. b.Property<Guid>("UserId")
  735. .HasColumnType("TEXT");
  736. b.HasKey("Id");
  737. b.HasIndex("DeviceId");
  738. b.HasIndex("AccessToken", "DateLastActivity");
  739. b.HasIndex("DeviceId", "DateLastActivity");
  740. b.HasIndex("UserId", "DeviceId");
  741. b.ToTable("Devices");
  742. });
  743. modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
  744. {
  745. b.Property<int>("Id")
  746. .ValueGeneratedOnAdd()
  747. .HasColumnType("INTEGER");
  748. b.Property<string>("CustomName")
  749. .HasColumnType("TEXT");
  750. b.Property<string>("DeviceId")
  751. .IsRequired()
  752. .HasColumnType("TEXT");
  753. b.HasKey("Id");
  754. b.HasIndex("DeviceId")
  755. .IsUnique();
  756. b.ToTable("DeviceOptions");
  757. });
  758. modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
  759. {
  760. b.Property<Guid>("ItemId")
  761. .HasColumnType("TEXT");
  762. b.Property<int>("Width")
  763. .HasColumnType("INTEGER");
  764. b.Property<int>("Bandwidth")
  765. .HasColumnType("INTEGER");
  766. b.Property<int>("Height")
  767. .HasColumnType("INTEGER");
  768. b.Property<int>("Interval")
  769. .HasColumnType("INTEGER");
  770. b.Property<int>("ThumbnailCount")
  771. .HasColumnType("INTEGER");
  772. b.Property<int>("TileHeight")
  773. .HasColumnType("INTEGER");
  774. b.Property<int>("TileWidth")
  775. .HasColumnType("INTEGER");
  776. b.HasKey("ItemId", "Width");
  777. b.ToTable("TrickplayInfos");
  778. });
  779. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  780. {
  781. b.Property<Guid>("Id")
  782. .ValueGeneratedOnAdd()
  783. .HasColumnType("TEXT");
  784. b.Property<string>("AudioLanguagePreference")
  785. .HasMaxLength(255)
  786. .HasColumnType("TEXT");
  787. b.Property<string>("AuthenticationProviderId")
  788. .IsRequired()
  789. .HasMaxLength(255)
  790. .HasColumnType("TEXT");
  791. b.Property<string>("CastReceiverId")
  792. .HasMaxLength(32)
  793. .HasColumnType("TEXT");
  794. b.Property<bool>("DisplayCollectionsView")
  795. .HasColumnType("INTEGER");
  796. b.Property<bool>("DisplayMissingEpisodes")
  797. .HasColumnType("INTEGER");
  798. b.Property<bool>("EnableAutoLogin")
  799. .HasColumnType("INTEGER");
  800. b.Property<bool>("EnableLocalPassword")
  801. .HasColumnType("INTEGER");
  802. b.Property<bool>("EnableNextEpisodeAutoPlay")
  803. .HasColumnType("INTEGER");
  804. b.Property<bool>("EnableUserPreferenceAccess")
  805. .HasColumnType("INTEGER");
  806. b.Property<bool>("HidePlayedInLatest")
  807. .HasColumnType("INTEGER");
  808. b.Property<long>("InternalId")
  809. .HasColumnType("INTEGER");
  810. b.Property<int>("InvalidLoginAttemptCount")
  811. .HasColumnType("INTEGER");
  812. b.Property<DateTime?>("LastActivityDate")
  813. .HasColumnType("TEXT");
  814. b.Property<DateTime?>("LastLoginDate")
  815. .HasColumnType("TEXT");
  816. b.Property<int?>("LoginAttemptsBeforeLockout")
  817. .HasColumnType("INTEGER");
  818. b.Property<int>("MaxActiveSessions")
  819. .HasColumnType("INTEGER");
  820. b.Property<int?>("MaxParentalAgeRating")
  821. .HasColumnType("INTEGER");
  822. b.Property<bool>("MustUpdatePassword")
  823. .HasColumnType("INTEGER");
  824. b.Property<string>("Password")
  825. .HasMaxLength(65535)
  826. .HasColumnType("TEXT");
  827. b.Property<string>("PasswordResetProviderId")
  828. .IsRequired()
  829. .HasMaxLength(255)
  830. .HasColumnType("TEXT");
  831. b.Property<bool>("PlayDefaultAudioTrack")
  832. .HasColumnType("INTEGER");
  833. b.Property<bool>("RememberAudioSelections")
  834. .HasColumnType("INTEGER");
  835. b.Property<bool>("RememberSubtitleSelections")
  836. .HasColumnType("INTEGER");
  837. b.Property<int?>("RemoteClientBitrateLimit")
  838. .HasColumnType("INTEGER");
  839. b.Property<uint>("RowVersion")
  840. .IsConcurrencyToken()
  841. .HasColumnType("INTEGER");
  842. b.Property<string>("SubtitleLanguagePreference")
  843. .HasMaxLength(255)
  844. .HasColumnType("TEXT");
  845. b.Property<int>("SubtitleMode")
  846. .HasColumnType("INTEGER");
  847. b.Property<int>("SyncPlayAccess")
  848. .HasColumnType("INTEGER");
  849. b.Property<string>("Username")
  850. .IsRequired()
  851. .HasMaxLength(255)
  852. .HasColumnType("TEXT")
  853. .UseCollation("NOCASE");
  854. b.HasKey("Id");
  855. b.HasIndex("Username")
  856. .IsUnique();
  857. b.ToTable("Users");
  858. });
  859. modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
  860. {
  861. b.Property<string>("Key")
  862. .HasColumnType("TEXT");
  863. b.Property<Guid>("UserId")
  864. .HasColumnType("TEXT");
  865. b.Property<int?>("AudioStreamIndex")
  866. .HasColumnType("INTEGER");
  867. b.Property<Guid?>("BaseItemEntityId")
  868. .HasColumnType("TEXT");
  869. b.Property<bool>("IsFavorite")
  870. .HasColumnType("INTEGER");
  871. b.Property<DateTime?>("LastPlayedDate")
  872. .HasColumnType("TEXT");
  873. b.Property<bool?>("Likes")
  874. .HasColumnType("INTEGER");
  875. b.Property<int>("PlayCount")
  876. .HasColumnType("INTEGER");
  877. b.Property<long>("PlaybackPositionTicks")
  878. .HasColumnType("INTEGER");
  879. b.Property<bool>("Played")
  880. .HasColumnType("INTEGER");
  881. b.Property<double?>("Rating")
  882. .HasColumnType("REAL");
  883. b.Property<int?>("SubtitleStreamIndex")
  884. .HasColumnType("INTEGER");
  885. b.HasKey("Key", "UserId");
  886. b.HasIndex("BaseItemEntityId");
  887. b.HasIndex("UserId");
  888. b.HasIndex("Key", "UserId", "IsFavorite");
  889. b.HasIndex("Key", "UserId", "LastPlayedDate");
  890. b.HasIndex("Key", "UserId", "PlaybackPositionTicks");
  891. b.HasIndex("Key", "UserId", "Played");
  892. b.ToTable("UserData");
  893. });
  894. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  895. {
  896. b.HasOne("Jellyfin.Data.Entities.User", null)
  897. .WithMany("AccessSchedules")
  898. .HasForeignKey("UserId")
  899. .OnDelete(DeleteBehavior.Cascade)
  900. .IsRequired();
  901. });
  902. modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
  903. {
  904. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", null)
  905. .WithMany("AncestorIds")
  906. .HasForeignKey("BaseItemEntityId");
  907. });
  908. modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
  909. {
  910. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  911. .WithMany()
  912. .HasForeignKey("ItemId")
  913. .OnDelete(DeleteBehavior.Cascade)
  914. .IsRequired();
  915. b.Navigation("Item");
  916. });
  917. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
  918. {
  919. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  920. .WithMany("Images")
  921. .HasForeignKey("ItemId")
  922. .OnDelete(DeleteBehavior.Cascade)
  923. .IsRequired();
  924. b.Navigation("Item");
  925. });
  926. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
  927. {
  928. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  929. .WithMany("LockedFields")
  930. .HasForeignKey("ItemId")
  931. .OnDelete(DeleteBehavior.Cascade)
  932. .IsRequired();
  933. b.Navigation("Item");
  934. });
  935. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
  936. {
  937. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  938. .WithMany("Provider")
  939. .HasForeignKey("ItemId")
  940. .OnDelete(DeleteBehavior.Cascade)
  941. .IsRequired();
  942. b.Navigation("Item");
  943. });
  944. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
  945. {
  946. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  947. .WithMany("TrailerTypes")
  948. .HasForeignKey("ItemId")
  949. .OnDelete(DeleteBehavior.Cascade)
  950. .IsRequired();
  951. b.Navigation("Item");
  952. });
  953. modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
  954. {
  955. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  956. .WithMany("Chapters")
  957. .HasForeignKey("ItemId")
  958. .OnDelete(DeleteBehavior.Cascade)
  959. .IsRequired();
  960. b.Navigation("Item");
  961. });
  962. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  963. {
  964. b.HasOne("Jellyfin.Data.Entities.User", null)
  965. .WithMany("DisplayPreferences")
  966. .HasForeignKey("UserId")
  967. .OnDelete(DeleteBehavior.Cascade)
  968. .IsRequired();
  969. });
  970. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  971. {
  972. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  973. .WithMany("HomeSections")
  974. .HasForeignKey("DisplayPreferencesId")
  975. .OnDelete(DeleteBehavior.Cascade)
  976. .IsRequired();
  977. });
  978. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  979. {
  980. b.HasOne("Jellyfin.Data.Entities.User", null)
  981. .WithOne("ProfileImage")
  982. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  983. .OnDelete(DeleteBehavior.Cascade);
  984. });
  985. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  986. {
  987. b.HasOne("Jellyfin.Data.Entities.User", null)
  988. .WithMany("ItemDisplayPreferences")
  989. .HasForeignKey("UserId")
  990. .OnDelete(DeleteBehavior.Cascade)
  991. .IsRequired();
  992. });
  993. modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
  994. {
  995. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  996. .WithMany("ItemValues")
  997. .HasForeignKey("ItemId")
  998. .OnDelete(DeleteBehavior.Cascade)
  999. .IsRequired();
  1000. b.Navigation("Item");
  1001. });
  1002. modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
  1003. {
  1004. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  1005. .WithMany("MediaStreams")
  1006. .HasForeignKey("ItemId")
  1007. .OnDelete(DeleteBehavior.Cascade)
  1008. .IsRequired();
  1009. b.Navigation("Item");
  1010. });
  1011. modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
  1012. {
  1013. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
  1014. .WithMany("Peoples")
  1015. .HasForeignKey("ItemId")
  1016. .OnDelete(DeleteBehavior.Cascade)
  1017. .IsRequired();
  1018. b.Navigation("Item");
  1019. });
  1020. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  1021. {
  1022. b.HasOne("Jellyfin.Data.Entities.User", null)
  1023. .WithMany("Permissions")
  1024. .HasForeignKey("UserId")
  1025. .OnDelete(DeleteBehavior.Cascade);
  1026. });
  1027. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  1028. {
  1029. b.HasOne("Jellyfin.Data.Entities.User", null)
  1030. .WithMany("Preferences")
  1031. .HasForeignKey("UserId")
  1032. .OnDelete(DeleteBehavior.Cascade);
  1033. });
  1034. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  1035. {
  1036. b.HasOne("Jellyfin.Data.Entities.User", "User")
  1037. .WithMany()
  1038. .HasForeignKey("UserId")
  1039. .OnDelete(DeleteBehavior.Cascade)
  1040. .IsRequired();
  1041. b.Navigation("User");
  1042. });
  1043. modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
  1044. {
  1045. b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", null)
  1046. .WithMany("UserData")
  1047. .HasForeignKey("BaseItemEntityId");
  1048. b.HasOne("Jellyfin.Data.Entities.User", "User")
  1049. .WithMany()
  1050. .HasForeignKey("UserId")
  1051. .OnDelete(DeleteBehavior.Cascade)
  1052. .IsRequired();
  1053. b.Navigation("User");
  1054. });
  1055. modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
  1056. {
  1057. b.Navigation("AncestorIds");
  1058. b.Navigation("Chapters");
  1059. b.Navigation("Images");
  1060. b.Navigation("ItemValues");
  1061. b.Navigation("LockedFields");
  1062. b.Navigation("MediaStreams");
  1063. b.Navigation("Peoples");
  1064. b.Navigation("Provider");
  1065. b.Navigation("TrailerTypes");
  1066. b.Navigation("UserData");
  1067. });
  1068. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  1069. {
  1070. b.Navigation("HomeSections");
  1071. });
  1072. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  1073. {
  1074. b.Navigation("AccessSchedules");
  1075. b.Navigation("DisplayPreferences");
  1076. b.Navigation("ItemDisplayPreferences");
  1077. b.Navigation("Permissions");
  1078. b.Navigation("Preferences");
  1079. b.Navigation("ProfileImage");
  1080. });
  1081. #pragma warning restore 612, 618
  1082. }
  1083. }
  1084. }