复制项目

This commit is contained in:
kim.dev.6789
2026-01-14 22:16:44 +08:00
parent e2577b8cee
commit e50142a3b9
691 changed files with 97009 additions and 1 deletions

View File

@@ -0,0 +1,48 @@
// Copyright © 2023 OpenIM. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package model
import (
"time"
)
const (
SystemConfigTableName = "system_configs"
)
// SystemConfigValueType 配置值类型
const (
SystemConfigValueTypeString = 1 // 字符串
SystemConfigValueTypeNumber = 2 // 数字
SystemConfigValueTypeBool = 3 // 布尔
SystemConfigValueTypeJSON = 4 // JSON
)
// SystemConfig 系统配置表
type SystemConfig struct {
Key string `bson:"key"` // 配置键(唯一标识)
Title string `bson:"title"` // 配置标题
Value string `bson:"value"` // 配置值字符串形式存储根据ValueType解析
ValueType int32 `bson:"value_type"` // 配置值类型1-字符串2-数字3-布尔4-JSON
Description string `bson:"description"` // 配置描述
Enabled bool `bson:"enabled"` // 是否启用(用于开关类配置)
ShowInApp bool `bson:"show_in_app"` // 是否在APP端展示
CreateTime time.Time `bson:"create_time"` // 创建时间
UpdateTime time.Time `bson:"update_time"` // 更新时间
}
func (*SystemConfig) TableName() string {
return SystemConfigTableName
}