JellyfinDbModelSnapshot.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  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. namespace Jellyfin.Server.Implementations.Migrations
  8. {
  9. [DbContext(typeof(JellyfinDb))]
  10. partial class JellyfinDbModelSnapshot : ModelSnapshot
  11. {
  12. protected override void BuildModel(ModelBuilder modelBuilder)
  13. {
  14. #pragma warning disable 612, 618
  15. modelBuilder
  16. .HasDefaultSchema("jellyfin")
  17. .HasAnnotation("ProductVersion", "5.0.3");
  18. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  19. {
  20. b.Property<int>("Id")
  21. .ValueGeneratedOnAdd()
  22. .HasColumnType("INTEGER");
  23. b.Property<int>("DayOfWeek")
  24. .HasColumnType("INTEGER");
  25. b.Property<double>("EndHour")
  26. .HasColumnType("REAL");
  27. b.Property<double>("StartHour")
  28. .HasColumnType("REAL");
  29. b.Property<Guid>("UserId")
  30. .HasColumnType("TEXT");
  31. b.HasKey("Id");
  32. b.HasIndex("UserId");
  33. b.ToTable("AccessSchedules");
  34. });
  35. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  36. {
  37. b.Property<int>("Id")
  38. .ValueGeneratedOnAdd()
  39. .HasColumnType("INTEGER");
  40. b.Property<DateTime>("DateCreated")
  41. .HasColumnType("TEXT");
  42. b.Property<string>("ItemId")
  43. .HasMaxLength(256)
  44. .HasColumnType("TEXT");
  45. b.Property<int>("LogSeverity")
  46. .HasColumnType("INTEGER");
  47. b.Property<string>("Name")
  48. .IsRequired()
  49. .HasMaxLength(512)
  50. .HasColumnType("TEXT");
  51. b.Property<string>("Overview")
  52. .HasMaxLength(512)
  53. .HasColumnType("TEXT");
  54. b.Property<uint>("RowVersion")
  55. .IsConcurrencyToken()
  56. .HasColumnType("INTEGER");
  57. b.Property<string>("ShortOverview")
  58. .HasMaxLength(512)
  59. .HasColumnType("TEXT");
  60. b.Property<string>("Type")
  61. .IsRequired()
  62. .HasMaxLength(256)
  63. .HasColumnType("TEXT");
  64. b.Property<Guid>("UserId")
  65. .HasColumnType("TEXT");
  66. b.HasKey("Id");
  67. b.ToTable("ActivityLogs");
  68. });
  69. modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
  70. {
  71. b.Property<int>("Id")
  72. .ValueGeneratedOnAdd()
  73. .HasColumnType("INTEGER");
  74. b.Property<string>("Client")
  75. .IsRequired()
  76. .HasMaxLength(32)
  77. .HasColumnType("TEXT");
  78. b.Property<Guid>("ItemId")
  79. .HasColumnType("TEXT");
  80. b.Property<string>("Key")
  81. .IsRequired()
  82. .HasColumnType("TEXT");
  83. b.Property<Guid>("UserId")
  84. .HasColumnType("TEXT");
  85. b.Property<string>("Value")
  86. .IsRequired()
  87. .HasColumnType("TEXT");
  88. b.HasKey("Id");
  89. b.HasIndex("UserId", "ItemId", "Client", "Key")
  90. .IsUnique();
  91. b.ToTable("CustomItemDisplayPreferences");
  92. });
  93. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  94. {
  95. b.Property<int>("Id")
  96. .ValueGeneratedOnAdd()
  97. .HasColumnType("INTEGER");
  98. b.Property<int>("ChromecastVersion")
  99. .HasColumnType("INTEGER");
  100. b.Property<string>("Client")
  101. .IsRequired()
  102. .HasMaxLength(32)
  103. .HasColumnType("TEXT");
  104. b.Property<string>("DashboardTheme")
  105. .HasMaxLength(32)
  106. .HasColumnType("TEXT");
  107. b.Property<bool>("EnableNextVideoInfoOverlay")
  108. .HasColumnType("INTEGER");
  109. b.Property<int?>("IndexBy")
  110. .HasColumnType("INTEGER");
  111. b.Property<Guid>("ItemId")
  112. .HasColumnType("TEXT");
  113. b.Property<int>("ScrollDirection")
  114. .HasColumnType("INTEGER");
  115. b.Property<bool>("ShowBackdrop")
  116. .HasColumnType("INTEGER");
  117. b.Property<bool>("ShowSidebar")
  118. .HasColumnType("INTEGER");
  119. b.Property<int>("SkipBackwardLength")
  120. .HasColumnType("INTEGER");
  121. b.Property<int>("SkipForwardLength")
  122. .HasColumnType("INTEGER");
  123. b.Property<string>("TvHome")
  124. .HasMaxLength(32)
  125. .HasColumnType("TEXT");
  126. b.Property<Guid>("UserId")
  127. .HasColumnType("TEXT");
  128. b.HasKey("Id");
  129. b.HasIndex("UserId", "ItemId", "Client")
  130. .IsUnique();
  131. b.ToTable("DisplayPreferences");
  132. });
  133. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  134. {
  135. b.Property<int>("Id")
  136. .ValueGeneratedOnAdd()
  137. .HasColumnType("INTEGER");
  138. b.Property<int>("DisplayPreferencesId")
  139. .HasColumnType("INTEGER");
  140. b.Property<int>("Order")
  141. .HasColumnType("INTEGER");
  142. b.Property<int>("Type")
  143. .HasColumnType("INTEGER");
  144. b.HasKey("Id");
  145. b.HasIndex("DisplayPreferencesId");
  146. b.ToTable("HomeSection");
  147. });
  148. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  149. {
  150. b.Property<int>("Id")
  151. .ValueGeneratedOnAdd()
  152. .HasColumnType("INTEGER");
  153. b.Property<DateTime>("LastModified")
  154. .HasColumnType("TEXT");
  155. b.Property<string>("Path")
  156. .IsRequired()
  157. .HasMaxLength(512)
  158. .HasColumnType("TEXT");
  159. b.Property<Guid?>("UserId")
  160. .HasColumnType("TEXT");
  161. b.HasKey("Id");
  162. b.HasIndex("UserId")
  163. .IsUnique();
  164. b.ToTable("ImageInfos");
  165. });
  166. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  167. {
  168. b.Property<int>("Id")
  169. .ValueGeneratedOnAdd()
  170. .HasColumnType("INTEGER");
  171. b.Property<string>("Client")
  172. .IsRequired()
  173. .HasMaxLength(32)
  174. .HasColumnType("TEXT");
  175. b.Property<int?>("IndexBy")
  176. .HasColumnType("INTEGER");
  177. b.Property<Guid>("ItemId")
  178. .HasColumnType("TEXT");
  179. b.Property<bool>("RememberIndexing")
  180. .HasColumnType("INTEGER");
  181. b.Property<bool>("RememberSorting")
  182. .HasColumnType("INTEGER");
  183. b.Property<string>("SortBy")
  184. .IsRequired()
  185. .HasMaxLength(64)
  186. .HasColumnType("TEXT");
  187. b.Property<int>("SortOrder")
  188. .HasColumnType("INTEGER");
  189. b.Property<Guid>("UserId")
  190. .HasColumnType("TEXT");
  191. b.Property<int>("ViewType")
  192. .HasColumnType("INTEGER");
  193. b.HasKey("Id");
  194. b.HasIndex("UserId");
  195. b.ToTable("ItemDisplayPreferences");
  196. });
  197. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  198. {
  199. b.Property<int>("Id")
  200. .ValueGeneratedOnAdd()
  201. .HasColumnType("INTEGER");
  202. b.Property<int>("Kind")
  203. .HasColumnType("INTEGER");
  204. b.Property<Guid?>("Permission_Permissions_Guid")
  205. .HasColumnType("TEXT");
  206. b.Property<uint>("RowVersion")
  207. .IsConcurrencyToken()
  208. .HasColumnType("INTEGER");
  209. b.Property<Guid?>("UserId")
  210. .HasColumnType("TEXT");
  211. b.Property<bool>("Value")
  212. .HasColumnType("INTEGER");
  213. b.HasKey("Id");
  214. b.HasIndex("UserId", "Kind")
  215. .IsUnique()
  216. .HasFilter("[UserId] IS NOT NULL");
  217. b.ToTable("Permissions");
  218. });
  219. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  220. {
  221. b.Property<int>("Id")
  222. .ValueGeneratedOnAdd()
  223. .HasColumnType("INTEGER");
  224. b.Property<int>("Kind")
  225. .HasColumnType("INTEGER");
  226. b.Property<Guid?>("Preference_Preferences_Guid")
  227. .HasColumnType("TEXT");
  228. b.Property<uint>("RowVersion")
  229. .IsConcurrencyToken()
  230. .HasColumnType("INTEGER");
  231. b.Property<Guid?>("UserId")
  232. .HasColumnType("TEXT");
  233. b.Property<string>("Value")
  234. .IsRequired()
  235. .HasMaxLength(65535)
  236. .HasColumnType("TEXT");
  237. b.HasKey("Id");
  238. b.HasIndex("UserId", "Kind")
  239. .IsUnique()
  240. .HasFilter("[UserId] IS NOT NULL");
  241. b.ToTable("Preferences");
  242. });
  243. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  244. {
  245. b.Property<Guid>("Id")
  246. .ValueGeneratedOnAdd()
  247. .HasColumnType("TEXT");
  248. b.Property<string>("AudioLanguagePreference")
  249. .HasMaxLength(255)
  250. .HasColumnType("TEXT");
  251. b.Property<string>("AuthenticationProviderId")
  252. .IsRequired()
  253. .HasMaxLength(255)
  254. .HasColumnType("TEXT");
  255. b.Property<bool>("DisplayCollectionsView")
  256. .HasColumnType("INTEGER");
  257. b.Property<bool>("DisplayMissingEpisodes")
  258. .HasColumnType("INTEGER");
  259. b.Property<string>("EasyPassword")
  260. .HasMaxLength(65535)
  261. .HasColumnType("TEXT");
  262. b.Property<bool>("EnableAutoLogin")
  263. .HasColumnType("INTEGER");
  264. b.Property<bool>("EnableLocalPassword")
  265. .HasColumnType("INTEGER");
  266. b.Property<bool>("EnableNextEpisodeAutoPlay")
  267. .HasColumnType("INTEGER");
  268. b.Property<bool>("EnableUserPreferenceAccess")
  269. .HasColumnType("INTEGER");
  270. b.Property<bool>("HidePlayedInLatest")
  271. .HasColumnType("INTEGER");
  272. b.Property<long>("InternalId")
  273. .HasColumnType("INTEGER");
  274. b.Property<int>("InvalidLoginAttemptCount")
  275. .HasColumnType("INTEGER");
  276. b.Property<DateTime?>("LastActivityDate")
  277. .HasColumnType("TEXT");
  278. b.Property<DateTime?>("LastLoginDate")
  279. .HasColumnType("TEXT");
  280. b.Property<int?>("LoginAttemptsBeforeLockout")
  281. .HasColumnType("INTEGER");
  282. b.Property<int>("MaxActiveSessions")
  283. .HasColumnType("INTEGER");
  284. b.Property<int?>("MaxParentalAgeRating")
  285. .HasColumnType("INTEGER");
  286. b.Property<bool>("MustUpdatePassword")
  287. .HasColumnType("INTEGER");
  288. b.Property<string>("Password")
  289. .HasMaxLength(65535)
  290. .HasColumnType("TEXT");
  291. b.Property<string>("PasswordResetProviderId")
  292. .IsRequired()
  293. .HasMaxLength(255)
  294. .HasColumnType("TEXT");
  295. b.Property<bool>("PlayDefaultAudioTrack")
  296. .HasColumnType("INTEGER");
  297. b.Property<bool>("RememberAudioSelections")
  298. .HasColumnType("INTEGER");
  299. b.Property<bool>("RememberSubtitleSelections")
  300. .HasColumnType("INTEGER");
  301. b.Property<int?>("RemoteClientBitrateLimit")
  302. .HasColumnType("INTEGER");
  303. b.Property<uint>("RowVersion")
  304. .IsConcurrencyToken()
  305. .HasColumnType("INTEGER");
  306. b.Property<string>("SubtitleLanguagePreference")
  307. .HasMaxLength(255)
  308. .HasColumnType("TEXT");
  309. b.Property<int>("SubtitleMode")
  310. .HasColumnType("INTEGER");
  311. b.Property<int>("SyncPlayAccess")
  312. .HasColumnType("INTEGER");
  313. b.Property<string>("Username")
  314. .IsRequired()
  315. .HasMaxLength(255)
  316. .HasColumnType("TEXT")
  317. .UseCollation("NOCASE");
  318. b.HasKey("Id");
  319. b.HasIndex("Username")
  320. .IsUnique();
  321. b.ToTable("Users");
  322. });
  323. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  324. {
  325. b.HasOne("Jellyfin.Data.Entities.User", null)
  326. .WithMany("AccessSchedules")
  327. .HasForeignKey("UserId")
  328. .OnDelete(DeleteBehavior.Cascade)
  329. .IsRequired();
  330. });
  331. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  332. {
  333. b.HasOne("Jellyfin.Data.Entities.User", null)
  334. .WithMany("DisplayPreferences")
  335. .HasForeignKey("UserId")
  336. .OnDelete(DeleteBehavior.Cascade)
  337. .IsRequired();
  338. });
  339. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  340. {
  341. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  342. .WithMany("HomeSections")
  343. .HasForeignKey("DisplayPreferencesId")
  344. .OnDelete(DeleteBehavior.Cascade)
  345. .IsRequired();
  346. });
  347. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  348. {
  349. b.HasOne("Jellyfin.Data.Entities.User", null)
  350. .WithOne("ProfileImage")
  351. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  352. .OnDelete(DeleteBehavior.Cascade);
  353. });
  354. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  355. {
  356. b.HasOne("Jellyfin.Data.Entities.User", null)
  357. .WithMany("ItemDisplayPreferences")
  358. .HasForeignKey("UserId")
  359. .OnDelete(DeleteBehavior.Cascade)
  360. .IsRequired();
  361. });
  362. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  363. {
  364. b.HasOne("Jellyfin.Data.Entities.User", null)
  365. .WithMany("Permissions")
  366. .HasForeignKey("UserId")
  367. .OnDelete(DeleteBehavior.Cascade);
  368. });
  369. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  370. {
  371. b.HasOne("Jellyfin.Data.Entities.User", null)
  372. .WithMany("Preferences")
  373. .HasForeignKey("UserId")
  374. .OnDelete(DeleteBehavior.Cascade);
  375. });
  376. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  377. {
  378. b.Navigation("HomeSections");
  379. });
  380. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  381. {
  382. b.Navigation("AccessSchedules");
  383. b.Navigation("DisplayPreferences");
  384. b.Navigation("ItemDisplayPreferences");
  385. b.Navigation("Permissions");
  386. b.Navigation("Preferences");
  387. b.Navigation("ProfileImage");
  388. });
  389. #pragma warning restore 612, 618
  390. }
  391. }
  392. }