20240621120705_ConnectionLogTimeIndex.Designer.cs 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840
  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("20240621120705_ConnectionLogTimeIndex")]
  13. partial class ConnectionLogTimeIndex
  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("Time");
  403. b.HasIndex("UserId");
  404. b.ToTable("connection_log", (string)null);
  405. });
  406. modelBuilder.Entity("Content.Server.Database.Job", b =>
  407. {
  408. b.Property<int>("Id")
  409. .ValueGeneratedOnAdd()
  410. .HasColumnType("INTEGER")
  411. .HasColumnName("job_id");
  412. b.Property<string>("JobName")
  413. .IsRequired()
  414. .HasColumnType("TEXT")
  415. .HasColumnName("job_name");
  416. b.Property<int>("Priority")
  417. .HasColumnType("INTEGER")
  418. .HasColumnName("priority");
  419. b.Property<int>("ProfileId")
  420. .HasColumnType("INTEGER")
  421. .HasColumnName("profile_id");
  422. b.HasKey("Id")
  423. .HasName("PK_job");
  424. b.HasIndex("ProfileId");
  425. b.HasIndex("ProfileId", "JobName")
  426. .IsUnique();
  427. b.HasIndex(new[] { "ProfileId" }, "IX_job_one_high_priority")
  428. .IsUnique()
  429. .HasFilter("priority = 3");
  430. b.ToTable("job", (string)null);
  431. });
  432. modelBuilder.Entity("Content.Server.Database.PlayTime", b =>
  433. {
  434. b.Property<int>("Id")
  435. .ValueGeneratedOnAdd()
  436. .HasColumnType("INTEGER")
  437. .HasColumnName("play_time_id");
  438. b.Property<Guid>("PlayerId")
  439. .HasColumnType("TEXT")
  440. .HasColumnName("player_id");
  441. b.Property<TimeSpan>("TimeSpent")
  442. .HasColumnType("TEXT")
  443. .HasColumnName("time_spent");
  444. b.Property<string>("Tracker")
  445. .IsRequired()
  446. .HasColumnType("TEXT")
  447. .HasColumnName("tracker");
  448. b.HasKey("Id")
  449. .HasName("PK_play_time");
  450. b.HasIndex("PlayerId", "Tracker")
  451. .IsUnique();
  452. b.ToTable("play_time", (string)null);
  453. });
  454. modelBuilder.Entity("Content.Server.Database.Player", b =>
  455. {
  456. b.Property<int>("Id")
  457. .ValueGeneratedOnAdd()
  458. .HasColumnType("INTEGER")
  459. .HasColumnName("player_id");
  460. b.Property<DateTime>("FirstSeenTime")
  461. .HasColumnType("TEXT")
  462. .HasColumnName("first_seen_time");
  463. b.Property<DateTime?>("LastReadRules")
  464. .HasColumnType("TEXT")
  465. .HasColumnName("last_read_rules");
  466. b.Property<string>("LastSeenAddress")
  467. .IsRequired()
  468. .HasColumnType("TEXT")
  469. .HasColumnName("last_seen_address");
  470. b.Property<byte[]>("LastSeenHWId")
  471. .HasColumnType("BLOB")
  472. .HasColumnName("last_seen_hwid");
  473. b.Property<DateTime>("LastSeenTime")
  474. .HasColumnType("TEXT")
  475. .HasColumnName("last_seen_time");
  476. b.Property<string>("LastSeenUserName")
  477. .IsRequired()
  478. .HasColumnType("TEXT")
  479. .HasColumnName("last_seen_user_name");
  480. b.Property<Guid>("UserId")
  481. .HasColumnType("TEXT")
  482. .HasColumnName("user_id");
  483. b.HasKey("Id")
  484. .HasName("PK_player");
  485. b.HasAlternateKey("UserId")
  486. .HasName("ak_player_user_id");
  487. b.HasIndex("LastSeenUserName");
  488. b.HasIndex("UserId")
  489. .IsUnique();
  490. b.ToTable("player", (string)null);
  491. });
  492. modelBuilder.Entity("Content.Server.Database.Preference", b =>
  493. {
  494. b.Property<int>("Id")
  495. .ValueGeneratedOnAdd()
  496. .HasColumnType("INTEGER")
  497. .HasColumnName("preference_id");
  498. b.Property<string>("AdminOOCColor")
  499. .IsRequired()
  500. .HasColumnType("TEXT")
  501. .HasColumnName("admin_ooc_color");
  502. b.Property<int>("SelectedCharacterSlot")
  503. .HasColumnType("INTEGER")
  504. .HasColumnName("selected_character_slot");
  505. b.Property<Guid>("UserId")
  506. .HasColumnType("TEXT")
  507. .HasColumnName("user_id");
  508. b.HasKey("Id")
  509. .HasName("PK_preference");
  510. b.HasIndex("UserId")
  511. .IsUnique();
  512. b.ToTable("preference", (string)null);
  513. });
  514. modelBuilder.Entity("Content.Server.Database.Profile", b =>
  515. {
  516. b.Property<int>("Id")
  517. .ValueGeneratedOnAdd()
  518. .HasColumnType("INTEGER")
  519. .HasColumnName("profile_id");
  520. b.Property<int>("Age")
  521. .HasColumnType("INTEGER")
  522. .HasColumnName("age");
  523. b.Property<string>("CharacterName")
  524. .IsRequired()
  525. .HasColumnType("TEXT")
  526. .HasColumnName("char_name");
  527. b.Property<string>("EyeColor")
  528. .IsRequired()
  529. .HasColumnType("TEXT")
  530. .HasColumnName("eye_color");
  531. b.Property<string>("FacialHairColor")
  532. .IsRequired()
  533. .HasColumnType("TEXT")
  534. .HasColumnName("facial_hair_color");
  535. b.Property<string>("FacialHairName")
  536. .IsRequired()
  537. .HasColumnType("TEXT")
  538. .HasColumnName("facial_hair_name");
  539. b.Property<string>("FlavorText")
  540. .IsRequired()
  541. .HasColumnType("TEXT")
  542. .HasColumnName("flavor_text");
  543. b.Property<string>("Gender")
  544. .IsRequired()
  545. .HasColumnType("TEXT")
  546. .HasColumnName("gender");
  547. b.Property<string>("HairColor")
  548. .IsRequired()
  549. .HasColumnType("TEXT")
  550. .HasColumnName("hair_color");
  551. b.Property<string>("HairName")
  552. .IsRequired()
  553. .HasColumnType("TEXT")
  554. .HasColumnName("hair_name");
  555. b.Property<byte[]>("Markings")
  556. .HasColumnType("jsonb")
  557. .HasColumnName("markings");
  558. b.Property<int>("PreferenceId")
  559. .HasColumnType("INTEGER")
  560. .HasColumnName("preference_id");
  561. b.Property<int>("PreferenceUnavailable")
  562. .HasColumnType("INTEGER")
  563. .HasColumnName("pref_unavailable");
  564. b.Property<string>("Sex")
  565. .IsRequired()
  566. .HasColumnType("TEXT")
  567. .HasColumnName("sex");
  568. b.Property<string>("SkinColor")
  569. .IsRequired()
  570. .HasColumnType("TEXT")
  571. .HasColumnName("skin_color");
  572. b.Property<int>("Slot")
  573. .HasColumnType("INTEGER")
  574. .HasColumnName("slot");
  575. b.Property<int>("SpawnPriority")
  576. .HasColumnType("INTEGER")
  577. .HasColumnName("spawn_priority");
  578. b.Property<string>("Species")
  579. .IsRequired()
  580. .HasColumnType("TEXT")
  581. .HasColumnName("species");
  582. b.HasKey("Id")
  583. .HasName("PK_profile");
  584. b.HasIndex("PreferenceId")
  585. .HasDatabaseName("IX_profile_preference_id");
  586. b.HasIndex("Slot", "PreferenceId")
  587. .IsUnique();
  588. b.ToTable("profile", (string)null);
  589. });
  590. modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b =>
  591. {
  592. b.Property<int>("Id")
  593. .ValueGeneratedOnAdd()
  594. .HasColumnType("INTEGER")
  595. .HasColumnName("profile_loadout_id");
  596. b.Property<string>("LoadoutName")
  597. .IsRequired()
  598. .HasColumnType("TEXT")
  599. .HasColumnName("loadout_name");
  600. b.Property<int>("ProfileLoadoutGroupId")
  601. .HasColumnType("INTEGER")
  602. .HasColumnName("profile_loadout_group_id");
  603. b.HasKey("Id")
  604. .HasName("PK_profile_loadout");
  605. b.HasIndex("ProfileLoadoutGroupId");
  606. b.ToTable("profile_loadout", (string)null);
  607. });
  608. modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
  609. {
  610. b.Property<int>("Id")
  611. .ValueGeneratedOnAdd()
  612. .HasColumnType("INTEGER")
  613. .HasColumnName("profile_loadout_group_id");
  614. b.Property<string>("GroupName")
  615. .IsRequired()
  616. .HasColumnType("TEXT")
  617. .HasColumnName("group_name");
  618. b.Property<int>("ProfileRoleLoadoutId")
  619. .HasColumnType("INTEGER")
  620. .HasColumnName("profile_role_loadout_id");
  621. b.HasKey("Id")
  622. .HasName("PK_profile_loadout_group");
  623. b.HasIndex("ProfileRoleLoadoutId");
  624. b.ToTable("profile_loadout_group", (string)null);
  625. });
  626. modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
  627. {
  628. b.Property<int>("Id")
  629. .ValueGeneratedOnAdd()
  630. .HasColumnType("INTEGER")
  631. .HasColumnName("profile_role_loadout_id");
  632. b.Property<int>("ProfileId")
  633. .HasColumnType("INTEGER")
  634. .HasColumnName("profile_id");
  635. b.Property<string>("RoleName")
  636. .IsRequired()
  637. .HasColumnType("TEXT")
  638. .HasColumnName("role_name");
  639. b.HasKey("Id")
  640. .HasName("PK_profile_role_loadout");
  641. b.HasIndex("ProfileId");
  642. b.ToTable("profile_role_loadout", (string)null);
  643. });
  644. modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
  645. {
  646. b.Property<Guid>("PlayerUserId")
  647. .HasColumnType("TEXT")
  648. .HasColumnName("player_user_id");
  649. b.Property<string>("RoleId")
  650. .HasColumnType("TEXT")
  651. .HasColumnName("role_id");
  652. b.HasKey("PlayerUserId", "RoleId")
  653. .HasName("PK_role_whitelists");
  654. b.ToTable("role_whitelists", (string)null);
  655. });
  656. modelBuilder.Entity("Content.Server.Database.Round", b =>
  657. {
  658. b.Property<int>("Id")
  659. .ValueGeneratedOnAdd()
  660. .HasColumnType("INTEGER")
  661. .HasColumnName("round_id");
  662. b.Property<int>("ServerId")
  663. .HasColumnType("INTEGER")
  664. .HasColumnName("server_id");
  665. b.Property<DateTime?>("StartDate")
  666. .HasColumnType("TEXT")
  667. .HasColumnName("start_date");
  668. b.HasKey("Id")
  669. .HasName("PK_round");
  670. b.HasIndex("ServerId")
  671. .HasDatabaseName("IX_round_server_id");
  672. b.HasIndex("StartDate");
  673. b.ToTable("round", (string)null);
  674. });
  675. modelBuilder.Entity("Content.Server.Database.Server", b =>
  676. {
  677. b.Property<int>("Id")
  678. .ValueGeneratedOnAdd()
  679. .HasColumnType("INTEGER")
  680. .HasColumnName("server_id");
  681. b.Property<string>("Name")
  682. .IsRequired()
  683. .HasColumnType("TEXT")
  684. .HasColumnName("name");
  685. b.HasKey("Id")
  686. .HasName("PK_server");
  687. b.ToTable("server", (string)null);
  688. });
  689. modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
  690. {
  691. b.Property<int>("Id")
  692. .ValueGeneratedOnAdd()
  693. .HasColumnType("INTEGER")
  694. .HasColumnName("server_ban_id");
  695. b.Property<string>("Address")
  696. .HasColumnType("TEXT")
  697. .HasColumnName("address");
  698. b.Property<bool>("AutoDelete")
  699. .HasColumnType("INTEGER")
  700. .HasColumnName("auto_delete");
  701. b.Property<DateTime>("BanTime")
  702. .HasColumnType("TEXT")
  703. .HasColumnName("ban_time");
  704. b.Property<Guid?>("BanningAdmin")
  705. .HasColumnType("TEXT")
  706. .HasColumnName("banning_admin");
  707. b.Property<int>("ExemptFlags")
  708. .HasColumnType("INTEGER")
  709. .HasColumnName("exempt_flags");
  710. b.Property<DateTime?>("ExpirationTime")
  711. .HasColumnType("TEXT")
  712. .HasColumnName("expiration_time");
  713. b.Property<byte[]>("HWId")
  714. .HasColumnType("BLOB")
  715. .HasColumnName("hwid");
  716. b.Property<bool>("Hidden")
  717. .HasColumnType("INTEGER")
  718. .HasColumnName("hidden");
  719. b.Property<DateTime?>("LastEditedAt")
  720. .HasColumnType("TEXT")
  721. .HasColumnName("last_edited_at");
  722. b.Property<Guid?>("LastEditedById")
  723. .HasColumnType("TEXT")
  724. .HasColumnName("last_edited_by_id");
  725. b.Property<Guid?>("PlayerUserId")
  726. .HasColumnType("TEXT")
  727. .HasColumnName("player_user_id");
  728. b.Property<TimeSpan>("PlaytimeAtNote")
  729. .HasColumnType("TEXT")
  730. .HasColumnName("playtime_at_note");
  731. b.Property<string>("Reason")
  732. .IsRequired()
  733. .HasColumnType("TEXT")
  734. .HasColumnName("reason");
  735. b.Property<int?>("RoundId")
  736. .HasColumnType("INTEGER")
  737. .HasColumnName("round_id");
  738. b.Property<int>("Severity")
  739. .HasColumnType("INTEGER")
  740. .HasColumnName("severity");
  741. b.HasKey("Id")
  742. .HasName("PK_server_ban");
  743. b.HasIndex("Address");
  744. b.HasIndex("BanningAdmin");
  745. b.HasIndex("LastEditedById");
  746. b.HasIndex("PlayerUserId")
  747. .HasDatabaseName("IX_server_ban_player_user_id");
  748. b.HasIndex("RoundId")
  749. .HasDatabaseName("IX_server_ban_round_id");
  750. b.ToTable("server_ban", null, t =>
  751. {
  752. t.HasCheckConstraint("HaveEitherAddressOrUserIdOrHWId", "address IS NOT NULL OR player_user_id IS NOT NULL OR hwid IS NOT NULL");
  753. });
  754. });
  755. modelBuilder.Entity("Content.Server.Database.ServerBanExemption", b =>
  756. {
  757. b.Property<Guid>("UserId")
  758. .ValueGeneratedOnAdd()
  759. .HasColumnType("TEXT")
  760. .HasColumnName("user_id");
  761. b.Property<int>("Flags")
  762. .HasColumnType("INTEGER")
  763. .HasColumnName("flags");
  764. b.HasKey("UserId")
  765. .HasName("PK_server_ban_exemption");
  766. b.ToTable("server_ban_exemption", null, t =>
  767. {
  768. t.HasCheckConstraint("FlagsNotZero", "flags != 0");
  769. });
  770. });
  771. modelBuilder.Entity("Content.Server.Database.ServerBanHit", b =>
  772. {
  773. b.Property<int>("Id")
  774. .ValueGeneratedOnAdd()
  775. .HasColumnType("INTEGER")
  776. .HasColumnName("server_ban_hit_id");
  777. b.Property<int>("BanId")
  778. .HasColumnType("INTEGER")
  779. .HasColumnName("ban_id");
  780. b.Property<int>("ConnectionId")
  781. .HasColumnType("INTEGER")
  782. .HasColumnName("connection_id");
  783. b.HasKey("Id")
  784. .HasName("PK_server_ban_hit");
  785. b.HasIndex("BanId")
  786. .HasDatabaseName("IX_server_ban_hit_ban_id");
  787. b.HasIndex("ConnectionId")
  788. .HasDatabaseName("IX_server_ban_hit_connection_id");
  789. b.ToTable("server_ban_hit", (string)null);
  790. });
  791. modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
  792. {
  793. b.Property<int>("Id")
  794. .ValueGeneratedOnAdd()
  795. .HasColumnType("INTEGER")
  796. .HasColumnName("server_role_ban_id");
  797. b.Property<string>("Address")
  798. .HasColumnType("TEXT")
  799. .HasColumnName("address");
  800. b.Property<DateTime>("BanTime")
  801. .HasColumnType("TEXT")
  802. .HasColumnName("ban_time");
  803. b.Property<Guid?>("BanningAdmin")
  804. .HasColumnType("TEXT")
  805. .HasColumnName("banning_admin");
  806. b.Property<DateTime?>("ExpirationTime")
  807. .HasColumnType("TEXT")
  808. .HasColumnName("expiration_time");
  809. b.Property<byte[]>("HWId")
  810. .HasColumnType("BLOB")
  811. .HasColumnName("hwid");
  812. b.Property<bool>("Hidden")
  813. .HasColumnType("INTEGER")
  814. .HasColumnName("hidden");
  815. b.Property<DateTime?>("LastEditedAt")
  816. .HasColumnType("TEXT")
  817. .HasColumnName("last_edited_at");
  818. b.Property<Guid?>("LastEditedById")
  819. .HasColumnType("TEXT")
  820. .HasColumnName("last_edited_by_id");
  821. b.Property<Guid?>("PlayerUserId")
  822. .HasColumnType("TEXT")
  823. .HasColumnName("player_user_id");
  824. b.Property<TimeSpan>("PlaytimeAtNote")
  825. .HasColumnType("TEXT")
  826. .HasColumnName("playtime_at_note");
  827. b.Property<string>("Reason")
  828. .IsRequired()
  829. .HasColumnType("TEXT")
  830. .HasColumnName("reason");
  831. b.Property<string>("RoleId")
  832. .IsRequired()
  833. .HasColumnType("TEXT")
  834. .HasColumnName("role_id");
  835. b.Property<int?>("RoundId")
  836. .HasColumnType("INTEGER")
  837. .HasColumnName("round_id");
  838. b.Property<int>("Severity")
  839. .HasColumnType("INTEGER")
  840. .HasColumnName("severity");
  841. b.HasKey("Id")
  842. .HasName("PK_server_role_ban");
  843. b.HasIndex("Address");
  844. b.HasIndex("BanningAdmin");
  845. b.HasIndex("LastEditedById");
  846. b.HasIndex("PlayerUserId")
  847. .HasDatabaseName("IX_server_role_ban_player_user_id");
  848. b.HasIndex("RoundId")
  849. .HasDatabaseName("IX_server_role_ban_round_id");
  850. b.ToTable("server_role_ban", null, t =>
  851. {
  852. t.HasCheckConstraint("HaveEitherAddressOrUserIdOrHWId", "address IS NOT NULL OR player_user_id IS NOT NULL OR hwid IS NOT NULL");
  853. });
  854. });
  855. modelBuilder.Entity("Content.Server.Database.ServerRoleUnban", b =>
  856. {
  857. b.Property<int>("Id")
  858. .ValueGeneratedOnAdd()
  859. .HasColumnType("INTEGER")
  860. .HasColumnName("role_unban_id");
  861. b.Property<int>("BanId")
  862. .HasColumnType("INTEGER")
  863. .HasColumnName("ban_id");
  864. b.Property<DateTime>("UnbanTime")
  865. .HasColumnType("TEXT")
  866. .HasColumnName("unban_time");
  867. b.Property<Guid?>("UnbanningAdmin")
  868. .HasColumnType("TEXT")
  869. .HasColumnName("unbanning_admin");
  870. b.HasKey("Id")
  871. .HasName("PK_server_role_unban");
  872. b.HasIndex("BanId")
  873. .IsUnique();
  874. b.ToTable("server_role_unban", (string)null);
  875. });
  876. modelBuilder.Entity("Content.Server.Database.ServerUnban", b =>
  877. {
  878. b.Property<int>("Id")
  879. .ValueGeneratedOnAdd()
  880. .HasColumnType("INTEGER")
  881. .HasColumnName("unban_id");
  882. b.Property<int>("BanId")
  883. .HasColumnType("INTEGER")
  884. .HasColumnName("ban_id");
  885. b.Property<DateTime>("UnbanTime")
  886. .HasColumnType("TEXT")
  887. .HasColumnName("unban_time");
  888. b.Property<Guid?>("UnbanningAdmin")
  889. .HasColumnType("TEXT")
  890. .HasColumnName("unbanning_admin");
  891. b.HasKey("Id")
  892. .HasName("PK_server_unban");
  893. b.HasIndex("BanId")
  894. .IsUnique();
  895. b.ToTable("server_unban", (string)null);
  896. });
  897. modelBuilder.Entity("Content.Server.Database.Trait", b =>
  898. {
  899. b.Property<int>("Id")
  900. .ValueGeneratedOnAdd()
  901. .HasColumnType("INTEGER")
  902. .HasColumnName("trait_id");
  903. b.Property<int>("ProfileId")
  904. .HasColumnType("INTEGER")
  905. .HasColumnName("profile_id");
  906. b.Property<string>("TraitName")
  907. .IsRequired()
  908. .HasColumnType("TEXT")
  909. .HasColumnName("trait_name");
  910. b.HasKey("Id")
  911. .HasName("PK_trait");
  912. b.HasIndex("ProfileId", "TraitName")
  913. .IsUnique();
  914. b.ToTable("trait", (string)null);
  915. });
  916. modelBuilder.Entity("Content.Server.Database.UploadedResourceLog", b =>
  917. {
  918. b.Property<int>("Id")
  919. .ValueGeneratedOnAdd()
  920. .HasColumnType("INTEGER")
  921. .HasColumnName("uploaded_resource_log_id");
  922. b.Property<byte[]>("Data")
  923. .IsRequired()
  924. .HasColumnType("BLOB")
  925. .HasColumnName("data");
  926. b.Property<DateTime>("Date")
  927. .HasColumnType("TEXT")
  928. .HasColumnName("date");
  929. b.Property<string>("Path")
  930. .IsRequired()
  931. .HasColumnType("TEXT")
  932. .HasColumnName("path");
  933. b.Property<Guid>("UserId")
  934. .HasColumnType("TEXT")
  935. .HasColumnName("user_id");
  936. b.HasKey("Id")
  937. .HasName("PK_uploaded_resource_log");
  938. b.ToTable("uploaded_resource_log", (string)null);
  939. });
  940. modelBuilder.Entity("Content.Server.Database.Whitelist", b =>
  941. {
  942. b.Property<Guid>("UserId")
  943. .ValueGeneratedOnAdd()
  944. .HasColumnType("TEXT")
  945. .HasColumnName("user_id");
  946. b.HasKey("UserId")
  947. .HasName("PK_whitelist");
  948. b.ToTable("whitelist", (string)null);
  949. });
  950. modelBuilder.Entity("PlayerRound", b =>
  951. {
  952. b.Property<int>("PlayersId")
  953. .HasColumnType("INTEGER")
  954. .HasColumnName("players_id");
  955. b.Property<int>("RoundsId")
  956. .HasColumnType("INTEGER")
  957. .HasColumnName("rounds_id");
  958. b.HasKey("PlayersId", "RoundsId")
  959. .HasName("PK_player_round");
  960. b.HasIndex("RoundsId")
  961. .HasDatabaseName("IX_player_round_rounds_id");
  962. b.ToTable("player_round", (string)null);
  963. });
  964. modelBuilder.Entity("Content.Server.Database.Admin", b =>
  965. {
  966. b.HasOne("Content.Server.Database.AdminRank", "AdminRank")
  967. .WithMany("Admins")
  968. .HasForeignKey("AdminRankId")
  969. .OnDelete(DeleteBehavior.SetNull)
  970. .HasConstraintName("FK_admin_admin_rank_admin_rank_id");
  971. b.Navigation("AdminRank");
  972. });
  973. modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
  974. {
  975. b.HasOne("Content.Server.Database.Admin", "Admin")
  976. .WithMany("Flags")
  977. .HasForeignKey("AdminId")
  978. .OnDelete(DeleteBehavior.Cascade)
  979. .IsRequired()
  980. .HasConstraintName("FK_admin_flag_admin_admin_id");
  981. b.Navigation("Admin");
  982. });
  983. modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
  984. {
  985. b.HasOne("Content.Server.Database.Round", "Round")
  986. .WithMany("AdminLogs")
  987. .HasForeignKey("RoundId")
  988. .OnDelete(DeleteBehavior.Cascade)
  989. .IsRequired()
  990. .HasConstraintName("FK_admin_log_round_round_id");
  991. b.Navigation("Round");
  992. });
  993. modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
  994. {
  995. b.HasOne("Content.Server.Database.Player", "Player")
  996. .WithMany("AdminLogs")
  997. .HasForeignKey("PlayerUserId")
  998. .HasPrincipalKey("UserId")
  999. .OnDelete(DeleteBehavior.Cascade)
  1000. .IsRequired()
  1001. .HasConstraintName("FK_admin_log_player_player_player_user_id");
  1002. b.HasOne("Content.Server.Database.AdminLog", "Log")
  1003. .WithMany("Players")
  1004. .HasForeignKey("RoundId", "LogId")
  1005. .OnDelete(DeleteBehavior.Cascade)
  1006. .IsRequired()
  1007. .HasConstraintName("FK_admin_log_player_admin_log_round_id_log_id");
  1008. b.Navigation("Log");
  1009. b.Navigation("Player");
  1010. });
  1011. modelBuilder.Entity("Content.Server.Database.AdminMessage", b =>
  1012. {
  1013. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1014. .WithMany("AdminMessagesCreated")
  1015. .HasForeignKey("CreatedById")
  1016. .HasPrincipalKey("UserId")
  1017. .OnDelete(DeleteBehavior.SetNull)
  1018. .HasConstraintName("FK_admin_messages_player_created_by_id");
  1019. b.HasOne("Content.Server.Database.Player", "DeletedBy")
  1020. .WithMany("AdminMessagesDeleted")
  1021. .HasForeignKey("DeletedById")
  1022. .HasPrincipalKey("UserId")
  1023. .OnDelete(DeleteBehavior.SetNull)
  1024. .HasConstraintName("FK_admin_messages_player_deleted_by_id");
  1025. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1026. .WithMany("AdminMessagesLastEdited")
  1027. .HasForeignKey("LastEditedById")
  1028. .HasPrincipalKey("UserId")
  1029. .OnDelete(DeleteBehavior.SetNull)
  1030. .HasConstraintName("FK_admin_messages_player_last_edited_by_id");
  1031. b.HasOne("Content.Server.Database.Player", "Player")
  1032. .WithMany("AdminMessagesReceived")
  1033. .HasForeignKey("PlayerUserId")
  1034. .HasPrincipalKey("UserId")
  1035. .OnDelete(DeleteBehavior.Cascade)
  1036. .HasConstraintName("FK_admin_messages_player_player_user_id");
  1037. b.HasOne("Content.Server.Database.Round", "Round")
  1038. .WithMany()
  1039. .HasForeignKey("RoundId")
  1040. .HasConstraintName("FK_admin_messages_round_round_id");
  1041. b.Navigation("CreatedBy");
  1042. b.Navigation("DeletedBy");
  1043. b.Navigation("LastEditedBy");
  1044. b.Navigation("Player");
  1045. b.Navigation("Round");
  1046. });
  1047. modelBuilder.Entity("Content.Server.Database.AdminNote", b =>
  1048. {
  1049. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1050. .WithMany("AdminNotesCreated")
  1051. .HasForeignKey("CreatedById")
  1052. .HasPrincipalKey("UserId")
  1053. .OnDelete(DeleteBehavior.SetNull)
  1054. .HasConstraintName("FK_admin_notes_player_created_by_id");
  1055. b.HasOne("Content.Server.Database.Player", "DeletedBy")
  1056. .WithMany("AdminNotesDeleted")
  1057. .HasForeignKey("DeletedById")
  1058. .HasPrincipalKey("UserId")
  1059. .OnDelete(DeleteBehavior.SetNull)
  1060. .HasConstraintName("FK_admin_notes_player_deleted_by_id");
  1061. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1062. .WithMany("AdminNotesLastEdited")
  1063. .HasForeignKey("LastEditedById")
  1064. .HasPrincipalKey("UserId")
  1065. .OnDelete(DeleteBehavior.SetNull)
  1066. .HasConstraintName("FK_admin_notes_player_last_edited_by_id");
  1067. b.HasOne("Content.Server.Database.Player", "Player")
  1068. .WithMany("AdminNotesReceived")
  1069. .HasForeignKey("PlayerUserId")
  1070. .HasPrincipalKey("UserId")
  1071. .OnDelete(DeleteBehavior.Cascade)
  1072. .HasConstraintName("FK_admin_notes_player_player_user_id");
  1073. b.HasOne("Content.Server.Database.Round", "Round")
  1074. .WithMany()
  1075. .HasForeignKey("RoundId")
  1076. .HasConstraintName("FK_admin_notes_round_round_id");
  1077. b.Navigation("CreatedBy");
  1078. b.Navigation("DeletedBy");
  1079. b.Navigation("LastEditedBy");
  1080. b.Navigation("Player");
  1081. b.Navigation("Round");
  1082. });
  1083. modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
  1084. {
  1085. b.HasOne("Content.Server.Database.AdminRank", "Rank")
  1086. .WithMany("Flags")
  1087. .HasForeignKey("AdminRankId")
  1088. .OnDelete(DeleteBehavior.Cascade)
  1089. .IsRequired()
  1090. .HasConstraintName("FK_admin_rank_flag_admin_rank_admin_rank_id");
  1091. b.Navigation("Rank");
  1092. });
  1093. modelBuilder.Entity("Content.Server.Database.AdminWatchlist", b =>
  1094. {
  1095. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1096. .WithMany("AdminWatchlistsCreated")
  1097. .HasForeignKey("CreatedById")
  1098. .HasPrincipalKey("UserId")
  1099. .OnDelete(DeleteBehavior.SetNull)
  1100. .HasConstraintName("FK_admin_watchlists_player_created_by_id");
  1101. b.HasOne("Content.Server.Database.Player", "DeletedBy")
  1102. .WithMany("AdminWatchlistsDeleted")
  1103. .HasForeignKey("DeletedById")
  1104. .HasPrincipalKey("UserId")
  1105. .OnDelete(DeleteBehavior.SetNull)
  1106. .HasConstraintName("FK_admin_watchlists_player_deleted_by_id");
  1107. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1108. .WithMany("AdminWatchlistsLastEdited")
  1109. .HasForeignKey("LastEditedById")
  1110. .HasPrincipalKey("UserId")
  1111. .OnDelete(DeleteBehavior.SetNull)
  1112. .HasConstraintName("FK_admin_watchlists_player_last_edited_by_id");
  1113. b.HasOne("Content.Server.Database.Player", "Player")
  1114. .WithMany("AdminWatchlistsReceived")
  1115. .HasForeignKey("PlayerUserId")
  1116. .HasPrincipalKey("UserId")
  1117. .OnDelete(DeleteBehavior.Cascade)
  1118. .HasConstraintName("FK_admin_watchlists_player_player_user_id");
  1119. b.HasOne("Content.Server.Database.Round", "Round")
  1120. .WithMany()
  1121. .HasForeignKey("RoundId")
  1122. .HasConstraintName("FK_admin_watchlists_round_round_id");
  1123. b.Navigation("CreatedBy");
  1124. b.Navigation("DeletedBy");
  1125. b.Navigation("LastEditedBy");
  1126. b.Navigation("Player");
  1127. b.Navigation("Round");
  1128. });
  1129. modelBuilder.Entity("Content.Server.Database.Antag", b =>
  1130. {
  1131. b.HasOne("Content.Server.Database.Profile", "Profile")
  1132. .WithMany("Antags")
  1133. .HasForeignKey("ProfileId")
  1134. .OnDelete(DeleteBehavior.Cascade)
  1135. .IsRequired()
  1136. .HasConstraintName("FK_antag_profile_profile_id");
  1137. b.Navigation("Profile");
  1138. });
  1139. modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
  1140. {
  1141. b.HasOne("Content.Server.Database.Server", "Server")
  1142. .WithMany("ConnectionLogs")
  1143. .HasForeignKey("ServerId")
  1144. .OnDelete(DeleteBehavior.SetNull)
  1145. .IsRequired()
  1146. .HasConstraintName("FK_connection_log_server_server_id");
  1147. b.Navigation("Server");
  1148. });
  1149. modelBuilder.Entity("Content.Server.Database.Job", b =>
  1150. {
  1151. b.HasOne("Content.Server.Database.Profile", "Profile")
  1152. .WithMany("Jobs")
  1153. .HasForeignKey("ProfileId")
  1154. .OnDelete(DeleteBehavior.Cascade)
  1155. .IsRequired()
  1156. .HasConstraintName("FK_job_profile_profile_id");
  1157. b.Navigation("Profile");
  1158. });
  1159. modelBuilder.Entity("Content.Server.Database.Profile", b =>
  1160. {
  1161. b.HasOne("Content.Server.Database.Preference", "Preference")
  1162. .WithMany("Profiles")
  1163. .HasForeignKey("PreferenceId")
  1164. .OnDelete(DeleteBehavior.Cascade)
  1165. .IsRequired()
  1166. .HasConstraintName("FK_profile_preference_preference_id");
  1167. b.Navigation("Preference");
  1168. });
  1169. modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b =>
  1170. {
  1171. b.HasOne("Content.Server.Database.ProfileLoadoutGroup", "ProfileLoadoutGroup")
  1172. .WithMany("Loadouts")
  1173. .HasForeignKey("ProfileLoadoutGroupId")
  1174. .OnDelete(DeleteBehavior.Cascade)
  1175. .IsRequired()
  1176. .HasConstraintName("FK_profile_loadout_profile_loadout_group_profile_loadout_group_id");
  1177. b.Navigation("ProfileLoadoutGroup");
  1178. });
  1179. modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
  1180. {
  1181. b.HasOne("Content.Server.Database.ProfileRoleLoadout", "ProfileRoleLoadout")
  1182. .WithMany("Groups")
  1183. .HasForeignKey("ProfileRoleLoadoutId")
  1184. .OnDelete(DeleteBehavior.Cascade)
  1185. .IsRequired()
  1186. .HasConstraintName("FK_profile_loadout_group_profile_role_loadout_profile_role_loadout_id");
  1187. b.Navigation("ProfileRoleLoadout");
  1188. });
  1189. modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
  1190. {
  1191. b.HasOne("Content.Server.Database.Profile", "Profile")
  1192. .WithMany("Loadouts")
  1193. .HasForeignKey("ProfileId")
  1194. .OnDelete(DeleteBehavior.Cascade)
  1195. .IsRequired()
  1196. .HasConstraintName("FK_profile_role_loadout_profile_profile_id");
  1197. b.Navigation("Profile");
  1198. });
  1199. modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
  1200. {
  1201. b.HasOne("Content.Server.Database.Player", "Player")
  1202. .WithMany("JobWhitelists")
  1203. .HasForeignKey("PlayerUserId")
  1204. .HasPrincipalKey("UserId")
  1205. .OnDelete(DeleteBehavior.Cascade)
  1206. .IsRequired()
  1207. .HasConstraintName("FK_role_whitelists_player_player_user_id");
  1208. b.Navigation("Player");
  1209. });
  1210. modelBuilder.Entity("Content.Server.Database.Round", b =>
  1211. {
  1212. b.HasOne("Content.Server.Database.Server", "Server")
  1213. .WithMany("Rounds")
  1214. .HasForeignKey("ServerId")
  1215. .OnDelete(DeleteBehavior.Cascade)
  1216. .IsRequired()
  1217. .HasConstraintName("FK_round_server_server_id");
  1218. b.Navigation("Server");
  1219. });
  1220. modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
  1221. {
  1222. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1223. .WithMany("AdminServerBansCreated")
  1224. .HasForeignKey("BanningAdmin")
  1225. .HasPrincipalKey("UserId")
  1226. .OnDelete(DeleteBehavior.SetNull)
  1227. .HasConstraintName("FK_server_ban_player_banning_admin");
  1228. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1229. .WithMany("AdminServerBansLastEdited")
  1230. .HasForeignKey("LastEditedById")
  1231. .HasPrincipalKey("UserId")
  1232. .OnDelete(DeleteBehavior.SetNull)
  1233. .HasConstraintName("FK_server_ban_player_last_edited_by_id");
  1234. b.HasOne("Content.Server.Database.Round", "Round")
  1235. .WithMany()
  1236. .HasForeignKey("RoundId")
  1237. .HasConstraintName("FK_server_ban_round_round_id");
  1238. b.Navigation("CreatedBy");
  1239. b.Navigation("LastEditedBy");
  1240. b.Navigation("Round");
  1241. });
  1242. modelBuilder.Entity("Content.Server.Database.ServerBanHit", b =>
  1243. {
  1244. b.HasOne("Content.Server.Database.ServerBan", "Ban")
  1245. .WithMany("BanHits")
  1246. .HasForeignKey("BanId")
  1247. .OnDelete(DeleteBehavior.Cascade)
  1248. .IsRequired()
  1249. .HasConstraintName("FK_server_ban_hit_server_ban_ban_id");
  1250. b.HasOne("Content.Server.Database.ConnectionLog", "Connection")
  1251. .WithMany("BanHits")
  1252. .HasForeignKey("ConnectionId")
  1253. .OnDelete(DeleteBehavior.Cascade)
  1254. .IsRequired()
  1255. .HasConstraintName("FK_server_ban_hit_connection_log_connection_id");
  1256. b.Navigation("Ban");
  1257. b.Navigation("Connection");
  1258. });
  1259. modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
  1260. {
  1261. b.HasOne("Content.Server.Database.Player", "CreatedBy")
  1262. .WithMany("AdminServerRoleBansCreated")
  1263. .HasForeignKey("BanningAdmin")
  1264. .HasPrincipalKey("UserId")
  1265. .OnDelete(DeleteBehavior.SetNull)
  1266. .HasConstraintName("FK_server_role_ban_player_banning_admin");
  1267. b.HasOne("Content.Server.Database.Player", "LastEditedBy")
  1268. .WithMany("AdminServerRoleBansLastEdited")
  1269. .HasForeignKey("LastEditedById")
  1270. .HasPrincipalKey("UserId")
  1271. .OnDelete(DeleteBehavior.SetNull)
  1272. .HasConstraintName("FK_server_role_ban_player_last_edited_by_id");
  1273. b.HasOne("Content.Server.Database.Round", "Round")
  1274. .WithMany()
  1275. .HasForeignKey("RoundId")
  1276. .HasConstraintName("FK_server_role_ban_round_round_id");
  1277. b.Navigation("CreatedBy");
  1278. b.Navigation("LastEditedBy");
  1279. b.Navigation("Round");
  1280. });
  1281. modelBuilder.Entity("Content.Server.Database.ServerRoleUnban", b =>
  1282. {
  1283. b.HasOne("Content.Server.Database.ServerRoleBan", "Ban")
  1284. .WithOne("Unban")
  1285. .HasForeignKey("Content.Server.Database.ServerRoleUnban", "BanId")
  1286. .OnDelete(DeleteBehavior.Cascade)
  1287. .IsRequired()
  1288. .HasConstraintName("FK_server_role_unban_server_role_ban_ban_id");
  1289. b.Navigation("Ban");
  1290. });
  1291. modelBuilder.Entity("Content.Server.Database.ServerUnban", b =>
  1292. {
  1293. b.HasOne("Content.Server.Database.ServerBan", "Ban")
  1294. .WithOne("Unban")
  1295. .HasForeignKey("Content.Server.Database.ServerUnban", "BanId")
  1296. .OnDelete(DeleteBehavior.Cascade)
  1297. .IsRequired()
  1298. .HasConstraintName("FK_server_unban_server_ban_ban_id");
  1299. b.Navigation("Ban");
  1300. });
  1301. modelBuilder.Entity("Content.Server.Database.Trait", b =>
  1302. {
  1303. b.HasOne("Content.Server.Database.Profile", "Profile")
  1304. .WithMany("Traits")
  1305. .HasForeignKey("ProfileId")
  1306. .OnDelete(DeleteBehavior.Cascade)
  1307. .IsRequired()
  1308. .HasConstraintName("FK_trait_profile_profile_id");
  1309. b.Navigation("Profile");
  1310. });
  1311. modelBuilder.Entity("PlayerRound", b =>
  1312. {
  1313. b.HasOne("Content.Server.Database.Player", null)
  1314. .WithMany()
  1315. .HasForeignKey("PlayersId")
  1316. .OnDelete(DeleteBehavior.Cascade)
  1317. .IsRequired()
  1318. .HasConstraintName("FK_player_round_player_players_id");
  1319. b.HasOne("Content.Server.Database.Round", null)
  1320. .WithMany()
  1321. .HasForeignKey("RoundsId")
  1322. .OnDelete(DeleteBehavior.Cascade)
  1323. .IsRequired()
  1324. .HasConstraintName("FK_player_round_round_rounds_id");
  1325. });
  1326. modelBuilder.Entity("Content.Server.Database.Admin", b =>
  1327. {
  1328. b.Navigation("Flags");
  1329. });
  1330. modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
  1331. {
  1332. b.Navigation("Players");
  1333. });
  1334. modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
  1335. {
  1336. b.Navigation("Admins");
  1337. b.Navigation("Flags");
  1338. });
  1339. modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
  1340. {
  1341. b.Navigation("BanHits");
  1342. });
  1343. modelBuilder.Entity("Content.Server.Database.Player", b =>
  1344. {
  1345. b.Navigation("AdminLogs");
  1346. b.Navigation("AdminMessagesCreated");
  1347. b.Navigation("AdminMessagesDeleted");
  1348. b.Navigation("AdminMessagesLastEdited");
  1349. b.Navigation("AdminMessagesReceived");
  1350. b.Navigation("AdminNotesCreated");
  1351. b.Navigation("AdminNotesDeleted");
  1352. b.Navigation("AdminNotesLastEdited");
  1353. b.Navigation("AdminNotesReceived");
  1354. b.Navigation("AdminServerBansCreated");
  1355. b.Navigation("AdminServerBansLastEdited");
  1356. b.Navigation("AdminServerRoleBansCreated");
  1357. b.Navigation("AdminServerRoleBansLastEdited");
  1358. b.Navigation("AdminWatchlistsCreated");
  1359. b.Navigation("AdminWatchlistsDeleted");
  1360. b.Navigation("AdminWatchlistsLastEdited");
  1361. b.Navigation("AdminWatchlistsReceived");
  1362. b.Navigation("JobWhitelists");
  1363. });
  1364. modelBuilder.Entity("Content.Server.Database.Preference", b =>
  1365. {
  1366. b.Navigation("Profiles");
  1367. });
  1368. modelBuilder.Entity("Content.Server.Database.Profile", b =>
  1369. {
  1370. b.Navigation("Antags");
  1371. b.Navigation("Jobs");
  1372. b.Navigation("Loadouts");
  1373. b.Navigation("Traits");
  1374. });
  1375. modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
  1376. {
  1377. b.Navigation("Loadouts");
  1378. });
  1379. modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
  1380. {
  1381. b.Navigation("Groups");
  1382. });
  1383. modelBuilder.Entity("Content.Server.Database.Round", b =>
  1384. {
  1385. b.Navigation("AdminLogs");
  1386. });
  1387. modelBuilder.Entity("Content.Server.Database.Server", b =>
  1388. {
  1389. b.Navigation("ConnectionLogs");
  1390. b.Navigation("Rounds");
  1391. });
  1392. modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
  1393. {
  1394. b.Navigation("BanHits");
  1395. b.Navigation("Unban");
  1396. });
  1397. modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
  1398. {
  1399. b.Navigation("Unban");
  1400. });
  1401. #pragma warning restore 612, 618
  1402. }
  1403. }
  1404. }