JellyfinDbContextModelSnapshot.cs 56 KB

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