20241122174243_IPIntel.Designer.cs 81 KB

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