1
0

PostgresServerDbContextModelSnapshot.cs 81 KB

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