1
0

20240623005113_BanTemplate.Designer.cs 71 KB

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