20200529171409_AddUsers.Designer.cs 14 KB

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