20240403072258_Loadouts.Designer.cs 68 KB

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