Update task delegation table migration #183
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue