mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
refactor: restructure channel gateway and chat module architecture
- Refactor channel adapters (feishu, telegram, local) with enhanced descriptor and config - Restructure channel manager, service, types, and outbound messaging - Simplify chat module by removing normalize.go and chat.go, consolidating into resolver and types - Update router channel handlers and tests - Sync swagger documentation
This commit is contained in:
@@ -34,3 +34,21 @@ SELECT * FROM containers WHERE container_id = sqlc.arg(container_id);
|
||||
|
||||
-- name: GetContainerByBotID :one
|
||||
SELECT * FROM containers WHERE bot_id = sqlc.arg(bot_id) ORDER BY updated_at DESC LIMIT 1;
|
||||
|
||||
-- name: DeleteContainerByBotID :exec
|
||||
DELETE FROM containers WHERE bot_id = sqlc.arg(bot_id);
|
||||
|
||||
-- name: UpdateContainerStatus :exec
|
||||
UPDATE containers
|
||||
SET status = sqlc.arg(status), updated_at = now()
|
||||
WHERE bot_id = sqlc.arg(bot_id);
|
||||
|
||||
-- name: UpdateContainerStarted :exec
|
||||
UPDATE containers
|
||||
SET status = 'running', last_started_at = now(), updated_at = now()
|
||||
WHERE bot_id = sqlc.arg(bot_id);
|
||||
|
||||
-- name: UpdateContainerStopped :exec
|
||||
UPDATE containers
|
||||
SET status = 'stopped', last_stopped_at = now(), updated_at = now()
|
||||
WHERE bot_id = sqlc.arg(bot_id);
|
||||
|
||||
Reference in New Issue
Block a user