20240606175141_ReturnLastReadRules.Designer.cs 69 KB

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