20241009132112_BaseItemRefactor.Designer.cs 49 KB

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