diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index 56bfa48..be9727c 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -2,6 +2,8 @@ namespace App\Helpers; +use App\Models\Appeal\Appeal; +use App\Models\Report\Report; use Carbon\Carbon; use Carbon\CarbonInterval; use Illuminate\Support\Facades\Cache; @@ -37,4 +39,12 @@ public static function steamProfile($resource) { }); } } + + public static function appealCheck() { + return Appeal::where('status', 'pending')->count(); + } + + public static function reportCheck() { + return Report::count(); + } } diff --git a/app/Http/Controllers/Appeal/AppealController.php b/app/Http/Controllers/Appeal/AppealController.php new file mode 100644 index 0000000..070f4b3 --- /dev/null +++ b/app/Http/Controllers/Appeal/AppealController.php @@ -0,0 +1,74 @@ +validate([ + 'ban_type' => 'required|string', + 'steamid' => 'required_if:ban_type,Steam ID|nullable|string', + 'ip' => 'required_if:ban_type,IP|nullable|ip', + 'name' => 'required|string', + 'reason' => 'required|string', + 'email' => 'required|email', + ]); + if(SaBan::where('player_steamid', $validated['steamid']) + ->where('status', 'ACTIVE') + ->exists()) { + $data = $request->only(['ban_type', 'steamid', 'ip', 'name', 'reason', 'email']); + $data['status'] = 'PENDING'; + // Save the appeal + Appeal::create($data); + + return redirect()->route('appeals.create')->with('success', 'Appeal submitted successfully.'); + } + else { + return redirect()->route('appeals.create')->with('error', 'No active bans exists for this Steam ID or IP'); + } + } + + public function list() + { + $appeals = Appeal::orderBy('created_at', 'desc')->get(); + return view('appeals.list', compact('appeals')); + } + + public function view($id) + { + $appeal = Appeal::findOrFail($id); + return view('appeals.show', compact('appeal')); + } + + public function updateStatus(Request $request, $id) + { + $request->validate([ + 'status' => 'required|in:APPROVED,REJECTED', + ]); + + $appeal = Appeal::findOrFail($id); + $appeal->status = $request->input('status'); + $appeal->save(); + Mail::to($appeal->email)->send(new AppealApproved($appeal)); + + return redirect()->route('appeals.list', $appeal->id)->with('success', 'Appeal status updated successfully.'); + } +} diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index d048e8f..234045e 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -10,6 +10,7 @@ use App\Models\SaMute; use App\Models\SaServer; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Http; class DashboardController extends Controller @@ -21,10 +22,18 @@ public function check() { public function home() { $updates = []; + $activeBans = null; + $activeMutes = null; $totalBans = SaBan::count(); $totalServers = SaServer::count(); $totalMutes = SaMute::count(); $totalAdmins = SaAdmin::distinct('player_steamid')->count(); + $totalActiveBans = SaBan::where('status', 'ACTIVE')->count(); + $totalActiveMutes = SaMute::where('status', 'ACTIVE')->count(); + if(auth()->check()){ + $activeBans = SaBan::where('player_steamid', Auth::user()->steam_id)->where('status', 'ACTIVE')->count(); + $activeMutes = SaMute::where('player_steamid', Auth::user()->steam_id)->where('status', 'ACTIVE')->count(); + } if(PermissionsHelper::isSuperAdmin()) { $updates = $this->checkUpdates(); } @@ -39,7 +48,11 @@ public function home() 'totalMutes', 'totalAdmins', 'updates', - 'topPlayersData' + 'topPlayersData', + 'activeBans', + 'activeMutes', + 'totalActiveBans', + 'totalActiveMutes' ) ); } diff --git a/app/Http/Controllers/Report/ReportController.php b/app/Http/Controllers/Report/ReportController.php new file mode 100644 index 0000000..8b86f06 --- /dev/null +++ b/app/Http/Controllers/Report/ReportController.php @@ -0,0 +1,57 @@ +validate([ + 'ban_type' => 'required|string', + 'steamid' => 'required_if:ban_type,Steam ID|nullable|string', + 'ip' => 'required_if:ban_type,IP|nullable|ip', + 'nickname' => 'required|string', + 'comments' => 'required|string', + 'name' => 'required|string', + 'email' => 'required|email', + 'server_id' => 'required|integer', + 'media_link' => 'nullable|url', + ]); + + $data = $request->only(['ban_type', 'steamid', 'ip', 'nickname', 'comments', 'name', 'email', 'server_id', 'media_link']); + Report::create($data); + + return redirect()->route('reports.create')->with('success', 'Report submitted successfully.'); + } + + public function list() + { + $reports = Report::orderBy('created_at', 'desc')->get(); + return view('reports.list', compact('reports')); + } + + public function show($id) + { + $report = Report::findOrFail($id); + return view('reports.show', compact('report')); + } + + public function destroy($id) + { + $report = Report::findOrFail($id); + $report->delete(); + + return redirect()->route('reports.list')->with('success', 'Report deleted successfully.'); + } +} diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 0553934..8c4d305 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -5,11 +5,13 @@ use App\Helpers\PermissionsHelper; use App\Models\SaAdmin; use App\Models\SaAdminsFlags; +use App\Models\SaBan; use App\Models\SaServer; use App\Models\ServerVisibilitySetting; use App\Services\RconService; use Carbon\Carbon; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Http; @@ -56,7 +58,10 @@ public function getAllServerInfo(RconService $rcon) $serverVisibilitySettings = ServerVisibilitySetting::pluck('is_visible', 'server_id')->toArray(); $formattedServers = []; - + $loggedInPlayerSteam = null; + if(auth()->check()){ + $loggedInPlayerSteam = Auth::user()?->steam_id; + } foreach ($servers as $server) { if (isset($serverVisibilitySettings[$server->id]) && !$serverVisibilitySettings[$server->id]) { continue; // Skip hidden servers @@ -67,9 +72,18 @@ public function getAllServerInfo(RconService $rcon) try { $serverDetails = $this->getServerDetails($serverIp, $serverPort); if ($serverDetails) { + $banned = ''; + if($loggedInPlayerSteam){ + if(SaBan::where('player_steamid', $loggedInPlayerSteam) + ->where('server_id', $server->id) + ->where('status', 'ACTIVE') + ->exists()) { + $banned = ' Banned'; + } + } $formattedServer = [ 'id' => $server->id, - 'name' => $server->hostname, + 'name' => $server->hostname.$banned, 'ip' => $serverIp, 'port' => $serverPort, 'players' => $serverDetails['players'] . "/" . $serverDetails['max_players'], diff --git a/app/Mail/AppealApproved.php b/app/Mail/AppealApproved.php new file mode 100644 index 0000000..ce5d4e0 --- /dev/null +++ b/app/Mail/AppealApproved.php @@ -0,0 +1,29 @@ +appeal = $appeal; + } + + public function build() + { + return $this->subject('Your Ban Appeal has been'." ".ucfirst($this->appeal->status)) + ->view('appeals.email.appeal_status') + ->with([ + 'appeal' => $this->appeal, + ]); + } +} diff --git a/app/Models/Appeal/Appeal.php b/app/Models/Appeal/Appeal.php new file mode 100644 index 0000000..f1b5fe4 --- /dev/null +++ b/app/Models/Appeal/Appeal.php @@ -0,0 +1,18 @@ +belongsTo(\App\Models\SaServer::class); + } +} diff --git a/config/app.php b/config/app.php index d42269a..e9bc018 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ | Application Version |-------------------------------------------------------------------------- */ - 'version' => '3.4', + 'version' => '3.5', /* |-------------------------------------------------------------------------- | Application Name diff --git a/database/migrations/2024_06_15_083222_2024_06_14_000000_create_appeals_table.php.php b/database/migrations/2024_06_15_083222_2024_06_14_000000_create_appeals_table.php.php new file mode 100644 index 0000000..0da77a8 --- /dev/null +++ b/database/migrations/2024_06_15_083222_2024_06_14_000000_create_appeals_table.php.php @@ -0,0 +1,26 @@ +id(); + $table->string('ban_type'); + $table->string('steamid'); + $table->string('name'); + $table->text('reason'); + $table->string('email'); + $table->timestamps(); + }); + } + + public function down() + { + Schema::dropIfExists('appeals'); + } +} + diff --git a/database/migrations/2024_06_15_142432_2024_06_14_000000_create_reports_table.php.php b/database/migrations/2024_06_15_142432_2024_06_14_000000_create_reports_table.php.php new file mode 100644 index 0000000..9dfcae3 --- /dev/null +++ b/database/migrations/2024_06_15_142432_2024_06_14_000000_create_reports_table.php.php @@ -0,0 +1,33 @@ +id(); + $table->string('ban_type'); + $table->string('steamid')->nullable(); + $table->ipAddress('ip')->nullable(); + $table->string('nickname'); + $table->text('comments'); + $table->string('name'); + $table->string('email'); + $table->unsignedBigInteger('server_id'); + $table->string('media_link')->nullable(); + $table->timestamps(); + }); + } + + public function down() + { + Schema::dropIfExists('reports'); + } +}; diff --git a/lang/en.json b/lang/en.json index c2ae665..bfa89ae 100644 --- a/lang/en.json +++ b/lang/en.json @@ -193,5 +193,13 @@ "skins.skinPreview": "Skin Preview", "skins.wellWorn": "Well-Worn", "Sync New Servers": "Sync New Servers", - "Visibility": "Visibility" -} \ No newline at end of file + "Visibility": "Visibility", + "emails.subject.APPROVED": "Your Ban Appeal has been Approved ", + "emails.subject.REJECTED": "Your Ban Appeal has been Denied ", + "emails.greeting": "Dear :name,", + "emails.body.APPROVED": "Your ban appeal has been approved. You can now rejoin the server. If you have any questions, feel free to contact us.", + "emails.body.REJECTED": "Your ban appeal has been denied. If you have any questions or need further information, feel free to contact us.", + "emails.regards": "Best regards, Server Administration Team", + "emails.footer.copyright": "© :year :app_name. All rights reserved.", + "emails.footer.github": "GitHub Repository" +} diff --git a/resources/scss/dark/assets/main.scss b/resources/scss/dark/assets/main.scss index 57168a5..e7240bb 100644 --- a/resources/scss/dark/assets/main.scss +++ b/resources/scss/dark/assets/main.scss @@ -4886,3 +4886,16 @@ body.layout-dark .table tbody tr td { #sidebar ul.menu-categories li.menu.active>.dropdown-toggle { background-color: #4361ee !important; } +.dash-active-stat { + position: absolute; + margin-top: -24px; + left: 0px; + width: 100%; +} +body.layout-dark blockquote.blockquote{ + color:white !important; +} +.form-control.is-invalid { + background-position: right calc(.375em + .1875rem) center !important; + background-repeat: no-repeat !important; +} diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index 280d49e..ea9911d 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -27,6 +27,20 @@ @endif + @if($activeBans) + + @endif + @if($activeMutes) + + @endif @if(PermissionsHelper::isSuperAdmin())
CSS-BANS @@ -64,6 +78,7 @@
+ {{$totalActiveBans}} Active
@@ -79,6 +94,7 @@
+ {{$totalActiveBans}} Active
diff --git a/resources/views/appeals/create.blade.php b/resources/views/appeals/create.blade.php new file mode 100644 index 0000000..26d6a25 --- /dev/null +++ b/resources/views/appeals/create.blade.php @@ -0,0 +1,124 @@ + + + + {{ __('Appeal a Ban') }} + + + + + @if (session('success')) + + @endif + @if (session('error')) + + @endif + @if ($errors->any()) +
+
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+ @endif +
+
+
+
+
{{ __('Appeal a Ban') }}
+ +
+
+ If you are indeed on our ban list and you feel it is unjust or any other circumstances, + please fill out the appeal format below. +
+
+ @csrf + +
+ + +
+ +
+ + + @error('ban_input') + + {{ $message }} + + @enderror +
+ +
+ + + @error('name') + + {{ $message }} + + @enderror +
+ +
+ + + @error('reason') + + {{ $message }} + + @enderror +
+ +
+ + + @error('email') + + {{ $message }} + + @enderror +
+ +
+ +
+
+
+ + +
+
+
+
+ + + + +
diff --git a/resources/views/appeals/email/appeal_status.blade.php b/resources/views/appeals/email/appeal_status.blade.php new file mode 100644 index 0000000..098267c --- /dev/null +++ b/resources/views/appeals/email/appeal_status.blade.php @@ -0,0 +1,71 @@ + + + + + + + {{ __('emails.subject.' . $appeal->status) }} + + +
+
+

{{ __('emails.subject.' . $appeal->status) }}

+
+
+

{{ __('emails.greeting', ['name' => $appeal->name]) }}

+

+ {{ $appeal->status === 'approved' ? + __('emails.body.APPROVED') : + __('emails.body.REJECTED') }} +

+

{{ __('emails.regards') }}

+
+ +
+ + diff --git a/resources/views/appeals/list.blade.php b/resources/views/appeals/list.blade.php new file mode 100644 index 0000000..97af63a --- /dev/null +++ b/resources/views/appeals/list.blade.php @@ -0,0 +1,60 @@ + + + {{ __('Appeals List') }} + + + + +
+
+
{{ __('Appeals List') }}
+
+ @if (session('success')) +
+ {{ session('success') }} +
+ @endif + + + + + + + + + + + + + + + + + @foreach ($appeals as $appeal) + + + + + + + + + + + + @endforeach + +
{{ __('ID') }}{{ __('Ban Type') }}{{ __('SteamID/IP') }}{{ __('Name') }}{{ __('Reason') }}{{ __('Email') }}{{ __('Status') }}{{ __('Created At') }}{{ __('Actions') }}
{{ $appeal->id }}{{ $appeal->ban_type }}{{ $appeal->ban_type == 'Steam ID' ? $appeal->steamid : $appeal->ip }}{{ $appeal->name }}{{ $appeal->reason }}{{ $appeal->email }} + + {{ $appeal->status }} + + {{ $appeal->created_at->format('Y-m-d H:i:s') }} + {{ __('View') }} +
+
+
+
+ + + +
diff --git a/resources/views/appeals/show.blade.php b/resources/views/appeals/show.blade.php new file mode 100644 index 0000000..769e4c7 --- /dev/null +++ b/resources/views/appeals/show.blade.php @@ -0,0 +1,42 @@ + + + {{ __('Appeal Details') }} + + + + + +
+
+
+
+
{{ __('Appeal Details') }}
+ +
+

{{ __('Ban Type') }}: {{ $appeal->ban_type }}

+

{{ __('Identifier') }}: {{ $appeal->ban_type === 'IP' ? $appeal->ip : $appeal->steamid }}

+

{{ __('Name') }}: {{ $appeal->name }}

+

{{ __('Reason') }}: {{ $appeal->reason }}

+

{{ __('Email') }}: {{ $appeal->email }}

+

{{ __('Status') }}: {{ $appeal->status }}

+

{{ __('Created At') }}: {{ $appeal->created_at }}

+ +
+ @csrf + @method('PUT') + +
+ + +
+
+
+
+
+
+
+ + + + +
diff --git a/resources/views/components/menu/vertical-menu.blade.php b/resources/views/components/menu/vertical-menu.blade.php index 4b90038..c6706e5 100644 --- a/resources/views/components/menu/vertical-menu.blade.php +++ b/resources/views/components/menu/vertical-menu.blade.php @@ -7,247 +7,369 @@ */d --}} -@php use App\Helpers\PermissionsHelper; @endphp +@php use App\Helpers\CommonHelper;use App\Helpers\PermissionsHelper; @endphp +@php + $onlyManageAdminPerms = [ + PermissionsHelper::isSuperAdmin(), + PermissionsHelper::hasAdminCreatePermission(), + PermissionsHelper::hasAdminEditPermission(), + PermissionsHelper::hasAdminDeletePermission(), + ]; +@endphp + diff --git a/resources/views/reports/create.blade.php b/resources/views/reports/create.blade.php new file mode 100644 index 0000000..3f01d77 --- /dev/null +++ b/resources/views/reports/create.blade.php @@ -0,0 +1,155 @@ + + + {{ __('Submit a Report') }} + + + + @if (session('success')) + + @endif + @if (session('error')) + + @endif +
+
+
+
+
{{ __('Submit a Report') }}
+ +
+

+ In order to keep our servers running smoothly, offenders of our rules should be punished and we can't always be on call to help. +

+

+ When submitting a player report, we ask you to fill out the report as detailed as possible to help ban the offender as this will help us process your report quickly. +

+
+ @csrf + +
+ + +
+ +
+ + + @error('steamid') + + {{ $message }} + + @enderror +
+ +
+ + + @error('ip') + + {{ $message }} + + @enderror +
+ +
+ + + @error('nickname') + + {{ $message }} + + @enderror +
+ +
+ + + @error('comments') + + {{ $message }} + + @enderror +
+ +
+ + + @error('name') + + {{ $message }} + + @enderror +
+ +
+ + + @error('email') + + {{ $message }} + + @enderror +
+ +
+ + +
+ +
+ + + @error('media_link') + + {{ $message }} + + @enderror +
+ +
+ +
+
+
+ + +
+
+
+
+ + + + +
diff --git a/resources/views/reports/list.blade.php b/resources/views/reports/list.blade.php new file mode 100644 index 0000000..7566c74 --- /dev/null +++ b/resources/views/reports/list.blade.php @@ -0,0 +1,50 @@ + + + {{ __('Reports List') }} + + + + +
+
+
{{ __('Reports List') }}
+
+ @if (session('success')) +
+ {{ session('success') }} +
+ @endif + + + + + + + + + + + + + + @foreach ($reports as $report) + + + + + + + + + @endforeach + +
{{ __('ID') }}{{ __('SteamID/IP') }}{{ __('Nickname') }}{{ __('Server') }}{{ __('Created At') }}{{ __('Actions') }}
{{ $report->id }}{{ $report->ban_type == 'Steam ID' ? $report->steamid : $report->ip }}{{ $report->nickname }}{{ $report->server->hostname }}{{ $report->created_at->format('Y-m-d H:i:s') }} + {{ __('View') }} +
+
+
+
+ + + +
diff --git a/resources/views/reports/show.blade.php b/resources/views/reports/show.blade.php new file mode 100644 index 0000000..447cccb --- /dev/null +++ b/resources/views/reports/show.blade.php @@ -0,0 +1,65 @@ + + + {{ __('Report Details') }} + + + + +
+
+
{{ __('Report Details') }}
+
+ @if (session('success')) +
+ {{ session('success') }} +
+ @endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ __('Ban Type') }}{{ $report->ban_type }}
{{ __('SteamID/IP') }}{{ $report->ban_type == 'Steam ID' ? $report->steamid : $report->ip }}
{{ __('Nickname') }}{{ $report->nickname }}
{{ __('Comments') }}{{ $report->comments }}
{{ __('Email') }}{{ $report->email }}
{{ __('Server') }}{{ $report->server->hostname }}
{{ __('Media Link') }}{{ __('View Proof') }}
{{ __('Created At') }}{{ $report->created_at->format('Y-m-d H:i:s') }}
+ +
+ @csrf + @method('DELETE') + + +
+
+
+
+ + + +
diff --git a/routes/web.php b/routes/web.php index 6539d95..a9aeecd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,8 +1,10 @@ name('settings.update'); }); +Route::get('/appeals', [AppealController::class, 'list'])->name('appeals.list'); +Route::get('/appeals/create', [AppealController::class, 'create'])->name('appeals.create'); +Route::post('appeals', [AppealController::class, 'store'])->name('appeals.store'); +Route::get('/appeals/{id}', [AppealController::class, 'view'])->name('appeals.show'); +Route::put('/appeals/{id}/status', [AppealController::class, 'updateStatus'])->name('appeals.updateStatus'); + + + +Route::prefix('reports')->group(function () { + Route::get('create', [ReportController::class, 'create'])->name('reports.create'); + Route::post('store', [ReportController::class, 'store'])->name('reports.store'); + Route::get('list', [ReportController::class, 'list'])->name('reports.list'); + Route::get('show/{id}', [ReportController::class, 'show'])->name('reports.show'); + Route::delete('destroy/{id}', [ReportController::class, 'destroy'])->name('reports.destroy'); +}); diff --git a/storage/app/cssbans.sql b/storage/app/cssbans.sql index 77f968b..5d50178 100644 --- a/storage/app/cssbans.sql +++ b/storage/app/cssbans.sql @@ -118,7 +118,7 @@ INSERT INTO `permissions` (`id`, `permission`, `description`, `created_at`, `upd (NULL, '@web/group.delete', 'Web-only: Permission to delete a group.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'), (NULL, '@web/mute.add', 'Web-only: Permission to create a mute.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'), (NULL, '@web/mute.edit', 'Web-only: Permission to edit a mute.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'), -(NULL, '@web/mute.unmute', 'Web-only: Permission to unmute a user.', '2024-04-14 15:27:44', '2024-04-14 15:27:44') +(NULL, '@web/mute.unmute', 'Web-only: Permission to unmute a user.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'), (NULL, '@web/group.create', 'Web-only: Permission to create group.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'), (NULL, '@web/group.edit', 'Web-only: Permission to edit group.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'), (NULL, '@web/group.delete', 'Web-only: Permission to delete group.', '2024-04-14 15:27:44', '2024-04-14 15:27:44'); @@ -182,6 +182,38 @@ CREATE TABLE `server_visibility_settings` ( `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +DROP TABLE IF EXISTS appeals; +CREATE TABLE `appeals` ( +`id` int NOT NULL AUTO_INCREMENT, +`ban_type` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, +`steamid` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, +`ip` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, +`name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, +`reason` text COLLATE utf8mb4_general_ci NOT NULL, +`email` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, +`status` enum('PENDING','APPROVED','REJECTED') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'PENDING', +`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, +`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +DROP TABLE IF EXISTS reports; +CREATE TABLE `reports` ( +`id` bigint unsigned NOT NULL AUTO_INCREMENT, +`ban_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, +`steamid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, +`ip` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL, +`nickname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, +`comments` text COLLATE utf8mb4_unicode_ci NOT NULL, +`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, +`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, +`server_id` bigint unsigned NOT NULL, +`media_link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, +`created_at` timestamp NULL DEFAULT NULL, +`updated_at` timestamp NULL DEFAULT NULL, +PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` --