JellyfinDbModelSnapshot.cs 57 KB

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