20200529171409_AddUsers.Designer.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. #pragma warning disable CS1591
  2. // <auto-generated />
  3. using System;
  4. using Jellyfin.Server.Implementations;
  5. using Microsoft.EntityFrameworkCore;
  6. using Microsoft.EntityFrameworkCore.Infrastructure;
  7. using Microsoft.EntityFrameworkCore.Migrations;
  8. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  9. namespace Jellyfin.Server.Implementations.Migrations
  10. {
  11. [DbContext(typeof(JellyfinDb))]
  12. [Migration("20200529171409_AddUsers")]
  13. partial class AddUsers
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasDefaultSchema("jellyfin")
  20. .HasAnnotation("ProductVersion", "3.1.4");
  21. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  22. {
  23. b.Property<int>("Id")
  24. .ValueGeneratedOnAdd()
  25. .HasColumnType("INTEGER");
  26. b.Property<int>("DayOfWeek")
  27. .HasColumnType("INTEGER");
  28. b.Property<double>("EndHour")
  29. .HasColumnType("REAL");
  30. b.Property<double>("StartHour")
  31. .HasColumnType("REAL");
  32. b.Property<Guid>("UserId")
  33. .HasColumnType("TEXT");
  34. b.HasKey("Id");
  35. b.HasIndex("UserId");
  36. b.ToTable("AccessSchedule");
  37. });
  38. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  39. {
  40. b.Property<int>("Id")
  41. .ValueGeneratedOnAdd()
  42. .HasColumnType("INTEGER");
  43. b.Property<DateTime>("DateCreated")
  44. .HasColumnType("TEXT");
  45. b.Property<string>("ItemId")
  46. .HasColumnType("TEXT")
  47. .HasMaxLength(256);
  48. b.Property<int>("LogSeverity")
  49. .HasColumnType("INTEGER");
  50. b.Property<string>("Name")
  51. .IsRequired()
  52. .HasColumnType("TEXT")
  53. .HasMaxLength(512);
  54. b.Property<string>("Overview")
  55. .HasColumnType("TEXT")
  56. .HasMaxLength(512);
  57. b.Property<uint>("RowVersion")
  58. .IsConcurrencyToken()
  59. .HasColumnType("INTEGER");
  60. b.Property<string>("ShortOverview")
  61. .HasColumnType("TEXT")
  62. .HasMaxLength(512);
  63. b.Property<string>("Type")
  64. .IsRequired()
  65. .HasColumnType("TEXT")
  66. .HasMaxLength(256);
  67. b.Property<Guid>("UserId")
  68. .HasColumnType("TEXT");
  69. b.HasKey("Id");
  70. b.ToTable("ActivityLogs");
  71. });
  72. modelBuilder.Entity("Jellyfin.Data.Entities.Group", b =>
  73. {
  74. b.Property<Guid>("Id")
  75. .ValueGeneratedOnAdd()
  76. .HasColumnType("TEXT");
  77. b.Property<Guid?>("Group_Groups_Guid")
  78. .HasColumnType("TEXT");
  79. b.Property<string>("Name")
  80. .IsRequired()
  81. .HasColumnType("TEXT")
  82. .HasMaxLength(255);
  83. b.Property<uint>("RowVersion")
  84. .IsConcurrencyToken()
  85. .HasColumnType("INTEGER");
  86. b.HasKey("Id");
  87. b.HasIndex("Group_Groups_Guid");
  88. b.ToTable("Groups");
  89. });
  90. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  91. {
  92. b.Property<int>("Id")
  93. .ValueGeneratedOnAdd()
  94. .HasColumnType("INTEGER");
  95. b.Property<DateTime>("LastModified")
  96. .HasColumnType("TEXT");
  97. b.Property<string>("Path")
  98. .IsRequired()
  99. .HasColumnType("TEXT")
  100. .HasMaxLength(512);
  101. b.HasKey("Id");
  102. b.ToTable("ImageInfo");
  103. });
  104. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  105. {
  106. b.Property<int>("Id")
  107. .ValueGeneratedOnAdd()
  108. .HasColumnType("INTEGER");
  109. b.Property<int>("Kind")
  110. .HasColumnType("INTEGER");
  111. b.Property<Guid?>("Permission_GroupPermissions_Id")
  112. .HasColumnType("TEXT");
  113. b.Property<Guid?>("Permission_Permissions_Guid")
  114. .HasColumnType("TEXT");
  115. b.Property<uint>("RowVersion")
  116. .IsConcurrencyToken()
  117. .HasColumnType("INTEGER");
  118. b.Property<bool>("Value")
  119. .HasColumnType("INTEGER");
  120. b.HasKey("Id");
  121. b.HasIndex("Permission_GroupPermissions_Id");
  122. b.HasIndex("Permission_Permissions_Guid");
  123. b.ToTable("Permissions");
  124. });
  125. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  126. {
  127. b.Property<int>("Id")
  128. .ValueGeneratedOnAdd()
  129. .HasColumnType("INTEGER");
  130. b.Property<int>("Kind")
  131. .HasColumnType("INTEGER");
  132. b.Property<Guid?>("Preference_Preferences_Guid")
  133. .HasColumnType("TEXT");
  134. b.Property<Guid?>("Preference_Preferences_Id")
  135. .HasColumnType("TEXT");
  136. b.Property<uint>("RowVersion")
  137. .IsConcurrencyToken()
  138. .HasColumnType("INTEGER");
  139. b.Property<string>("Value")
  140. .IsRequired()
  141. .HasColumnType("TEXT")
  142. .HasMaxLength(65535);
  143. b.HasKey("Id");
  144. b.HasIndex("Preference_Preferences_Guid");
  145. b.HasIndex("Preference_Preferences_Id");
  146. b.ToTable("Preferences");
  147. });
  148. modelBuilder.Entity("Jellyfin.Data.Entities.ProviderMapping", b =>
  149. {
  150. b.Property<int>("Id")
  151. .ValueGeneratedOnAdd()
  152. .HasColumnType("INTEGER");
  153. b.Property<string>("ProviderData")
  154. .IsRequired()
  155. .HasColumnType("TEXT")
  156. .HasMaxLength(65535);
  157. b.Property<Guid?>("ProviderMapping_ProviderMappings_Id")
  158. .HasColumnType("TEXT");
  159. b.Property<string>("ProviderName")
  160. .IsRequired()
  161. .HasColumnType("TEXT")
  162. .HasMaxLength(255);
  163. b.Property<string>("ProviderSecrets")
  164. .IsRequired()
  165. .HasColumnType("TEXT")
  166. .HasMaxLength(65535);
  167. b.Property<uint>("RowVersion")
  168. .IsConcurrencyToken()
  169. .HasColumnType("INTEGER");
  170. b.HasKey("Id");
  171. b.HasIndex("ProviderMapping_ProviderMappings_Id");
  172. b.ToTable("ProviderMapping");
  173. });
  174. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  175. {
  176. b.Property<Guid>("Id")
  177. .ValueGeneratedOnAdd()
  178. .HasColumnType("TEXT");
  179. b.Property<string>("AudioLanguagePreference")
  180. .HasColumnType("TEXT")
  181. .HasMaxLength(255);
  182. b.Property<string>("AuthenticationProviderId")
  183. .IsRequired()
  184. .HasColumnType("TEXT")
  185. .HasMaxLength(255);
  186. b.Property<bool>("DisplayCollectionsView")
  187. .HasColumnType("INTEGER");
  188. b.Property<bool>("DisplayMissingEpisodes")
  189. .HasColumnType("INTEGER");
  190. b.Property<string>("EasyPassword")
  191. .HasColumnType("TEXT")
  192. .HasMaxLength(65535);
  193. b.Property<bool>("EnableAutoLogin")
  194. .HasColumnType("INTEGER");
  195. b.Property<bool>("EnableLocalPassword")
  196. .HasColumnType("INTEGER");
  197. b.Property<bool>("EnableNextEpisodeAutoPlay")
  198. .HasColumnType("INTEGER");
  199. b.Property<bool>("EnableUserPreferenceAccess")
  200. .HasColumnType("INTEGER");
  201. b.Property<bool>("HidePlayedInLatest")
  202. .HasColumnType("INTEGER");
  203. b.Property<long>("InternalId")
  204. .HasColumnType("INTEGER");
  205. b.Property<int>("InvalidLoginAttemptCount")
  206. .HasColumnType("INTEGER");
  207. b.Property<DateTime?>("LastActivityDate")
  208. .HasColumnType("TEXT");
  209. b.Property<DateTime?>("LastLoginDate")
  210. .HasColumnType("TEXT");
  211. b.Property<int?>("LoginAttemptsBeforeLockout")
  212. .HasColumnType("INTEGER");
  213. b.Property<int?>("MaxParentalAgeRating")
  214. .HasColumnType("INTEGER");
  215. b.Property<bool>("MustUpdatePassword")
  216. .HasColumnType("INTEGER");
  217. b.Property<string>("Password")
  218. .HasColumnType("TEXT")
  219. .HasMaxLength(65535);
  220. b.Property<string>("PasswordResetProviderId")
  221. .IsRequired()
  222. .HasColumnType("TEXT")
  223. .HasMaxLength(255);
  224. b.Property<bool>("PlayDefaultAudioTrack")
  225. .HasColumnType("INTEGER");
  226. b.Property<int?>("ProfileImageId")
  227. .HasColumnType("INTEGER");
  228. b.Property<bool>("RememberAudioSelections")
  229. .HasColumnType("INTEGER");
  230. b.Property<bool>("RememberSubtitleSelections")
  231. .HasColumnType("INTEGER");
  232. b.Property<int?>("RemoteClientBitrateLimit")
  233. .HasColumnType("INTEGER");
  234. b.Property<uint>("RowVersion")
  235. .IsConcurrencyToken()
  236. .HasColumnType("INTEGER");
  237. b.Property<string>("SubtitleLanguagePreference")
  238. .HasColumnType("TEXT")
  239. .HasMaxLength(255);
  240. b.Property<int>("SubtitleMode")
  241. .HasColumnType("INTEGER");
  242. b.Property<int>("SyncPlayAccess")
  243. .HasColumnType("INTEGER");
  244. b.Property<string>("Username")
  245. .IsRequired()
  246. .HasColumnType("TEXT")
  247. .HasMaxLength(255);
  248. b.HasKey("Id");
  249. b.HasIndex("ProfileImageId");
  250. b.ToTable("Users");
  251. });
  252. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  253. {
  254. b.HasOne("Jellyfin.Data.Entities.User", null)
  255. .WithMany("AccessSchedules")
  256. .HasForeignKey("UserId")
  257. .OnDelete(DeleteBehavior.Cascade)
  258. .IsRequired();
  259. });
  260. modelBuilder.Entity("Jellyfin.Data.Entities.Group", b =>
  261. {
  262. b.HasOne("Jellyfin.Data.Entities.User", null)
  263. .WithMany("Groups")
  264. .HasForeignKey("Group_Groups_Guid");
  265. });
  266. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  267. {
  268. b.HasOne("Jellyfin.Data.Entities.Group", null)
  269. .WithMany("Permissions")
  270. .HasForeignKey("Permission_GroupPermissions_Id");
  271. b.HasOne("Jellyfin.Data.Entities.User", null)
  272. .WithMany("Permissions")
  273. .HasForeignKey("Permission_Permissions_Guid");
  274. });
  275. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  276. {
  277. b.HasOne("Jellyfin.Data.Entities.User", null)
  278. .WithMany("Preferences")
  279. .HasForeignKey("Preference_Preferences_Guid");
  280. b.HasOne("Jellyfin.Data.Entities.Group", null)
  281. .WithMany("Preferences")
  282. .HasForeignKey("Preference_Preferences_Id");
  283. });
  284. modelBuilder.Entity("Jellyfin.Data.Entities.ProviderMapping", b =>
  285. {
  286. b.HasOne("Jellyfin.Data.Entities.Group", null)
  287. .WithMany("ProviderMappings")
  288. .HasForeignKey("ProviderMapping_ProviderMappings_Id");
  289. b.HasOne("Jellyfin.Data.Entities.User", null)
  290. .WithMany("ProviderMappings")
  291. .HasForeignKey("ProviderMapping_ProviderMappings_Id");
  292. });
  293. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  294. {
  295. b.HasOne("Jellyfin.Data.Entities.ImageInfo", "ProfileImage")
  296. .WithMany()
  297. .HasForeignKey("ProfileImageId");
  298. });
  299. #pragma warning restore 612, 618
  300. }
  301. }
  302. }