JellyfinDbModelSnapshot.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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.0");
  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");
  90. b.HasIndex("UserId", "ItemId", "Client", "Key")
  91. .IsUnique();
  92. b.ToTable("CustomItemDisplayPreferences");
  93. });
  94. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  95. {
  96. b.Property<int>("Id")
  97. .ValueGeneratedOnAdd()
  98. .HasColumnType("INTEGER");
  99. b.Property<int>("ChromecastVersion")
  100. .HasColumnType("INTEGER");
  101. b.Property<string>("Client")
  102. .IsRequired()
  103. .HasMaxLength(32)
  104. .HasColumnType("TEXT");
  105. b.Property<string>("DashboardTheme")
  106. .HasMaxLength(32)
  107. .HasColumnType("TEXT");
  108. b.Property<bool>("EnableNextVideoInfoOverlay")
  109. .HasColumnType("INTEGER");
  110. b.Property<int?>("IndexBy")
  111. .HasColumnType("INTEGER");
  112. b.Property<Guid>("ItemId")
  113. .HasColumnType("TEXT");
  114. b.Property<int>("ScrollDirection")
  115. .HasColumnType("INTEGER");
  116. b.Property<bool>("ShowBackdrop")
  117. .HasColumnType("INTEGER");
  118. b.Property<bool>("ShowSidebar")
  119. .HasColumnType("INTEGER");
  120. b.Property<int>("SkipBackwardLength")
  121. .HasColumnType("INTEGER");
  122. b.Property<int>("SkipForwardLength")
  123. .HasColumnType("INTEGER");
  124. b.Property<string>("TvHome")
  125. .HasMaxLength(32)
  126. .HasColumnType("TEXT");
  127. b.Property<Guid>("UserId")
  128. .HasColumnType("TEXT");
  129. b.HasKey("Id");
  130. b.HasIndex("UserId");
  131. b.HasIndex("UserId", "ItemId", "Client")
  132. .IsUnique();
  133. b.ToTable("DisplayPreferences");
  134. });
  135. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  136. {
  137. b.Property<int>("Id")
  138. .ValueGeneratedOnAdd()
  139. .HasColumnType("INTEGER");
  140. b.Property<int>("DisplayPreferencesId")
  141. .HasColumnType("INTEGER");
  142. b.Property<int>("Order")
  143. .HasColumnType("INTEGER");
  144. b.Property<int>("Type")
  145. .HasColumnType("INTEGER");
  146. b.HasKey("Id");
  147. b.HasIndex("DisplayPreferencesId");
  148. b.ToTable("HomeSection");
  149. });
  150. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  151. {
  152. b.Property<int>("Id")
  153. .ValueGeneratedOnAdd()
  154. .HasColumnType("INTEGER");
  155. b.Property<DateTime>("LastModified")
  156. .HasColumnType("TEXT");
  157. b.Property<string>("Path")
  158. .IsRequired()
  159. .HasMaxLength(512)
  160. .HasColumnType("TEXT");
  161. b.Property<Guid?>("UserId")
  162. .HasColumnType("TEXT");
  163. b.HasKey("Id");
  164. b.HasIndex("UserId")
  165. .IsUnique();
  166. b.ToTable("ImageInfos");
  167. });
  168. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  169. {
  170. b.Property<int>("Id")
  171. .ValueGeneratedOnAdd()
  172. .HasColumnType("INTEGER");
  173. b.Property<string>("Client")
  174. .IsRequired()
  175. .HasMaxLength(32)
  176. .HasColumnType("TEXT");
  177. b.Property<int?>("IndexBy")
  178. .HasColumnType("INTEGER");
  179. b.Property<Guid>("ItemId")
  180. .HasColumnType("TEXT");
  181. b.Property<bool>("RememberIndexing")
  182. .HasColumnType("INTEGER");
  183. b.Property<bool>("RememberSorting")
  184. .HasColumnType("INTEGER");
  185. b.Property<string>("SortBy")
  186. .IsRequired()
  187. .HasMaxLength(64)
  188. .HasColumnType("TEXT");
  189. b.Property<int>("SortOrder")
  190. .HasColumnType("INTEGER");
  191. b.Property<Guid>("UserId")
  192. .HasColumnType("TEXT");
  193. b.Property<int>("ViewType")
  194. .HasColumnType("INTEGER");
  195. b.HasKey("Id");
  196. b.HasIndex("UserId");
  197. b.ToTable("ItemDisplayPreferences");
  198. });
  199. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  200. {
  201. b.Property<int>("Id")
  202. .ValueGeneratedOnAdd()
  203. .HasColumnType("INTEGER");
  204. b.Property<int>("Kind")
  205. .HasColumnType("INTEGER");
  206. b.Property<Guid?>("Permission_Permissions_Guid")
  207. .HasColumnType("TEXT");
  208. b.Property<uint>("RowVersion")
  209. .IsConcurrencyToken()
  210. .HasColumnType("INTEGER");
  211. b.Property<bool>("Value")
  212. .HasColumnType("INTEGER");
  213. b.HasKey("Id");
  214. b.HasIndex("Permission_Permissions_Guid");
  215. b.ToTable("Permissions");
  216. });
  217. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  218. {
  219. b.Property<int>("Id")
  220. .ValueGeneratedOnAdd()
  221. .HasColumnType("INTEGER");
  222. b.Property<int>("Kind")
  223. .HasColumnType("INTEGER");
  224. b.Property<Guid?>("Preference_Preferences_Guid")
  225. .HasColumnType("TEXT");
  226. b.Property<uint>("RowVersion")
  227. .IsConcurrencyToken()
  228. .HasColumnType("INTEGER");
  229. b.Property<string>("Value")
  230. .IsRequired()
  231. .HasMaxLength(65535)
  232. .HasColumnType("TEXT");
  233. b.HasKey("Id");
  234. b.HasIndex("Preference_Preferences_Guid");
  235. b.ToTable("Preferences");
  236. });
  237. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  238. {
  239. b.Property<Guid>("Id")
  240. .ValueGeneratedOnAdd()
  241. .HasColumnType("TEXT");
  242. b.Property<string>("AudioLanguagePreference")
  243. .HasMaxLength(255)
  244. .HasColumnType("TEXT");
  245. b.Property<string>("AuthenticationProviderId")
  246. .IsRequired()
  247. .HasMaxLength(255)
  248. .HasColumnType("TEXT");
  249. b.Property<bool>("DisplayCollectionsView")
  250. .HasColumnType("INTEGER");
  251. b.Property<bool>("DisplayMissingEpisodes")
  252. .HasColumnType("INTEGER");
  253. b.Property<string>("EasyPassword")
  254. .HasMaxLength(65535)
  255. .HasColumnType("TEXT");
  256. b.Property<bool>("EnableAutoLogin")
  257. .HasColumnType("INTEGER");
  258. b.Property<bool>("EnableLocalPassword")
  259. .HasColumnType("INTEGER");
  260. b.Property<bool>("EnableNextEpisodeAutoPlay")
  261. .HasColumnType("INTEGER");
  262. b.Property<bool>("EnableUserPreferenceAccess")
  263. .HasColumnType("INTEGER");
  264. b.Property<bool>("HidePlayedInLatest")
  265. .HasColumnType("INTEGER");
  266. b.Property<long>("InternalId")
  267. .HasColumnType("INTEGER");
  268. b.Property<int>("InvalidLoginAttemptCount")
  269. .HasColumnType("INTEGER");
  270. b.Property<DateTime?>("LastActivityDate")
  271. .HasColumnType("TEXT");
  272. b.Property<DateTime?>("LastLoginDate")
  273. .HasColumnType("TEXT");
  274. b.Property<int?>("LoginAttemptsBeforeLockout")
  275. .HasColumnType("INTEGER");
  276. b.Property<int>("MaxActiveSessions")
  277. .HasColumnType("INTEGER");
  278. b.Property<int?>("MaxParentalAgeRating")
  279. .HasColumnType("INTEGER");
  280. b.Property<bool>("MustUpdatePassword")
  281. .HasColumnType("INTEGER");
  282. b.Property<string>("Password")
  283. .HasMaxLength(65535)
  284. .HasColumnType("TEXT");
  285. b.Property<string>("PasswordResetProviderId")
  286. .IsRequired()
  287. .HasMaxLength(255)
  288. .HasColumnType("TEXT");
  289. b.Property<bool>("PlayDefaultAudioTrack")
  290. .HasColumnType("INTEGER");
  291. b.Property<bool>("RememberAudioSelections")
  292. .HasColumnType("INTEGER");
  293. b.Property<bool>("RememberSubtitleSelections")
  294. .HasColumnType("INTEGER");
  295. b.Property<int?>("RemoteClientBitrateLimit")
  296. .HasColumnType("INTEGER");
  297. b.Property<uint>("RowVersion")
  298. .IsConcurrencyToken()
  299. .HasColumnType("INTEGER");
  300. b.Property<string>("SubtitleLanguagePreference")
  301. .HasMaxLength(255)
  302. .HasColumnType("TEXT");
  303. b.Property<int>("SubtitleMode")
  304. .HasColumnType("INTEGER");
  305. b.Property<int>("SyncPlayAccess")
  306. .HasColumnType("INTEGER");
  307. b.Property<string>("Username")
  308. .IsRequired()
  309. .HasMaxLength(255)
  310. .HasColumnType("TEXT");
  311. b.HasKey("Id");
  312. b.ToTable("Users");
  313. });
  314. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  315. {
  316. b.HasOne("Jellyfin.Data.Entities.User", null)
  317. .WithMany("AccessSchedules")
  318. .HasForeignKey("UserId")
  319. .OnDelete(DeleteBehavior.Cascade)
  320. .IsRequired();
  321. });
  322. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  323. {
  324. b.HasOne("Jellyfin.Data.Entities.User", null)
  325. .WithOne("DisplayPreferences")
  326. .HasForeignKey("Jellyfin.Data.Entities.DisplayPreferences", "UserId")
  327. .OnDelete(DeleteBehavior.Cascade)
  328. .IsRequired();
  329. });
  330. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  331. {
  332. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  333. .WithMany("HomeSections")
  334. .HasForeignKey("DisplayPreferencesId")
  335. .OnDelete(DeleteBehavior.Cascade)
  336. .IsRequired();
  337. });
  338. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  339. {
  340. b.HasOne("Jellyfin.Data.Entities.User", null)
  341. .WithOne("ProfileImage")
  342. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId");
  343. });
  344. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  345. {
  346. b.HasOne("Jellyfin.Data.Entities.User", null)
  347. .WithMany("ItemDisplayPreferences")
  348. .HasForeignKey("UserId")
  349. .OnDelete(DeleteBehavior.Cascade)
  350. .IsRequired();
  351. });
  352. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  353. {
  354. b.HasOne("Jellyfin.Data.Entities.User", null)
  355. .WithMany("Permissions")
  356. .HasForeignKey("Permission_Permissions_Guid");
  357. });
  358. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  359. {
  360. b.HasOne("Jellyfin.Data.Entities.User", null)
  361. .WithMany("Preferences")
  362. .HasForeignKey("Preference_Preferences_Guid");
  363. });
  364. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  365. {
  366. b.Navigation("HomeSections");
  367. });
  368. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  369. {
  370. b.Navigation("AccessSchedules");
  371. b.Navigation("DisplayPreferences")
  372. .IsRequired();
  373. b.Navigation("ItemDisplayPreferences");
  374. b.Navigation("Permissions");
  375. b.Navigation("Preferences");
  376. b.Navigation("ProfileImage");
  377. });
  378. #pragma warning restore 612, 618
  379. }
  380. }
  381. }