From c2b5f6568f08d62cdcb55763609787d637394cbd Mon Sep 17 00:00:00 2001 From: BAaboe Date: Thu, 24 Jul 2025 01:58:10 +0200 Subject: [PATCH] style: renaming parameter, ban_time -> banned_since --- migrations/2025-07-22-195121_add_ban/up.sql | 2 +- src/objects/bans.rs | 2 +- src/schema.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/2025-07-22-195121_add_ban/up.sql b/migrations/2025-07-22-195121_add_ban/up.sql index d8d7fab..a590142 100644 --- a/migrations/2025-07-22-195121_add_ban/up.sql +++ b/migrations/2025-07-22-195121_add_ban/up.sql @@ -3,6 +3,6 @@ CREATE TABLE guild_bans ( guild_uuid uuid NOT NULL REFERENCES guilds(uuid) ON DELETE CASCADE, user_uuid uuid NOT NULL REFERENCES users(uuid), reason VARCHAR(200) DEFAULT NULL, - ban_time TIMESTAMPTZ NOT NULL DEFAULT NOW(), + banned_since TIMESTAMPTZ NOT NULL DEFAULT NOW(), PRIMARY KEY (user_uuid, guild_uuid) ); diff --git a/src/objects/bans.rs b/src/objects/bans.rs index 9eb58f5..602afa6 100644 --- a/src/objects/bans.rs +++ b/src/objects/bans.rs @@ -13,7 +13,7 @@ pub struct GuildBan { pub guild_uuid: Uuid, pub user_uuid: Uuid, pub reason: Option, - pub ban_time: chrono::DateTime, + pub banned_since: chrono::DateTime, } impl GuildBan { diff --git a/src/schema.rs b/src/schema.rs index e4d6730..422c3a3 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -53,7 +53,7 @@ diesel::table! { user_uuid -> Uuid, #[max_length = 200] reason -> Nullable, - ban_time -> Timestamptz, + banned_since -> Timestamptz, } }