From 0d52cef05775fc608f95703ab87a329a2d49a474 Mon Sep 17 00:00:00 2001 From: trkhoi Date: Fri, 18 Aug 2023 14:23:56 +0700 Subject: [PATCH] feat: alias product command --- .../20230818141852-alter_product_commands_add_alias.sql | 7 +++++++ pkg/model/product_bot_commands.go | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 migrations/schemas/20230818141852-alter_product_commands_add_alias.sql diff --git a/migrations/schemas/20230818141852-alter_product_commands_add_alias.sql b/migrations/schemas/20230818141852-alter_product_commands_add_alias.sql new file mode 100644 index 00000000..8c39c306 --- /dev/null +++ b/migrations/schemas/20230818141852-alter_product_commands_add_alias.sql @@ -0,0 +1,7 @@ + +-- +migrate Up +alter table product_bot_commands add column discord_alias text; +alter table product_bot_commands add column telegram_alias text; +-- +migrate Down +alter table product_bot_commands drop column discord_alias; +alter table product_bot_commands drop column telegram_alias; diff --git a/pkg/model/product_bot_commands.go b/pkg/model/product_bot_commands.go index 4d7e50e0..ed14d239 100644 --- a/pkg/model/product_bot_commands.go +++ b/pkg/model/product_bot_commands.go @@ -13,6 +13,8 @@ type ProductBotCommand struct { TelegramCommand string `json:"telegram_command"` Scope typeset.ProductBotCommandScope `json:"scope"` Description string `json:"description"` + DiscordAlias string `json:"discord_alias"` + TelegramAlias string `json:"telegram_alias"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }