Files
TaskPool/internal/models/data_rel.go
T
duorameng 7f7d109438 feat(env): add tag support for environment variables and task injection
- Add generic DataRelation and DataStorage models for tags
- Update EnvService and EnvController to support tag assignment, querying, and filtering
- Integrate EnvTagsConfig in Env settings for managing environment tags
- Enhance TaskDialog environment selection to support searching and displaying env tags
- Fix missing TaskLangConfig import in RepoDialog
2026-06-08 17:39:24 +08:00

34 lines
1.0 KiB
Go

package models
import (
"github.com/engigu/baihu-panel/internal/constant"
)
// DataRelation 通用数据关联表
type DataRelation struct {
ID string `json:"id" gorm:"primaryKey;size:20"`
DataID string `json:"data_id" gorm:"size:20;index;not null"`
RelateID string `json:"relate_id" gorm:"size:20;index;not null"`
Type string `json:"type" gorm:"size:50;index;not null"`
CreatedAt LocalTime `json:"created_at"`
UpdatedAt LocalTime `json:"updated_at"`
}
func (DataRelation) TableName() string {
return constant.TablePrefix + "data_relations"
}
// DataStorage 通用数据存储表
type DataStorage struct {
ID string `json:"id" gorm:"primaryKey;size:20"`
Type string `json:"type" gorm:"size:50;index;not null"`
Name string `json:"name" gorm:"size:255;index;not null"`
Data BigText `json:"data"`
CreatedAt LocalTime `json:"created_at"`
UpdatedAt LocalTime `json:"updated_at"`
}
func (DataStorage) TableName() string {
return constant.TablePrefix + "data_storages"
}