20240606065717_RemoveLastReadRules.Designer.cs 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834
  1. // <auto-generated />
  2. using System;
  3. using Content.Server.Database;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. #nullable disable
  9. namespace Content.Server.Database.Migrations.Sqlite
  10. {
  11. [DbContext(typeof(SqliteServerDbContext))]
  12. [Migration("20240606065717_RemoveLastReadRules")]
  13. partial class RemoveLastReadRules
  14. {
  15. /// <inheritdoc />
  16. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  17. {
  18. #pragma warning disable 612, 618
  19. modelBuilder.HasAnnotation("ProductVersion", "8.0.0");
  20. modelBuilder.Entity("Content.Server.Database.Admin", b =>
  21. {
  22. b.Property<Guid>("UserId")
  23. .ValueGeneratedOnAdd()
  24. .HasColumnType("TEXT")
  25. .HasColumnName("user_id");
  26. b.Property<int?>("AdminRankId")
  27. .HasColumnType("INTEGER")
  28. .HasColumnName("admin_rank_id");
  29. b.Property<string>("Title")
  30. .HasColumnType("TEXT")
  31. .HasColumnName("title");
  32. b.HasKey("UserId")
  33. .HasName("PK_admin");
  34. b.HasIndex("AdminRankId")
  35. .HasDatabaseName("IX_admin_admin_rank_id");
  36. b.ToTable("admin", (string)null);
  37. });
  38. modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
  39. {
  40. b.Property<int>("Id")
  41. .ValueGeneratedOnAdd()
  42. .HasColumnType("INTEGER")
  43. .HasColumnName("admin_flag_id");
  44. b.Property<Guid>("AdminId")
  45. .HasColumnType("TEXT")
  46. .HasColumnName("admin_id");
  47. b.Property<string>("Flag")
  48. .IsRequired()
  49. .HasColumnType("TEXT")
  50. .HasColumnName("flag");
  51. b.Property<bool>("Negative")
  52. .HasColumnType("INTEGER")
  53. .HasColumnName("negative");
  54. b.HasKey("Id")
  55. .HasName("PK_admin_flag");
  56. b.HasIndex("AdminId")
  57. .HasDatabaseName("IX_admin_flag_admin_id");
  58. b.HasIndex("Flag", "AdminId")
  59. .IsUnique();
  60. b.ToTable("admin_flag", (string)null);
  61. });
  62. modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
  63. {
  64. b.Property<int>("RoundId")
  65. .HasColumnType("INTEGER")
  66. .HasColumnName("round_id");
  67. b.Property<int>("Id")
  68. .HasColumnType("INTEGER")
  69. .HasColumnName("admin_log_id");
  70. b.Property<DateTime>("Date")
  71. .HasColumnType("TEXT")
  72. .HasColumnName("date");
  73. b.Property<sbyte>("Impact")
  74. .HasColumnType("INTEGER")
  75. .HasColumnName("impact");
  76. b.Property<string>("Json")
  77. .IsRequired()
  78. .HasColumnType("jsonb")
  79. .HasColumnName("json");
  80. b.Property<string>("Message")
  81. .IsRequired()
  82. .HasColumnType("TEXT")
  83. .HasColumnName("message");
  84. b.Property<int>("Type")
  85. .HasColumnType("INTEGER")
  86. .HasColumnName("type");
  87. b.HasKey("RoundId", "Id")
  88. .HasName("PK_admin_log");
  89. b.HasIndex("Date");
  90. b.HasIndex("Type")
  91. .HasDatabaseName("IX_admin_log_type");
  92. b.ToTable("admin_log", (string)null);
  93. });
  94. modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
  95. {
  96. b.Property<int>("RoundId")
  97. .HasColumnType("INTEGER")
  98. .HasColumnName("round_id");
  99. b.Property<int>("LogId")
  100. .HasColumnType("INTEGER")
  101. .HasColumnName("log_id");
  102. b.Property<Guid>("PlayerUserId")
  103. .HasColumnType("TEXT")
  104. .HasColumnName("player_user_id");
  105. b.HasKey("RoundId", "LogId", "PlayerUserId")
  106. .HasName("PK_admin_log_player");
  107. b.HasIndex("PlayerUserId")
  108. .HasDatabaseName("IX_admin_log_player_player_user_id");
  109. b.ToTable("admin_log_player", (string)null);
  110. });
  111. modelBuilder.Entity("Content.Server.Database.AdminMessage", b =>
  112. {
  113. b.Property<int>("Id")
  114. .ValueGeneratedOnAdd()
  115. .HasColumnType("INTEGER")
  116. .HasColumnName("admin_messages_id");
  117. b.Property<DateTime>("CreatedAt")
  118. .HasColumnType("TEXT")
  119. .HasColumnName("created_at");
  120. b.Property<Guid?>("CreatedById")
  121. .HasColumnType("TEXT")
  122. .HasColumnName("created_by_id");
  123. b.Property<bool>("Deleted")
  124. .HasColumnType("INTEGER")
  125. .HasColumnName("deleted");
  126. b.Property<DateTime?>("DeletedAt")
  127. .HasColumnType("TEXT")
  128. .HasColumnName("deleted_at");
  129. b.Property<Guid?>("DeletedById")
  130. .HasColumnType("TEXT")
  131. .HasColumnName("deleted_by_id");
  132. b.Property<bool>("Dismissed")
  133. .HasColumnType("INTEGER")
  134. .HasColumnName("dismissed");
  135. b.Property<DateTime?>("ExpirationTime")
  136. .HasColumnType("TEXT")
  137. .HasColumnName("expiration_time");
  138. b.Property<DateTime?>("LastEditedAt")
  139. .HasColumnType("TEXT")
  140. .HasColumnName("last_edited_at");
  141. b.Property<Guid?>("LastEditedById")
  142. .HasColumnType("TEXT")
  143. .HasColumnName("last_edited_by_id");
  144. b.Property<string>("Message")
  145. .IsRequired()
  146. .HasMaxLength(4096)
  147. .HasColumnType("TEXT")
  148. .HasColumnName("message");
  149. b.Property<Guid?>("PlayerUserId")
  150. .HasColumnType("TEXT")
  151. .HasColumnName("player_user_id");
  152. b.Property<TimeSpan>("PlaytimeAtNote")
  153. .HasColumnType("TEXT")
  154. .HasColumnName("playtime_at_note");
  155. b.Property<int?>("RoundId")
  156. .HasColumnType("INTEGER")
  157. .HasColumnName("round_id");
  158. b.Property<bool>("Seen")
  159. .HasColumnType("INTEGER")
  160. .HasColumnName("seen");
  161. b.HasKey("Id")
  162. .HasName("PK_admin_messages");
  163. b.HasIndex("CreatedById");
  164. b.HasIndex("DeletedById");
  165. b.HasIndex("LastEditedById");
  166. b.HasIndex("PlayerUserId")
  167. .HasDatabaseName("IX_admin_messages_player_user_id");
  168. b.HasIndex("RoundId")
  169. .HasDatabaseName("IX_admin_messages_round_id");
  170. b.ToTable("admin_messages", null, t =>
  171. {
  172. t.HasCheckConstraint("NotDismissedAndSeen", "NOT dismissed OR seen");
  173. });
  174. });
  175. modelBuilder.Entity("Content.Server.Database.AdminNote", b =>
  176. {
  177. b.Property<int>("Id")
  178. .ValueGeneratedOnAdd()
  179. .HasColumnType("INTEGER")
  180. .HasColumnName("admin_notes_id");
  181. b.Property<DateTime>("CreatedAt")
  182. .HasColumnType("TEXT")
  183. .HasColumnName("created_at");
  184. b.Property<Guid?>("CreatedById")
  185. .HasColumnType("TEXT")
  186. .HasColumnName("created_by_id");
  187. b.Property<bool>("Deleted")
  188. .HasColumnType("INTEGER")
  189. .HasColumnName("deleted");
  190. b.Property<DateTime?>("DeletedAt")
  191. .HasColumnType("TEXT")
  192. .HasColumnName("deleted_at");
  193. b.Property<Guid?>("DeletedById")
  194. .HasColumnType("TEXT")
  195. .HasColumnName("deleted_by_id");
  196. b.Property<DateTime?>("ExpirationTime")
  197. .HasColumnType("TEXT")
  198. .HasColumnName("expiration_time");
  199. b.Property<DateTime?>("LastEditedAt")
  200. .IsRequired()
  201. .HasColumnType("TEXT")
  202. .HasColumnName("last_edited_at");
  203. b.Property<Guid?>("LastEditedById")
  204. .HasColumnType("TEXT")
  205. .HasColumnName("last_edited_by_id");
  206. b.Property<string>("Message")
  207. .IsRequired()
  208. .HasMaxLength(4096)
  209. .HasColumnType("TEXT")
  210. .HasColumnName("message");
  211. b.Property<Guid?>("PlayerUserId")
  212. .HasColumnType("TEXT")
  213. .HasColumnName("player_user_id");
  214. b.Property<TimeSpan>("PlaytimeAtNote")
  215. .HasColumnType("TEXT")
  216. .HasColumnName("playtime_at_note");
  217. b.Property<int?>("RoundId")
  218. .HasColumnType("INTEGER")
  219. .HasColumnName("round_id");
  220. b.Property<bool>("Secret")
  221. .HasColumnType("INTEGER")
  222. .HasColumnName("secret");
  223. b.Property<int>("Severity")
  224. .HasColumnType("INTEGER")
  225. .HasColumnName("severity");
  226. b.HasKey("Id")
  227. .HasName("PK_admin_notes");
  228. b.HasIndex("CreatedById");
  229. b.HasIndex("DeletedById");
  230. b.HasIndex("LastEditedById");
  231. b.HasIndex("PlayerUserId")
  232. .HasDatabaseName("IX_admin_notes_player_user_id");
  233. b.HasIndex("RoundId")
  234. .HasDatabaseName("IX_admin_notes_round_id");
  235. b.ToTable("admin_notes", (string)null);
  236. });
  237. modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
  238. {
  239. b.Property<int>("Id")
  240. .ValueGeneratedOnAdd()
  241. .HasColumnType("INTEGER")
  242. .HasColumnName("admin_rank_id");
  243. b.Property<string>("Name")
  244. .IsRequired()
  245. .HasColumnType("TEXT")
  246. .HasColumnName("name");
  247. b.HasKey("Id")
  248. .HasName("PK_admin_rank");
  249. b.ToTable("admin_rank", (string)null);
  250. });
  251. modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
  252. {
  253. b.Property<int>("Id")
  254. .ValueGeneratedOnAdd()
  255. .HasColumnType("INTEGER")
  256. .HasColumnName("admin_rank_flag_id");
  257. b.Property<int>("AdminRankId")
  258. .HasColumnType("INTEGER")
  259. .HasColumnName("admin_rank_id");
  260. b.Property<string>("Flag")
  261. .IsRequired()
  262. .HasColumnType("TEXT")
  263. .HasColumnName("flag");
  264. b.HasKey("Id")
  265. .HasName("PK_admin_rank_flag");
  266. b.HasIndex("AdminRankId");
  267. b.HasIndex("Flag", "AdminRankId")
  268. .IsUnique();
  269. b.ToTable("admin_rank_flag", (string)null);
  270. });
  271. modelBuilder.Entity("Content.Server.Database.AdminWatchlist", b =>
  272. {
  273. b.Property<int>("Id")
  274. .ValueGeneratedOnAdd()
  275. .HasColumnType("INTEGER")
  276. .HasColumnName("admin_watchlists_id");
  277. b.Property<DateTime>("CreatedAt")
  278. .HasColumnType("TEXT")
  279. .HasColumnName("created_at");
  280. b.Property<Guid?>("CreatedById")
  281. .HasColumnType("TEXT")
  282. .HasColumnName("created_by_id");
  283. b.Property<bool>("Deleted")
  284. .HasColumnType("INTEGER")
  285. .HasColumnName("deleted");
  286. b.Property<DateTime?>("DeletedAt")
  287. .HasColumnType("TEXT")
  288. .HasColumnName("deleted_at");
  289. b.Property<Guid?>("DeletedById")
  290. .HasColumnType("TEXT")
  291. .HasColumnName("deleted_by_id");
  292. b.Property<DateTime?>("ExpirationTime")
  293. .HasColumnType("TEXT")
  294. .HasColumnName("expiration_time");
  295. b.Property<DateTime?>("LastEditedAt")
  296. .IsRequired()
  297. .HasColumnType("TEXT")
  298. .HasColumnName("last_edited_at");
  299. b.Property<Guid?>("LastEditedById")
  300. .HasColumnType("TEXT")
  301. .HasColumnName("last_edited_by_id");
  302. b.Property<string>("Message")
  303. .IsRequired()
  304. .HasMaxLength(4096)
  305. .HasColumnType("TEXT")
  306. .HasColumnName("message");
  307. b.Property<Guid?>("PlayerUserId")
  308. .HasColumnType("TEXT")
  309. .HasColumnName("player_user_id");
  310. b.Property<TimeSpan>("PlaytimeAtNote")
  311. .HasColumnType("TEXT")
  312. .HasColumnName("playtime_at_note");
  313. b.Property<int?>("RoundId")
  314. .HasColumnType("INTEGER")
  315. .HasColumnName("round_id");
  316. b.HasKey("Id")
  317. .HasName("PK_admin_watchlists");
  318. b.HasIndex("CreatedById");
  319. b.HasIndex("DeletedById");
  320. b.HasIndex("LastEditedById");
  321. b.HasIndex("PlayerUserId")
  322. .HasDatabaseName("IX_admin_watchlists_player_user_id");
  323. b.HasIndex("RoundId")
  324. .HasDatabaseName("IX_admin_watchlists_round_id");
  325. b.ToTable("admin_watchlists", (string)null);
  326. });
  327. modelBuilder.Entity("Content.Server.Database.Antag", b =>
  328. {
  329. b.Property<int>("Id")
  330. .ValueGeneratedOnAdd()
  331. .HasColumnType("INTEGER")
  332. .HasColumnName("antag_id");
  333. b.Property<string>("AntagName")
  334. .IsRequired()
  335. .HasColumnType("TEXT")
  336. .HasColumnName("antag_name");
  337. b.Property<int>("ProfileId")
  338. .HasColumnType("INTEGER")
  339. .HasColumnName("profile_id");
  340. b.HasKey("Id")
  341. .HasName("PK_antag");
  342. b.HasIndex("ProfileId", "AntagName")
  343. .IsUnique();
  344. b.ToTable("antag", (string)null);
  345. });
  346. modelBuilder.Entity("Content.Server.Database.AssignedUserId", b =>
  347. {
  348. b.Property<int>("Id")
  349. .ValueGeneratedOnAdd()
  350. .HasColumnType("INTEGER")
  351. .HasColumnName("assigned_user_id_id");
  352. b.Property<Guid>("UserId")
  353. .HasColumnType("TEXT")
  354. .HasColumnName("user_id");
  355. b.Property<string>("UserName")
  356. .IsRequired()
  357. .HasColumnType("TEXT")
  358. .HasColumnName("user_name");
  359. b.HasKey("Id")
  360. .HasName("PK_assigned_user_id");
  361. b.HasIndex("UserId")
  362. .IsUnique();
  363. b.HasIndex("UserName")
  364. .IsUnique();
  365. b.ToTable("assigned_user_id", (string)null);
  366. });
  367. modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
  368. {
  369. b.Property<int>("Id")
  370. .ValueGeneratedOnAdd()
  371. .HasColumnType("INTEGER")
  372. .HasColumnName("connection_log_id");
  373. b.Property<string>("Address")
  374. .IsRequired()
  375. .HasColumnType("TEXT")
  376. .HasColumnName("address");
  377. b.Property<byte?>("Denied")
  378. .HasColumnType("INTEGER")
  379. .HasColumnName("denied");
  380. b.Property<byte[]>("HWId")
  381. .HasColumnType("BLOB")
  382. .HasColumnName("hwid");
  383. b.Property<int>("ServerId")
  384. .ValueGeneratedOnAdd()
  385. .HasColumnType("INTEGER")
  386. .HasDefaultValue(0)
  387. .HasColumnName("server_id");
  388. b.Property<DateTime>("Time")
  389. .HasColumnType("TEXT")
  390. .HasColumnName("time");
  391. b.Property<Guid>("UserId")
  392. .HasColumnType("TEXT")
  393. .HasColumnName("user_id");
  394. b.Property<string>("UserName")
  395. .IsRequired()
  396. .HasColumnType("TEXT")
  397. .HasColumnName("user_name");
  398. b.HasKey("Id")
  399. .HasName("PK_connection_log");
  400. b.HasIndex("ServerId")
  401. .HasDatabaseName("IX_connection_log_server_id");
  402. b.HasIndex("UserId");
  403. b.ToTable("connection_log", (string)null);
  404. });
  405. modelBuilder.Entity("Content.Server.Database.Job", b =>
  406. {
  407. b.Property<int>("Id")
  408. .ValueGeneratedOnAdd()
  409. .HasColumnType("INTEGER")
  410. .HasColumnName("job_id");
  411. b.Property<string>("JobName")
  412. .IsRequired()
  413. .HasColumnType("TEXT")
  414. .HasColumnName("job_name");
  415. b.Property<int>("Priority")
  416. .HasColumnType("INTEGER")
  417. .HasColumnName("priority");
  418. b.Property<int>("ProfileId")
  419. .HasColumnType("INTEGER")
  420. .HasColumnName("profile_id");
  421. b.HasKey("Id")
  422. .HasName("PK_job");
  423. b.HasIndex("ProfileId");
  424. b.HasIndex("ProfileId", "JobName")
  425. .IsUnique();
  426. b.HasIndex(new[] { "ProfileId" }, "IX_job_one_high_priority")
  427. .IsUnique()
  428. .HasFilter("priority = 3");
  429. b.ToTable("job", (string)null);
  430. });
  431. modelBuilder.Entity("Content.Server.Database.PlayTime", b =>
  432. {
  433. b.Property<int>("Id")
  434. .ValueGeneratedOnAdd()
  435. .HasColumnType("INTEGER")
  436. .HasColumnName("play_time_id");
  437. b.Property<Guid>("PlayerId")
  438. .HasColumnType("TEXT")
  439. .HasColumnName("player_id");
  440. b.Property<TimeSpan>("TimeSpent")
  441. .HasColumnType("TEXT")
  442. .HasColumnName("time_spent");
  443. b.Property<string>("Tracker")
  444. .IsRequired()
  445. .HasColumnType("TEXT")
  446. .HasColumnName("tracker");
  447. b.HasKey("Id")
  448. .HasName("PK_play_time");
  449. b.HasIndex("PlayerId", "Tracker")
  450. .IsUnique();
  451. b.ToTable("play_time", (string)null);
  452. });
  453. modelBuilder.Entity("Content.Server.Database.Player", b =>
  454. {
  455. b.Property<int>("Id")
  456. .ValueGeneratedOnAdd()
  457. .HasColumnType("INTEGER")
  458. .HasColumnName("player_id");
  459. b.Property<DateTime>("FirstSeenTime")
  460. .HasColumnType("TEXT")
  461. .HasColumnName("first_seen_time");
  462. b.Property<string>("LastSeenAddress")
  463. .IsRequired()
  464. .HasColumnType("TEXT")
  465. .HasColumnName("last_seen_address");
  466. b.Property<byte[]>("LastSeenHWId")
  467. .HasColumnType("BLOB")
  468. .HasColumnName("last_seen_hwid");
  469. b.Property<DateTime>("LastSeenTime")
  470. .HasColumnType("TEXT")
  471. .HasColumnName("last_seen_time");
  472. b.Property<string>("LastSeenUserName")
  473. .IsRequired()
  474. .HasColumnType("TEXT")
  475. .HasColumnName("last_seen_user_name");
  476. b.Property<Guid>("UserId")
  477. .HasColumnType("TEXT")
  478. .HasColumnName("user_id");
  479. b.HasKey("Id")
  480. .HasName("PK_player");
  481. b.HasAlternateKey("UserId")
  482. .HasName("ak_player_user_id");
  483. b.HasIndex("LastSeenUserName");
  484. b.HasIndex("UserId")
  485. .IsUnique();
  486. b.ToTable("player", (string)null);
  487. });
  488. modelBuilder.Entity("Content.Server.Database.Preference", b =>
  489. {
  490. b.Property<int>("Id")
  491. .ValueGeneratedOnAdd()
  492. .HasColumnType("INTEGER")
  493. .HasColumnName("preference_id");
  494. b.Property<string>("AdminOOCColor")
  495. .IsRequired()
  496. .HasColumnType("TEXT")
  497. .HasColumnName("admin_ooc_color");
  498. b.Property<int>("SelectedCharacterSlot")
  499. .HasColumnType("INTEGER")
  500. .HasColumnName("selected_character_slot");
  501. b.Property<Guid>("UserId")
  502. .HasColumnType("TEXT")
  503. .HasColumnName("user_id");
  504. b.HasKey("Id")
  505. .HasName("PK_preference");
  506. b.HasIndex("UserId")
  507. .IsUnique();
  508. b.ToTable("preference", (string)null);
  509. });
  510. modelBuilder.Entity("Content.Server.Database.Profile", b =>
  511. {
  512. b.Property<int>("Id")
  513. .ValueGeneratedOnAdd()
  514. .HasColumnType("INTEGER")
  515. .HasColumnName("profile_id");
  516. b.Property<int>("Age")
  517. .HasColumnType("INTEGER")
  518. .HasColumnName("age");
  519. b.Property<string>("CharacterName")
  520. .IsRequired()
  521. .HasColumnType("TEXT")
  522. .HasColumnName("char_name");
  523. b.Property<string>("EyeColor")
  524. .IsRequired()
  525. .HasColumnType("TEXT")
  526. .HasColumnName("eye_color");
  527. b.Property<string>("FacialHairColor")
  528. .IsRequired()
  529. .HasColumnType("TEXT")
  530. .HasColumnName("facial_hair_color");
  531. b.Property<string>("FacialHairName")
  532. .IsRequired()
  533. .HasColumnType("TEXT")
  534. .HasColumnName("facial_hair_name");
  535. b.Property<string>("FlavorText")
  536. .IsRequired()
  537. .HasColumnType("TEXT")
  538. .HasColumnName("flavor_text");
  539. b.Property<string>("Gender")
  540. .IsRequired()
  541. .HasColumnType("TEXT")
  542. .HasColumnName("gender");
  543. b.Property<string>("HairColor")
  544. .IsRequired()
  545. .HasColumnType("TEXT")
  546. .HasColumnName("hair_color");
  547. b.Property<string>("HairName")
  548. .IsRequired()
  549. .HasColumnType("TEXT")
  550. .HasColumnName("hair_name");
  551. b.Property<byte[]>("Markings")
  552. .HasColumnType("jsonb")
  553. .HasColumnName("markings");
  554. b.Property<int>("PreferenceId")
  555. .HasColumnType("INTEGER")
  556. .HasColumnName("preference_id");
  557. b.Property<int>("PreferenceUnavailable")
  558. .HasColumnType("INTEGER")
  559. .HasColumnName("pref_unavailable");
  560. b.Property<string>("Sex")
  561. .IsRequired()
  562. .HasColumnType("TEXT")
  563. .HasColumnName("sex");
  564. b.Property<string>("SkinColor")
  565. .IsRequired()
  566. .HasColumnType("TEXT")
  567. .HasColumnName("skin_color");
  568. b.Property<int>("Slot")
  569. .HasColumnType("INTEGER")
  570. .HasColumnName("slot");
  571. b.Property<int>("SpawnPriority")
  572. .HasColumnType("INTEGER")
  573. .HasColumnName("spawn_priority");
  574. b.Property<string>("Species")
  575. .IsRequired()
  576. .HasColumnType("TEXT")
  577. .HasColumnName("species");
  578. b.HasKey("Id")
  579. .HasName("PK_profile");
  580. b.HasIndex("PreferenceId")
  581. .HasDatabaseName("IX_profile_preference_id");
  582. b.HasIndex("Slot", "PreferenceId")
  583. .IsUnique();
  584. b.ToTable("profile", (string)null);
  585. });
  586. modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b =>
  587. {
  588. b.Property<int>("Id")
  589. .ValueGeneratedOnAdd()
  590. .HasColumnType("INTEGER")
  591. .HasColumnName("profile_loadout_id");
  592. b.Property<string>("LoadoutName")
  593. .IsRequired()
  594. .HasColumnType("TEXT")
  595. .HasColumnName("loadout_name");
  596. b.Property<int>("ProfileLoadoutGroupId")
  597. .HasColumnType("INTEGER")
  598. .HasColumnName("profile_loadout_group_id");
  599. b.HasKey("Id")
  600. .HasName("PK_profile_loadout");
  601. b.HasIndex("ProfileLoadoutGroupId");
  602. b.ToTable("profile_loadout", (string)null);
  603. });
  604. modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
  605. {
  606. b.Property<int>("Id")
  607. .ValueGeneratedOnAdd()
  608. .HasColumnType("INTEGER")
  609. .HasColumnName("profile_loadout_group_id");
  610. b.Property<string>("GroupName")
  611. .IsRequired()
  612. .HasColumnType("TEXT")
  613. .HasColumnName("group_name");
  614. b.Property<int>("ProfileRoleLoadoutId")
  615. .HasColumnType("INTEGER")
  616. .HasColumnName("profile_role_loadout_id");
  617. b.HasKey("Id")
  618. .HasName("PK_profile_loadout_group");
  619. b.HasIndex("ProfileRoleLoadoutId");
  620. b.ToTable("profile_loadout_group", (string)null);
  621. });
  622. modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
  623. {
  624. b.Property<int>("Id")
  625. .ValueGeneratedOnAdd()
  626. .HasColumnType("INTEGER")
  627. .HasColumnName("profile_role_loadout_id");
  628. b.Property<int>("ProfileId")
  629. .HasColumnType("INTEGER")
  630. .HasColumnName("profile_id");
  631. b.Property<string>("RoleName")
  632. .IsRequired()
  633. .HasColumnType("TEXT")
  634. .HasColumnName("role_name");
  635. b.HasKey("Id")
  636. .HasName("PK_profile_role_loadout");
  637. b.HasIndex("ProfileId");
  638. b.ToTable("profile_role_loadout", (string)null);
  639. });
  640. modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
  641. {
  642. b.Property<Guid>("PlayerUserId")
  643. .HasColumnType("TEXT")
  644. .HasColumnName("player_user_id");
  645. b.Property<string>("RoleId")
  646. .HasColumnType("TEXT")
  647. .HasColumnName("role_id");
  648. b.HasKey("PlayerUserId", "RoleId")
  649. .HasName("PK_role_whitelists");
  650. b.ToTable("role_whitelists", (string)null);
  651. });
  652. modelBuilder.Entity("Content.Server.Database.Round", b =>
  653. {
  654. b.Property<int>("Id")
  655. .ValueGeneratedOnAdd()
  656. .HasColumnType("INTEGER")
  657. .HasColumnName("round_id");
  658. b.Property<int>("ServerId")
  659. .HasColumnType("INTEGER")
  660. .HasColumnName("server_id");
  661. b.Property<DateTime?>("StartDate")
  662. .HasColumnType("TEXT")
  663. .HasColumnName("start_date");
  664. b.HasKey("Id")
  665. .HasName("PK_round");
  666. b.HasIndex("ServerId")
  667. .HasDatabaseName("IX_round_server_id");
  668. b.HasIndex("StartDate");
  669. b.ToTable("round", (string)null);
  670. });
  671. modelBuilder.Entity("Content.Server.Database.Server", b =>
  672. {
  673. b.Property<int>("Id")
  674. .ValueGeneratedOnAdd()
  675. .HasColumnType("INTEGER")
  676. .HasColumnName("server_id");
  677. b.Property<string>("Name")
  678. .IsRequired()
  679. .HasColumnType("TEXT")
  680. .HasColumnName("name");
  681. b.HasKey("Id")
  682. .HasName("PK_server");
  683. b.ToTable("server", (string)null);
  684. });
  685. modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
  686. {
  687. b.Property<int>("Id")
  688. .ValueGeneratedOnAdd()
  689. .HasColumnType("INTEGER")
  690. .HasColumnName("server_ban_id");
  691. b.Property<string>("Address")
  692. .HasColumnType("TEXT")
  693. .HasColumnName("address");
  694. b.Property<bool>("AutoDelete")
  695. .HasColumnType("INTEGER")
  696. .HasColumnName("auto_delete");
  697. b.Property<DateTime>("BanTime")
  698. .HasColumnType("TEXT")
  699. .HasColumnName("ban_time");
  700. b.Property<Guid?>("BanningAdmin")
  701. .HasColumnType("TEXT")
  702. .HasColumnName("banning_admin");
  703. b.Property<int>("ExemptFlags")
  704. .HasColumnType("INTEGER")
  705. .HasColumnName("exempt_flags");
  706. b.Property<DateTime?>("ExpirationTime")
  707. .HasColumnType("TEXT")
  708. .HasColumnName("expiration_time");
  709. b.Property<byte[]>("HWId")
  710. .HasColumnType("BLOB")
  711. .HasColumnName("hwid");
  712. b.Property<bool>("Hidden")
  713. .HasColumnType("INTEGER")
  714. .HasColumnName("hidden");
  715. b.Property<DateTime?>("LastEditedAt")
  716. .HasColumnType("TEXT")
  717. .HasColumnName("last_edited_at");
  718. b.Property<Guid?>("LastEditedById")
  719. .HasColumnType("TEXT")
  720. .HasColumnName("last_edited_by_id");
  721. b.Property<Guid?>("PlayerUserId")
  722. .HasColumnType("TEXT")
  723. .HasColumnName("player_user_id");
  724. b.Property<TimeSpan>("PlaytimeAtNote")
  725. .HasColumnType("TEXT")
  726. .HasColumnName("playtime_at_note");
  727. b.Property<string>("Reason")
  728. .IsRequired()
  729. .HasColumnType("TEXT")
  730. .HasColumnName("reason");
  731. b.Property<int?>("RoundId")
  732. .HasColumnType("INTEGER")
  733. .HasColumnName("round_id");
  734. b.Property<int>("Severity")
  735. .HasColumnType("INTEGER")
  736. .HasColumnName("severity");
  737. b.HasKey("Id")
  738. .HasName("PK_server_ban");
  739. b.HasIndex("Address");
  740. b.HasIndex("BanningAdmin");
  741. b.HasIndex("LastEditedById");
  742. b.HasIndex("PlayerUserId")
  743. .HasDatabaseName("IX_server_ban_player_user_id");
  744. b.HasIndex("RoundId")
  745. .HasDatabaseName("IX_server_ban_round_id");
  746. b.ToTable("server_ban", null, t =>
  747. {
  748. t.HasCheckConstraint("HaveEitherAddressOrUserIdOrHWId", "address IS NOT NULL OR player_user_id IS NOT NULL OR hwid IS NOT NULL");
  749. });
  750. });
  751. modelBuilder.Entity("Content.Server.Database.ServerBanExemption", b =>
  752. {
  753. b.Property<Guid>("UserId")
  754. .ValueGeneratedOnAdd()
  755. .HasColumnType("TEXT")
  756. .HasColumnName("user_id");
  757. b.Property<int>("Flags")
  758. .HasColumnType("INTEGER")
  759. .HasColumnName("flags");
  760. b.HasKey("UserId")
  761. .HasName("PK_server_ban_exemption");
  762. b.ToTable("server_ban_exemption", null, t =>
  763. {
  764. t.HasCheckConstraint("FlagsNotZero", "flags != 0");
  765. });
  766. });
  767. modelBuilder.Entity("Content.Server.Database.ServerBanHit", b =>
  768. {
  769. b.Property<int>("Id")
  770. .ValueGeneratedOnAdd()
  771. .HasColumnType("INTEGER")
  772. .HasColumnName("server_ban_hit_id");
  773. b.Property<int>("BanId")
  774. .HasColumnType("INTEGER")
  775. .HasColumnName("ban_id");
  776. b.Property<int>("ConnectionId")
  777. .HasColumnType("INTEGER")
  778. .HasColumnName("connection_id");
  779. b.HasKey("Id")
  780. .HasName("PK_server_ban_hit");
  781. b.HasIndex("BanId")
  782. .HasDatabaseName("IX_server_ban_hit_ban_id");
  783. b.HasIndex("ConnectionId")
  784. .HasDatabaseName("IX_server_ban_hit_connection_id");
  785. b.ToTable("server_ban_hit", (string)null);
  786. });
  787. modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
  788. {
  789. b.Property<int>("Id")
  790. .ValueGeneratedOnAdd()
  791. .HasColumnType("INTEGER")
  792. .HasColumnName("server_role_ban_id");
  793. b.Property<string>("Address")
  794. .HasColumnType("TEXT")
  795. .HasColumnName("address");
  796. b.Property<DateTime>("BanTime")
  797. .HasColumnType("TEXT")
  798. .HasColumnName("ban_time");
  799. b.Property<Guid?>("BanningAdmin")
  800. .HasColumnType("TEXT")
  801. .HasColumnName("banning_admin");
  802. b.Property<DateTime?>("ExpirationTime")
  803. .HasColumnType("TEXT")
  804. .HasColumnName("expiration_time");
  805. b.Property<byte[]>("HWId")
  806. .HasColumnType("BLOB")
  807. .HasColumnName("hwid");
  808. b.Property<bool>("Hidden")
  809. .HasColumnType("INTEGER")
  810. .HasColumnName("hidden");
  811. b.Property<DateTime?>("LastEditedAt")
  812. .HasColumnType("TEXT")
  813. .HasColumnName("last_edited_at");
  814. b.Property<Guid?>("LastEditedById")
  815. .HasColumnType("TEXT")
  816. .HasColumnName("last_edited_by_id");
  817. b.Property<Guid?>("PlayerUserId")
  818. .HasColumnType("TEXT")
  819. .HasColumnName("player_user_id");
  820. b.Property<TimeSpan>("PlaytimeAtNote")
  821. .HasColumnType("TEXT")
  822. .HasColumnName("playtime_at_note");
  823. b.Property<string>("Reason")
  824. .IsRequired()
  825. .HasColumnType("TEXT")
  826. .HasColumnName("reason");
  827. b.Property<string>("RoleId")
  828. .IsRequired()
  829. .HasColumnType("TEXT")
  830. .HasColumnName("role_id");
  831. b.Property<int?>("RoundId")
  832. .HasColumnType("INTEGER")
  833. .HasColumnName("round_id");
  834. b.Property<int>("Severity")
  835. .HasColumnType("INTEGER")
  836. .HasColumnName("severity");
  837. b.HasKey("Id")
  838. .HasName("PK_server_role_ban");
  839. b.HasIndex("Address");
  840. b.HasIndex("BanningAdmin");
  841. b.HasIndex("LastEditedById");
  842. b.HasIndex("PlayerUserId")
  843. .HasDatabaseName("IX_server_role_ban_player_user_id");
  844. b.HasIndex("RoundId")
  845. .HasDatabaseName("IX_server_role_ban_round_id");
  846. b.ToTable("server_role_ban", null, t =>
  847. {
  848. t.HasCheckConstraint("HaveEitherAddressOrUserIdOrHWId", "address IS NOT NULL OR player_user_id IS NOT NULL OR hwid IS NOT NULL");
  849. });
  850. });
  851. modelBuilder.Entity("Content.Server.Database.ServerRoleUnban", b =>
  852. {
  853. b.Property<int>("Id")
  854. .ValueGeneratedOnAdd()
  855. .HasColumnType("INTEGER")
  856. .HasColumnName("role_unban_id");
  857. b.Property<int>("BanId")
  858. .HasColumnType("INTEGER")
  859. .HasColumnName("ban_id");
  860. b.Property<DateTime>("UnbanTime")
  861. .HasColumnType("TEXT")
  862. .HasColumnName("unban_time");
  863. b.Property<Guid?>("UnbanningAdmin")
  864. .HasColumnType("TEXT")
  865. .HasColumnName("unbanning_admin");
  866. b.HasKey("Id")
  867. .HasName("PK_server_role_unban");
  868. b.HasIndex("BanId")
  869. .IsUnique();
  870. b.ToTable("server_role_unban", (string)null);
  871. });
  872. modelBuilder.Entity("Content.Server.Database.ServerUnban", b =>
  873. {
  874. b.Property<int>("Id")
  875. .ValueGeneratedOnAdd()
  876. .HasColumnType("INTEGER")
  877. .HasColumnName("unban_id");
  878. b.Property<int>("BanId")
  879. .HasColumnType("INTEGER")
  880. .HasColumnName("ban_id");
  881. b.Property<DateTime>("UnbanTime")
  882. .HasColumnType("TEXT")
  883. .HasColumnName("unban_time");
  884. b.Property<Guid?>("UnbanningAdmin")
  885. .HasColumnType("TEXT")
  886. .HasColumnName("unbanning_admin");
  887. b.HasKey("Id")
  888. .HasName("PK_server_unban");
  889. b.HasIndex("BanId")
  890. .IsUnique();
  891. b.ToTable("server_unban", (string)null);
  892. });
  893. modelBuilder.Entity("Content.Server.Database.Trait", b =>
  894. {
  895. b.Property<int>("Id")
  896. .ValueGeneratedOnAdd()
  897. .HasColumnType("INTEGER")
  898. .HasColumnName("trait_id");
  899. b.Property<int>("ProfileId")
  900. .HasColumnType("INTEGER")
  901. .HasColumnName("profile_id");
  902. b.Property<string>("TraitName")
  903. .IsRequired()
  904. .HasColumnType("TEXT")
  905. .HasColumnName("trait_name");
  906. b.HasKey("Id")
  907. .HasName("PK_trait");
  908. b.HasIndex("ProfileId", "TraitName")
  909. .IsUnique();
  910. b.ToTable("trait", (string)null);
  911. });
  912. modelBuilder.Entity("Content.Server.Database.UploadedResourceLog", b =>
  913. {
  914. b.Property<int>("Id")
  915. .ValueGeneratedOnAdd()
  916. .HasColumnType("INTEGER")
  917. .HasColumnName("uploaded_resource_log_id");
  918. b.Property<byte[]>("Data")
  919. .IsRequired()
  920. .HasColumnType("BLOB")
  921. .HasColumnName("data");
  922. b.Property<DateTime>("Date")
  923. .HasColumnType("TEXT")
  924. .HasColumnName("date");
  925. b.Property<string>("Path")
  926. .IsRequired()
  927. .HasColumnType("TEXT")
  928. .HasColumnName("path");
  929. b.Property<Guid>("UserId")
  930. .HasColumnType("TEXT")
  931. .HasColumnName("user_id");
  932. b.HasKey("Id")
  933. .HasName("PK_uploaded_resource_log");
  934. b.ToTable("uploaded_resource_log", (string)null);
  935. });
  936. modelBuilder.Entity("Content.Server.Database.Whitelist", b =>
  937. {
  938. b.Property<Guid>("UserId")
  939. .ValueGeneratedOnAdd()
  940. .HasColumnType("TEXT")
  941. .HasColumnName("user_id");
  942. b.HasKey("UserId")
  943. .HasName("PK_whitelist");
  944. b.ToTable("whitelist", (string)null);
  945. });
  946. modelBuilder.Entity("PlayerRound", b =>
  947. {
  948. b.Property<int>("PlayersId")
  949. .HasColumnType("INTEGER")
  950. .HasColumnName("players_id");
  951. b.Property<int>("RoundsId")
  952. .HasColumnType("INTEGER")
  953. .HasColumnName("rounds_id");
  954. b.HasKey("PlayersId", "RoundsId")
  955. .HasName("PK_player_round");
  956. b.HasIndex("RoundsId")
  957. .HasDatabaseName("IX_player_round_rounds_id");
  958. b.ToTable("player_round", (string)null);
  959. });
  960. modelBuilder.Entity("Content.Server.Database.Admin", b =>
  961. {
  962. b.HasOne("Content.Server.Database.AdminRank", "AdminRank")
  963. .WithMany("Admins")
  964. .HasForeignKey("AdminRankId")
  965. .OnDelete(DeleteBehavior.SetNull)
  966. .HasConstraintName("FK_admin_admin_rank_admin_rank_id");
  967. b.Navigation("AdminRank");
  968. });
  969. modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
  970. {
  971. b.HasOne("Content.Server.Database.Admin", "Admin")
  972. .WithMany("Flags")
  973. .HasForeignKey("AdminId")
  974. .OnDelete(DeleteBehavior.Cascade)
  975. .IsRequired()
  976. .HasConstraintName("FK_admin_flag_admin_admin_id");
  977. b.Navigation("Admin");
  978. });
  979. modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
  980. {
  981. b.HasOne("Content.Server.Database.Round", "Round")
  982. .WithMany("AdminLogs")
  983. .HasForeignKey("RoundId")
  984. .OnDelete(DeleteBehavior.Cascade)
  985. .IsRequired()
  986. .HasConstraintName("FK_admin_log_round_round_id");
  987. b.Navigation("Round");
  988. });
  989. modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
  990. {
  991. b.HasOne("Content.Server.Database.Player", "Player")
  992. .WithMany("AdminLogs")
  993. .HasForeignKey("PlayerUserId")
  994. .HasPrincipalKey("UserId")
  995. .OnDelete(DeleteBehavior.Cascade)
  996. .IsRequired()
  997. .HasConstraintName("FK_admin_log_player_player_player_user_id");
  998. b.HasOne("Content.Server.Database.AdminLog", "Log")
  999. .WithMany("Players")
  1000. .HasForeignKey("RoundId", "LogId")
  1001. .OnDelete(DeleteBehavior.Cascade)
  1002. .IsRequired()
  1003. .HasConstraintName("FK_admin_log_player_admin_log_round_id_log_id");
  1004. b.Navigation("Log");
  1005. b.Navigation("Player");
  1006. });
  1007. modelBuilder.Entity("Content.Server.Database.AdminMessage", b =>
  1008. {
  1009. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1010. .WithMany("AdminMessagesCreated")
  1011. .HasForeignKey("CreatedById")
  1012. .HasPrincipalKey("UserId")
  1013. .OnDelete(DeleteBehavior.SetNull)
  1014. .HasConstraintName("FK_admin_messages_player_created_by_id");
  1015. b.HasOne("Content.Server.Database.Player", "DeletedBy")
  1016. .WithMany("AdminMessagesDeleted")
  1017. .HasForeignKey("DeletedById")
  1018. .HasPrincipalKey("UserId")
  1019. .OnDelete(DeleteBehavior.SetNull)
  1020. .HasConstraintName("FK_admin_messages_player_deleted_by_id");
  1021. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1022. .WithMany("AdminMessagesLastEdited")
  1023. .HasForeignKey("LastEditedById")
  1024. .HasPrincipalKey("UserId")
  1025. .OnDelete(DeleteBehavior.SetNull)
  1026. .HasConstraintName("FK_admin_messages_player_last_edited_by_id");
  1027. b.HasOne("Content.Server.Database.Player", "Player")
  1028. .WithMany("AdminMessagesReceived")
  1029. .HasForeignKey("PlayerUserId")
  1030. .HasPrincipalKey("UserId")
  1031. .OnDelete(DeleteBehavior.Cascade)
  1032. .HasConstraintName("FK_admin_messages_player_player_user_id");
  1033. b.HasOne("Content.Server.Database.Round", "Round")
  1034. .WithMany()
  1035. .HasForeignKey("RoundId")
  1036. .HasConstraintName("FK_admin_messages_round_round_id");
  1037. b.Navigation("CreatedBy");
  1038. b.Navigation("DeletedBy");
  1039. b.Navigation("LastEditedBy");
  1040. b.Navigation("Player");
  1041. b.Navigation("Round");
  1042. });
  1043. modelBuilder.Entity("Content.Server.Database.AdminNote", b =>
  1044. {
  1045. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1046. .WithMany("AdminNotesCreated")
  1047. .HasForeignKey("CreatedById")
  1048. .HasPrincipalKey("UserId")
  1049. .OnDelete(DeleteBehavior.SetNull)
  1050. .HasConstraintName("FK_admin_notes_player_created_by_id");
  1051. b.HasOne("Content.Server.Database.Player", "DeletedBy")
  1052. .WithMany("AdminNotesDeleted")
  1053. .HasForeignKey("DeletedById")
  1054. .HasPrincipalKey("UserId")
  1055. .OnDelete(DeleteBehavior.SetNull)
  1056. .HasConstraintName("FK_admin_notes_player_deleted_by_id");
  1057. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1058. .WithMany("AdminNotesLastEdited")
  1059. .HasForeignKey("LastEditedById")
  1060. .HasPrincipalKey("UserId")
  1061. .OnDelete(DeleteBehavior.SetNull)
  1062. .HasConstraintName("FK_admin_notes_player_last_edited_by_id");
  1063. b.HasOne("Content.Server.Database.Player", "Player")
  1064. .WithMany("AdminNotesReceived")
  1065. .HasForeignKey("PlayerUserId")
  1066. .HasPrincipalKey("UserId")
  1067. .OnDelete(DeleteBehavior.Cascade)
  1068. .HasConstraintName("FK_admin_notes_player_player_user_id");
  1069. b.HasOne("Content.Server.Database.Round", "Round")
  1070. .WithMany()
  1071. .HasForeignKey("RoundId")
  1072. .HasConstraintName("FK_admin_notes_round_round_id");
  1073. b.Navigation("CreatedBy");
  1074. b.Navigation("DeletedBy");
  1075. b.Navigation("LastEditedBy");
  1076. b.Navigation("Player");
  1077. b.Navigation("Round");
  1078. });
  1079. modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
  1080. {
  1081. b.HasOne("Content.Server.Database.AdminRank", "Rank")
  1082. .WithMany("Flags")
  1083. .HasForeignKey("AdminRankId")
  1084. .OnDelete(DeleteBehavior.Cascade)
  1085. .IsRequired()
  1086. .HasConstraintName("FK_admin_rank_flag_admin_rank_admin_rank_id");
  1087. b.Navigation("Rank");
  1088. });
  1089. modelBuilder.Entity("Content.Server.Database.AdminWatchlist", b =>
  1090. {
  1091. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1092. .WithMany("AdminWatchlistsCreated")
  1093. .HasForeignKey("CreatedById")
  1094. .HasPrincipalKey("UserId")
  1095. .OnDelete(DeleteBehavior.SetNull)
  1096. .HasConstraintName("FK_admin_watchlists_player_created_by_id");
  1097. b.HasOne("Content.Server.Database.Player", "DeletedBy")
  1098. .WithMany("AdminWatchlistsDeleted")
  1099. .HasForeignKey("DeletedById")
  1100. .HasPrincipalKey("UserId")
  1101. .OnDelete(DeleteBehavior.SetNull)
  1102. .HasConstraintName("FK_admin_watchlists_player_deleted_by_id");
  1103. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1104. .WithMany("AdminWatchlistsLastEdited")
  1105. .HasForeignKey("LastEditedById")
  1106. .HasPrincipalKey("UserId")
  1107. .OnDelete(DeleteBehavior.SetNull)
  1108. .HasConstraintName("FK_admin_watchlists_player_last_edited_by_id");
  1109. b.HasOne("Content.Server.Database.Player", "Player")
  1110. .WithMany("AdminWatchlistsReceived")
  1111. .HasForeignKey("PlayerUserId")
  1112. .HasPrincipalKey("UserId")
  1113. .OnDelete(DeleteBehavior.Cascade)
  1114. .HasConstraintName("FK_admin_watchlists_player_player_user_id");
  1115. b.HasOne("Content.Server.Database.Round", "Round")
  1116. .WithMany()
  1117. .HasForeignKey("RoundId")
  1118. .HasConstraintName("FK_admin_watchlists_round_round_id");
  1119. b.Navigation("CreatedBy");
  1120. b.Navigation("DeletedBy");
  1121. b.Navigation("LastEditedBy");
  1122. b.Navigation("Player");
  1123. b.Navigation("Round");
  1124. });
  1125. modelBuilder.Entity("Content.Server.Database.Antag", b =>
  1126. {
  1127. b.HasOne("Content.Server.Database.Profile", "Profile")
  1128. .WithMany("Antags")
  1129. .HasForeignKey("ProfileId")
  1130. .OnDelete(DeleteBehavior.Cascade)
  1131. .IsRequired()
  1132. .HasConstraintName("FK_antag_profile_profile_id");
  1133. b.Navigation("Profile");
  1134. });
  1135. modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
  1136. {
  1137. b.HasOne("Content.Server.Database.Server", "Server")
  1138. .WithMany("ConnectionLogs")
  1139. .HasForeignKey("ServerId")
  1140. .OnDelete(DeleteBehavior.SetNull)
  1141. .IsRequired()
  1142. .HasConstraintName("FK_connection_log_server_server_id");
  1143. b.Navigation("Server");
  1144. });
  1145. modelBuilder.Entity("Content.Server.Database.Job", b =>
  1146. {
  1147. b.HasOne("Content.Server.Database.Profile", "Profile")
  1148. .WithMany("Jobs")
  1149. .HasForeignKey("ProfileId")
  1150. .OnDelete(DeleteBehavior.Cascade)
  1151. .IsRequired()
  1152. .HasConstraintName("FK_job_profile_profile_id");
  1153. b.Navigation("Profile");
  1154. });
  1155. modelBuilder.Entity("Content.Server.Database.Profile", b =>
  1156. {
  1157. b.HasOne("Content.Server.Database.Preference", "Preference")
  1158. .WithMany("Profiles")
  1159. .HasForeignKey("PreferenceId")
  1160. .OnDelete(DeleteBehavior.Cascade)
  1161. .IsRequired()
  1162. .HasConstraintName("FK_profile_preference_preference_id");
  1163. b.Navigation("Preference");
  1164. });
  1165. modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b =>
  1166. {
  1167. b.HasOne("Content.Server.Database.ProfileLoadoutGroup", "ProfileLoadoutGroup")
  1168. .WithMany("Loadouts")
  1169. .HasForeignKey("ProfileLoadoutGroupId")
  1170. .OnDelete(DeleteBehavior.Cascade)
  1171. .IsRequired()
  1172. .HasConstraintName("FK_profile_loadout_profile_loadout_group_profile_loadout_group_id");
  1173. b.Navigation("ProfileLoadoutGroup");
  1174. });
  1175. modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
  1176. {
  1177. b.HasOne("Content.Server.Database.ProfileRoleLoadout", "ProfileRoleLoadout")
  1178. .WithMany("Groups")
  1179. .HasForeignKey("ProfileRoleLoadoutId")
  1180. .OnDelete(DeleteBehavior.Cascade)
  1181. .IsRequired()
  1182. .HasConstraintName("FK_profile_loadout_group_profile_role_loadout_profile_role_loadout_id");
  1183. b.Navigation("ProfileRoleLoadout");
  1184. });
  1185. modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
  1186. {
  1187. b.HasOne("Content.Server.Database.Profile", "Profile")
  1188. .WithMany("Loadouts")
  1189. .HasForeignKey("ProfileId")
  1190. .OnDelete(DeleteBehavior.Cascade)
  1191. .IsRequired()
  1192. .HasConstraintName("FK_profile_role_loadout_profile_profile_id");
  1193. b.Navigation("Profile");
  1194. });
  1195. modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
  1196. {
  1197. b.HasOne("Content.Server.Database.Player", "Player")
  1198. .WithMany("JobWhitelists")
  1199. .HasForeignKey("PlayerUserId")
  1200. .HasPrincipalKey("UserId")
  1201. .OnDelete(DeleteBehavior.Cascade)
  1202. .IsRequired()
  1203. .HasConstraintName("FK_role_whitelists_player_player_user_id");
  1204. b.Navigation("Player");
  1205. });
  1206. modelBuilder.Entity("Content.Server.Database.Round", b =>
  1207. {
  1208. b.HasOne("Content.Server.Database.Server", "Server")
  1209. .WithMany("Rounds")
  1210. .HasForeignKey("ServerId")
  1211. .OnDelete(DeleteBehavior.Cascade)
  1212. .IsRequired()
  1213. .HasConstraintName("FK_round_server_server_id");
  1214. b.Navigation("Server");
  1215. });
  1216. modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
  1217. {
  1218. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1219. .WithMany("AdminServerBansCreated")
  1220. .HasForeignKey("BanningAdmin")
  1221. .HasPrincipalKey("UserId")
  1222. .OnDelete(DeleteBehavior.SetNull)
  1223. .HasConstraintName("FK_server_ban_player_banning_admin");
  1224. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1225. .WithMany("AdminServerBansLastEdited")
  1226. .HasForeignKey("LastEditedById")
  1227. .HasPrincipalKey("UserId")
  1228. .OnDelete(DeleteBehavior.SetNull)
  1229. .HasConstraintName("FK_server_ban_player_last_edited_by_id");
  1230. b.HasOne("Content.Server.Database.Round", "Round")
  1231. .WithMany()
  1232. .HasForeignKey("RoundId")
  1233. .HasConstraintName("FK_server_ban_round_round_id");
  1234. b.Navigation("CreatedBy");
  1235. b.Navigation("LastEditedBy");
  1236. b.Navigation("Round");
  1237. });
  1238. modelBuilder.Entity("Content.Server.Database.ServerBanHit", b =>
  1239. {
  1240. b.HasOne("Content.Server.Database.ServerBan", "Ban")
  1241. .WithMany("BanHits")
  1242. .HasForeignKey("BanId")
  1243. .OnDelete(DeleteBehavior.Cascade)
  1244. .IsRequired()
  1245. .HasConstraintName("FK_server_ban_hit_server_ban_ban_id");
  1246. b.HasOne("Content.Server.Database.ConnectionLog", "Connection")
  1247. .WithMany("BanHits")
  1248. .HasForeignKey("ConnectionId")
  1249. .OnDelete(DeleteBehavior.Cascade)
  1250. .IsRequired()
  1251. .HasConstraintName("FK_server_ban_hit_connection_log_connection_id");
  1252. b.Navigation("Ban");
  1253. b.Navigation("Connection");
  1254. });
  1255. modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
  1256. {
  1257. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1258. .WithMany("AdminServerRoleBansCreated")
  1259. .HasForeignKey("BanningAdmin")
  1260. .HasPrincipalKey("UserId")
  1261. .OnDelete(DeleteBehavior.SetNull)
  1262. .HasConstraintName("FK_server_role_ban_player_banning_admin");
  1263. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1264. .WithMany("AdminServerRoleBansLastEdited")
  1265. .HasForeignKey("LastEditedById")
  1266. .HasPrincipalKey("UserId")
  1267. .OnDelete(DeleteBehavior.SetNull)
  1268. .HasConstraintName("FK_server_role_ban_player_last_edited_by_id");
  1269. b.HasOne("Content.Server.Database.Round", "Round")
  1270. .WithMany()
  1271. .HasForeignKey("RoundId")
  1272. .HasConstraintName("FK_server_role_ban_round_round_id");
  1273. b.Navigation("CreatedBy");
  1274. b.Navigation("LastEditedBy");
  1275. b.Navigation("Round");
  1276. });
  1277. modelBuilder.Entity("Content.Server.Database.ServerRoleUnban", b =>
  1278. {
  1279. b.HasOne("Content.Server.Database.ServerRoleBan", "Ban")
  1280. .WithOne("Unban")
  1281. .HasForeignKey("Content.Server.Database.ServerRoleUnban", "BanId")
  1282. .OnDelete(DeleteBehavior.Cascade)
  1283. .IsRequired()
  1284. .HasConstraintName("FK_server_role_unban_server_role_ban_ban_id");
  1285. b.Navigation("Ban");
  1286. });
  1287. modelBuilder.Entity("Content.Server.Database.ServerUnban", b =>
  1288. {
  1289. b.HasOne("Content.Server.Database.ServerBan", "Ban")
  1290. .WithOne("Unban")
  1291. .HasForeignKey("Content.Server.Database.ServerUnban", "BanId")
  1292. .OnDelete(DeleteBehavior.Cascade)
  1293. .IsRequired()
  1294. .HasConstraintName("FK_server_unban_server_ban_ban_id");
  1295. b.Navigation("Ban");
  1296. });
  1297. modelBuilder.Entity("Content.Server.Database.Trait", b =>
  1298. {
  1299. b.HasOne("Content.Server.Database.Profile", "Profile")
  1300. .WithMany("Traits")
  1301. .HasForeignKey("ProfileId")
  1302. .OnDelete(DeleteBehavior.Cascade)
  1303. .IsRequired()
  1304. .HasConstraintName("FK_trait_profile_profile_id");
  1305. b.Navigation("Profile");
  1306. });
  1307. modelBuilder.Entity("PlayerRound", b =>
  1308. {
  1309. b.HasOne("Content.Server.Database.Player", null)
  1310. .WithMany()
  1311. .HasForeignKey("PlayersId")
  1312. .OnDelete(DeleteBehavior.Cascade)
  1313. .IsRequired()
  1314. .HasConstraintName("FK_player_round_player_players_id");
  1315. b.HasOne("Content.Server.Database.Round", null)
  1316. .WithMany()
  1317. .HasForeignKey("RoundsId")
  1318. .OnDelete(DeleteBehavior.Cascade)
  1319. .IsRequired()
  1320. .HasConstraintName("FK_player_round_round_rounds_id");
  1321. });
  1322. modelBuilder.Entity("Content.Server.Database.Admin", b =>
  1323. {
  1324. b.Navigation("Flags");
  1325. });
  1326. modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
  1327. {
  1328. b.Navigation("Players");
  1329. });
  1330. modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
  1331. {
  1332. b.Navigation("Admins");
  1333. b.Navigation("Flags");
  1334. });
  1335. modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
  1336. {
  1337. b.Navigation("BanHits");
  1338. });
  1339. modelBuilder.Entity("Content.Server.Database.Player", b =>
  1340. {
  1341. b.Navigation("AdminLogs");
  1342. b.Navigation("AdminMessagesCreated");
  1343. b.Navigation("AdminMessagesDeleted");
  1344. b.Navigation("AdminMessagesLastEdited");
  1345. b.Navigation("AdminMessagesReceived");
  1346. b.Navigation("AdminNotesCreated");
  1347. b.Navigation("AdminNotesDeleted");
  1348. b.Navigation("AdminNotesLastEdited");
  1349. b.Navigation("AdminNotesReceived");
  1350. b.Navigation("AdminServerBansCreated");
  1351. b.Navigation("AdminServerBansLastEdited");
  1352. b.Navigation("AdminServerRoleBansCreated");
  1353. b.Navigation("AdminServerRoleBansLastEdited");
  1354. b.Navigation("AdminWatchlistsCreated");
  1355. b.Navigation("AdminWatchlistsDeleted");
  1356. b.Navigation("AdminWatchlistsLastEdited");
  1357. b.Navigation("AdminWatchlistsReceived");
  1358. b.Navigation("JobWhitelists");
  1359. });
  1360. modelBuilder.Entity("Content.Server.Database.Preference", b =>
  1361. {
  1362. b.Navigation("Profiles");
  1363. });
  1364. modelBuilder.Entity("Content.Server.Database.Profile", b =>
  1365. {
  1366. b.Navigation("Antags");
  1367. b.Navigation("Jobs");
  1368. b.Navigation("Loadouts");
  1369. b.Navigation("Traits");
  1370. });
  1371. modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
  1372. {
  1373. b.Navigation("Loadouts");
  1374. });
  1375. modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
  1376. {
  1377. b.Navigation("Groups");
  1378. });
  1379. modelBuilder.Entity("Content.Server.Database.Round", b =>
  1380. {
  1381. b.Navigation("AdminLogs");
  1382. });
  1383. modelBuilder.Entity("Content.Server.Database.Server", b =>
  1384. {
  1385. b.Navigation("ConnectionLogs");
  1386. b.Navigation("Rounds");
  1387. });
  1388. modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
  1389. {
  1390. b.Navigation("BanHits");
  1391. b.Navigation("Unban");
  1392. });
  1393. modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
  1394. {
  1395. b.Navigation("Unban");
  1396. });
  1397. #pragma warning restore 612, 618
  1398. }
  1399. }
  1400. }