20241111193608_ConnectionTrust.Designer.cs 80 KB

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