Files
sundynix-micro-be/app/file/model/storage_config_model.go
2026-05-01 12:56:08 +08:00

27 lines
1.5 KiB
Go

package model
import (
"sundynix-micro-go/common/model"
)
// StorageConfig 动态存储配置表
type StorageConfig struct {
model.BaseModel
Type string `json:"type" gorm:"column:type;type:varchar(20);comment:存储类型(minio,aliyun,tencent,qiniu)"`
Name string `json:"name" gorm:"column:name;type:varchar(50);comment:配置名称"`
Endpoint string `json:"endpoint" gorm:"column:endpoint;type:varchar(100);comment:访问端点"`
AccessKeyId string `json:"accessKeyId" gorm:"column:access_key_id;type:varchar(100);comment:访问秘钥ID"`
AccessKeySecret string `json:"accessKeySecret" gorm:"column:access_key_secret;type:varchar(200);comment:访问秘钥"`
BucketName string `json:"bucketName" gorm:"column:bucket_name;type:varchar(50);comment:存储桶名称"`
BucketUrl string `json:"bucketUrl" gorm:"column:bucket_url;type:varchar(100);comment:绑定的外部访问域名"`
Region string `json:"region" gorm:"column:region;type:varchar(50);comment:地域节点"`
IsDefault int `json:"isDefault" gorm:"column:is_default;type:tinyint(1);default:0;comment:是否默认激活(1=是,0=否)"`
Status int `json:"status" gorm:"column:status;type:tinyint(1);default:1;comment:状态(1=启用,0=禁用)"`
Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"`
}
// TableName 指定表名
func (StorageConfig) TableName() string {
return "sundynix_storage_config"
}