20250127174201_InitMigration.Designer.cs 56 KB

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