From 49baab6b16e027253135521e853d14594b3ad330 Mon Sep 17 00:00:00 2001 From: romanskijdev Date: Tue, 13 Oct 2026 15:25:43 +0300 Subject: [PATCH] Update task delegation table migration --- core/db/db_migration/tables/task_delegation.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/core/db/db_migration/tables/task_delegation.go b/core/db/db_migration/tables/task_delegation.go index 152cbe7..f6349e6 100644 --- a/core/db/db_migration/tables/task_delegation.go +++ b/core/db/db_migration/tables/task_delegation.go @@ -1,22 +1,13 @@ package tablesmigration import ( + "bitrix_balancer_api/core/typescore" "gorm.io/gorm" "time" ) // Вспомогательная структура для автомиграции, чтобы не тянуть зависимости -type LocalTaskDelegation struct { - ID *uint64 `gorm:"column:id;primaryKey;autoIncrement"` - DelegatorID *uint64 `gorm:"column:delegator_id;not null"` - DelegateID *uint64 `gorm:"column:delegate_id;not null"` - ValidUntil *time.Time `gorm:"column:valid_until;not null"` - IsActive *bool `gorm:"column:is_active;not null;default:true"` - NotifiedDay *bool `gorm:"column:notified_day;not null;default:false"` - Notified2h *bool `gorm:"column:notified_2h;not null;default:false"` - CreatedAt *time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP"` - UpdatedAt *time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP"` -} +type LocalTaskDelegation typescore.TaskDelegation func (LocalTaskDelegation) TableName() string { return "task_delegations" -- 2.43.0