Documentation
¶
Index ¶
- Constants
- type AiMessage
- type AiSession
- type BaseAPI
- type BaseAPII18N
- type BaseAPILog
- type BaseArea
- type BaseConfig
- type BaseDataAccessLog
- type BaseDept
- type BaseDict
- type BaseDictItem
- type BaseFile
- type BaseI18N
- type BaseJob
- type BaseJobLog
- type BaseLanguage
- type BaseLoginLog
- type BaseLoginPolicy
- type BaseLoginPolicyRule
- type BaseMenu
- type BaseMessage
- type BaseMessageCategory
- type BaseMessageDelivery
- type BaseMessageDispatch
- type BaseMigration
- type BaseOperationLog
- type BasePermissionLog
- type BasePolicyEvaluationLog
- type BasePost
- type BaseRedactOutputPolicy
- type BaseRedactRule
- type BaseRedactStoragePolicy
- type BaseRedactStorageValue
- type BaseRole
- type BaseTableArchive
- type BaseTableArchiveRecord
- type BaseTableArchiveRestore
- type BaseTableBackup
- type BaseTableBackupRecord
- type BaseTableBackupRestore
- type BaseTenant
- type BaseThirdAccount
- type BaseUser
- type BaseUserMFA
- type BaseUserMFARecovery
- type BaseUserMFATotp
- type BaseUserMFAWebauthn
- type CasbinRule
- type CodeGenColumn
- type CodeGenProto
- type CodeGenTable
- type OauthClient
Constants ¶
const TableNameAiMessage = "ai_message"
const TableNameAiSession = "ai_session"
const TableNameBaseAPI = "base_api"
const TableNameBaseAPII18N = "base_api_i18n"
const TableNameBaseAPILog = "base_api_log"
const TableNameBaseArea = "base_area"
const TableNameBaseConfig = "base_config"
const TableNameBaseDataAccessLog = "base_data_access_log"
const TableNameBaseDept = "base_dept"
const TableNameBaseDict = "base_dict"
const TableNameBaseDictItem = "base_dict_item"
const TableNameBaseFile = "base_file"
const TableNameBaseI18N = "base_i18n"
const TableNameBaseJob = "base_job"
const TableNameBaseJobLog = "base_job_log"
const TableNameBaseLanguage = "base_language"
const TableNameBaseLoginLog = "base_login_log"
const TableNameBaseLoginPolicy = "base_login_policy"
const TableNameBaseLoginPolicyRule = "base_login_policy_rule"
const TableNameBaseMenu = "base_menu"
const TableNameBaseMessage = "base_message"
const TableNameBaseMessageCategory = "base_message_category"
const TableNameBaseMessageDelivery = "base_message_delivery"
const TableNameBaseMessageDispatch = "base_message_dispatch"
const TableNameBaseMigration = "base_migration"
const TableNameBaseOperationLog = "base_operation_log"
const TableNameBasePermissionLog = "base_permission_log"
const TableNameBasePolicyEvaluationLog = "base_policy_evaluation_log"
const TableNameBasePost = "base_post"
const TableNameBaseRedactOutputPolicy = "base_redact_output_policy"
const TableNameBaseRedactRule = "base_redact_rule"
const TableNameBaseRedactStoragePolicy = "base_redact_storage_policy"
const TableNameBaseRedactStorageValue = "base_redact_storage_value"
const TableNameBaseRole = "base_role"
const TableNameBaseTableArchive = "base_table_archive"
const TableNameBaseTableArchiveRecord = "base_table_archive_record"
const TableNameBaseTableArchiveRestore = "base_table_archive_restore"
const TableNameBaseTableBackup = "base_table_backup"
const TableNameBaseTableBackupRecord = "base_table_backup_record"
const TableNameBaseTableBackupRestore = "base_table_backup_restore"
const TableNameBaseTenant = "base_tenant"
const TableNameBaseThirdAccount = "base_third_account"
const TableNameBaseUser = "base_user"
const TableNameBaseUserMFA = "base_user_mfa"
const TableNameBaseUserMFARecovery = "base_user_mfa_recovery"
const TableNameBaseUserMFATotp = "base_user_mfa_totp"
const TableNameBaseUserMFAWebauthn = "base_user_mfa_webauthn"
const TableNameCasbinRule = "casbin_rule"
const TableNameCodeGenColumn = "code_gen_column"
const TableNameCodeGenProto = "code_gen_proto"
const TableNameCodeGenTable = "code_gen_table"
const TableNameOauthClient = "oauth_client"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AiMessage ¶
type AiMessage struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:消息ID" json:"id"` // 消息ID
SessionID int64 `` // 会话ID
/* 185-byte string literal not displayed */
UserID int64 `` // 所属用户ID
/* 131-byte string literal not displayed */
InputContent string `gorm:"column:input_content;type:json;not null;comment:输入内容JSON" json:"input_content"` // 输入内容JSON
OutputContent string `gorm:"column:output_content;type:json;not null;comment:输出内容JSON" json:"output_content"` // 输出内容JSON
Attachments string `gorm:"column:attachments;type:json;not null;comment:附件JSON" json:"attachments"` // 附件JSON
Tools string `gorm:"column:tools;type:json;not null;comment:工具JSON" json:"tools"` // 工具JSON
Token string `gorm:"column:token;type:json;not null;comment:Token统计JSON" json:"token"` // Token统计JSON
FirstTokenMs int32 `gorm:"column:first_token_ms;type:int;not null;comment:首Token耗时毫秒" json:"first_token_ms"` // 首Token耗时毫秒
DurationMs int32 `gorm:"column:duration_ms;type:int;not null;comment:总耗时毫秒" json:"duration_ms"` // 总耗时毫秒
Status int32 `gorm:"column:status;type:tinyint;not null;comment:消息生成状态:枚举【AiMessageStatus】" json:"status"` // 消息生成状态:枚举【AiMessageStatus】
CreatedAt time.Time `` // 创建时间
/* 140-byte string literal not displayed */
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
AiMessage AI助手消息表
type AiSession ¶
type AiSession struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:会话ID" json:"id"` // 会话ID
UserID int64 `` // 所属用户ID
/* 140-byte string literal not displayed */
Terminal int32 `` // 终端类型:枚举【Terminal】
/* 164-byte string literal not displayed */
Title string `gorm:"column:title;type:varchar(100);not null;comment:会话标题" json:"title"` // 会话标题
Summary string `gorm:"column:summary;type:varchar(255);not null;comment:会话摘要" json:"summary"` // 会话摘要
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `` // 更新时间
/* 146-byte string literal not displayed */
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
AiSession AI助手会话表
type BaseAPI ¶
type BaseAPI struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:API ID" json:"id"` // API ID
ToolName string `gorm:"column:tool_name;type:varchar(150);not null;index:idx_base_api_tool_name,priority:1;comment:工具名" json:"tool_name"` // 工具名
ToolPrompts string `gorm:"column:tool_prompts;type:json;not null;comment:工具提示词" json:"tool_prompts"` // 工具提示词
ServiceName string `gorm:"column:service_name;type:varchar(50);not null;comment:服务名" json:"service_name"` // 服务名
ServiceDesc string `gorm:"column:service_desc;type:varchar(50);not null;comment:服务描述" json:"service_desc"` // 服务描述
Desc string `gorm:"column:desc;type:varchar(500);not null;comment:描述" json:"desc"` // 描述
Operation string `gorm:"column:operation;type:varchar(255);not null;comment:操作方法" json:"operation"` // 操作方法
Method string `gorm:"column:method;type:varchar(10);not null;comment:请求方式" json:"method"` // 请求方式
Path string `gorm:"column:path;type:varchar(512);not null;comment:请求地址" json:"path"` // 请求地址
McpStatus int32 `` // MCP工具状态:枚举【Status】
/* 150-byte string literal not displayed */
AgentStatus int32 `` // Agent工具状态:枚举【Status】
/* 158-byte string literal not displayed */
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
BaseAPI API信息
type BaseAPII18N ¶ added in v0.0.28
type BaseAPII18N struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:API国际化ID" json:"id"` // API国际化ID
Operation string `` // 接口操作
/* 132-byte string literal not displayed */
Locale string `gorm:"column:locale;type:varchar(32);not null;uniqueIndex:unique_base_api_i18n,priority:2;comment:语言标识" json:"locale"` // 语言标识
ToolPrompts string `gorm:"column:tool_prompts;type:json;not null;comment:工具提示词" json:"tool_prompts"` // 工具提示词
ServiceDesc string `gorm:"column:service_desc;type:varchar(255);not null;comment:服务描述" json:"service_desc"` // 服务描述
Desc string `gorm:"column:desc;type:varchar(500);not null;comment:接口描述" json:"desc"` // 接口描述
}
BaseAPII18N API国际化信息
func (*BaseAPII18N) TableComment ¶ added in v0.0.28
func (*BaseAPII18N) TableComment() string
TableComment 返回表注释。
func (*BaseAPII18N) TableName ¶ added in v0.0.28
func (*BaseAPII18N) TableName() string
TableName BaseAPII18N's table name
type BaseAPILog ¶ added in v0.0.30
type BaseAPILog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:API日志ID" json:"id"` // API日志ID
TenantID int64 `` // 租户ID
/* 226-byte string literal not displayed */
TenantCode string `gorm:"column:tenant_code;type:varchar(64);comment:租户编码" json:"tenant_code"` // 租户编码
UserID int64 `gorm:"column:user_id;type:bigint;index:idx_base_api_log_user_occurred_at,priority:2;comment:用户ID" json:"user_id"` // 用户ID
UserName string `gorm:"column:user_name;type:varchar(128);comment:用户名称" json:"user_name"` // 用户名称
RequestID string `` // 请求ID
/* 130-byte string literal not displayed */
TraceID string `gorm:"column:trace_id;type:varchar(128);index:idx_base_api_log_trace_id,priority:1;comment:链路追踪ID" json:"trace_id"` // 链路追踪ID
ServiceName string `gorm:"column:service_name;type:varchar(128);not null;comment:服务名" json:"service_name"` // 服务名
Operation string `` // 操作方法
/* 144-byte string literal not displayed */
Method string `gorm:"column:method;type:varchar(16);not null;comment:请求方法" json:"method"` // 请求方法
Path string `gorm:"column:path;type:varchar(512);not null;comment:请求路径" json:"path"` // 请求路径
StatusCode int32 `gorm:"column:status_code;type:int;not null;comment:状态码" json:"status_code"` // 状态码
Result int32 `` // 结果:枚举【BaseLogResult】
/* 152-byte string literal not displayed */
ReasonCode string `gorm:"column:reason_code;type:varchar(64);comment:原因编码" json:"reason_code"` // 原因编码
Reason string `gorm:"column:reason;type:varchar(500);comment:原因说明" json:"reason"` // 原因说明
LatencyMs int32 `gorm:"column:latency_ms;type:int;not null;comment:耗时毫秒" json:"latency_ms"` // 耗时毫秒
RequestSize int32 `gorm:"column:request_size;type:int;not null;comment:请求大小" json:"request_size"` // 请求大小
ResponseSize int32 `gorm:"column:response_size;type:int;not null;comment:响应大小" json:"response_size"` // 响应大小
ClientIP string `gorm:"column:client_ip;type:varchar(64);comment:客户端IP" json:"client_ip"` // 客户端IP
UserAgent string `gorm:"column:user_agent;type:varchar(1024);comment:用户代理" json:"user_agent"` // 用户代理
OccurredAt time.Time `` // 事件发生时间
/* 310-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;comment:日志创建时间" json:"created_at"` // 日志创建时间
}
BaseAPILog API访问日志表
func (*BaseAPILog) TableComment ¶ added in v0.0.30
func (*BaseAPILog) TableComment() string
TableComment 返回表注释。
func (*BaseAPILog) TableName ¶ added in v0.0.30
func (*BaseAPILog) TableName() string
TableName BaseAPILog's table name
type BaseArea ¶
type BaseArea struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:区域ID" json:"id"` // 区域ID
ParentID int64 `gorm:"column:parent_id;type:bigint;not null;index:idx_base_area_parent_id,priority:1;comment:父级区域ID" json:"parent_id"` // 父级区域ID
Name string `gorm:"column:name;type:varchar(50);not null;comment:区域名称" json:"name"` // 区域名称
}
BaseArea 行政区域信息
type BaseConfig ¶
type BaseConfig struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:系统配置ID" json:"id"` // 系统配置ID
Site int32 `` // 位置:枚举【BaseConfigSite】
/* 138-byte string literal not displayed */
Name string `gorm:"column:name;type:varchar(50);not null;comment:配置名称" json:"name"` // 配置名称
Type int32 `` // 配置类型:1文本,2图片,3富文本,4字典,5布尔,6表单
/* 136-byte string literal not displayed */
Key string `gorm:"column:key;type:varchar(50);not null;uniqueIndex:unique_base_config,priority:2;comment:配置key" json:"key"` // 配置key
Value string `gorm:"column:value;type:text;not null;comment:配置值" json:"value"` // 配置值
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 152-byte string literal not displayed */
}
BaseConfig 参数配置
func (*BaseConfig) TableName ¶
func (*BaseConfig) TableName() string
TableName BaseConfig's table name
type BaseDataAccessLog ¶ added in v0.0.30
type BaseDataAccessLog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:数据访问日志ID" json:"id"` // 数据访问日志ID
TenantID int64 `` // 租户ID
/* 296-byte string literal not displayed */
TenantCode string `gorm:"column:tenant_code;type:varchar(64);not null;comment:租户编码" json:"tenant_code"` // 租户编码
UserID int64 `gorm:"column:user_id;type:bigint;comment:用户ID" json:"user_id"` // 用户ID
UserName string `gorm:"column:user_name;type:varchar(128);comment:用户名称" json:"user_name"` // 用户名称
RequestID string `` // 请求ID
/* 129-byte string literal not displayed */
TraceID string `` // 链路追踪ID
/* 130-byte string literal not displayed */
ResourceType string `` // 资源类型
/* 147-byte string literal not displayed */
ResourceID string `` // 资源ID
/* 130-byte string literal not displayed */
AccessType int32 `` // 访问类型:枚举【BaseDataAccessType】
/* 174-byte string literal not displayed */
DataSource string `gorm:"column:data_source;type:varchar(64);not null;comment:数据源" json:"data_source"` // 数据源
TableName_ string `gorm:"column:table_name;type:varchar(128);comment:数据表名" json:"table_name"` // 数据表名
FieldScope string `gorm:"column:field_scope;type:json;comment:访问字段范围" json:"field_scope"` // 访问字段范围
DataScope string `gorm:"column:data_scope;type:varchar(128);comment:数据范围" json:"data_scope"` // 数据范围
AffectedRows int32 `gorm:"column:affected_rows;type:int;not null;comment:影响行数" json:"affected_rows"` // 影响行数
Sensitive int32 `` // 是否敏感数据
/* 141-byte string literal not displayed */
SqlText string `gorm:"column:sql_text;type:text;comment:脱敏SQL" json:"sql_text"` // 脱敏SQL
SqlDigest string `` // SQL指纹
/* 127-byte string literal not displayed */
Result int32 `gorm:"column:result;type:tinyint;not null;comment:结果:枚举【BaseLogResult】" json:"result"` // 结果:枚举【BaseLogResult】
ReasonCode string `gorm:"column:reason_code;type:varchar(64);comment:原因编码" json:"reason_code"` // 原因编码
LatencyMs int32 `gorm:"column:latency_ms;type:int;not null;comment:耗时毫秒" json:"latency_ms"` // 耗时毫秒
OccurredAt time.Time `` // 事件发生时间
/* 315-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;comment:日志创建时间" json:"created_at"` // 日志创建时间
}
BaseDataAccessLog 数据访问日志表
func (*BaseDataAccessLog) TableComment ¶ added in v0.0.30
func (*BaseDataAccessLog) TableComment() string
TableComment 返回表注释。
func (*BaseDataAccessLog) TableName ¶ added in v0.0.30
func (*BaseDataAccessLog) TableName() string
TableName BaseDataAccessLog's table name
type BaseDept ¶
type BaseDept struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:部门ID" json:"id"` // 部门ID
TenantID int64 `gorm:"column:tenant_id;type:bigint;not null;index:idx_base_dept_tenant_id,priority:1;comment:租户ID" json:"tenant_id"` // 租户ID
ParentID int64 `gorm:"column:parent_id;type:bigint;not null;index:idx_base_dept_parent_id,priority:1;comment:父菜单ID" json:"parent_id"` // 父菜单ID
Path string `gorm:"column:path;type:varchar(255);not null;comment:部门路径" json:"path"` // 部门路径
Name string `gorm:"column:name;type:varchar(255);not null;comment:名字" json:"name"` // 名字
Sort int32 `gorm:"column:sort;type:tinyint;not null;comment:排序" json:"sort"` // 排序
Remark string `gorm:"column:remark;type:varchar(500);comment:备注" json:"remark"` // 备注
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
BaseDept 部门信息
type BaseDict ¶
type BaseDict struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:主键" json:"id"` // 主键
Code string `gorm:"column:code;type:varchar(50);not null;uniqueIndex:unique_base_dict,priority:1;comment:字典编码" json:"code"` // 字典编码
Name string `gorm:"column:name;type:varchar(50);not null;comment:字典名称" json:"name"` // 字典名称
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 150-byte string literal not displayed */
}
BaseDict 字典信息
type BaseDictItem ¶
type BaseDictItem struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:字典属性ID" json:"id"` // 字典属性ID
DictID int64 `gorm:"column:dict_id;type:bigint;not null;uniqueIndex:unique_base_dict,priority:1;comment:字典ID" json:"dict_id"` // 字典ID
Value string `gorm:"column:value;type:varchar(50);not null;uniqueIndex:unique_base_dict,priority:2;comment:字典属性值" json:"value"` // 字典属性值
Label string `gorm:"column:label;type:varchar(100);not null;comment:字典属性标签" json:"label"` // 字典属性标签
TagType string `` // 标签类型,用于前端样式展示(如success、warning等)
/* 132-byte string literal not displayed */
Sort int32 `gorm:"column:sort;type:int;not null;comment:排序" json:"sort"` // 排序
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 150-byte string literal not displayed */
}
BaseDictItem 字典属性信息
func (*BaseDictItem) TableName ¶
func (*BaseDictItem) TableName() string
TableName BaseDictItem's table name
type BaseFile ¶ added in v0.0.30
type BaseFile struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:文件ID" json:"id"` // 文件ID
TenantID int64 `` // 租户ID
/* 230-byte string literal not displayed */
Provider int32 `gorm:"column:provider;type:tinyint;not null;comment:存储供应商" json:"provider"` // 存储供应商
BucketName string `gorm:"column:bucket_name;type:varchar(255);comment:存储桶名称" json:"bucket_name"` // 存储桶名称
FileDirectory string `gorm:"column:file_directory;type:varchar(1024);comment:文件目录" json:"file_directory"` // 文件目录
FileGUID string `` // 文件唯一标识
/* 145-byte string literal not displayed */
SaveFileName string `gorm:"column:save_file_name;type:varchar(255);not null;comment:实际存储文件名" json:"save_file_name"` // 实际存储文件名
FileName string `` // 原始文件名
/* 132-byte string literal not displayed */
Extension string `gorm:"column:extension;type:varchar(32);index:idx_base_file_extension,priority:1;comment:文件扩展名" json:"extension"` // 文件扩展名
MimeType string `gorm:"column:mime_type;type:varchar(128);comment:文件MIME类型" json:"mime_type"` // 文件MIME类型
Size int64 `gorm:"column:size;type:bigint unsigned;not null;comment:文件大小(字节)" json:"size"` // 文件大小(字节)
LinkURL string `gorm:"column:link_url;type:varchar(2048);comment:文件访问地址" json:"link_url"` // 文件访问地址
ContentHash string `` // 文件内容SHA-256哈希
/* 145-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
DeletedBy int64 `gorm:"column:deleted_by;type:bigint;not null;comment:删除者ID" json:"deleted_by"` // 删除者ID
CreatedAt time.Time `` // 创建时间
/* 138-byte string literal not displayed */
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3);not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
BaseFile 文件元数据表
func (*BaseFile) TableComment ¶ added in v0.0.30
TableComment 返回表注释。
type BaseI18N ¶ added in v0.0.28
type BaseI18N struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
TargetType int32 `` // 目标类型:枚举【I18nTargetType】
/* 156-byte string literal not displayed */
TargetID int64 `gorm:"column:target_id;type:bigint;not null;uniqueIndex:unique_base_i18n,priority:2;comment:目标ID" json:"target_id"` // 目标ID
Locale string `gorm:"column:locale;type:varchar(16);not null;uniqueIndex:unique_base_i18n,priority:3;comment:语言区域" json:"locale"` // 语言区域
Name string `gorm:"column:name;type:text;comment:翻译文本" json:"name"` // 翻译文本
}
BaseI18N 国际化翻译信息
func (*BaseI18N) TableComment ¶ added in v0.0.28
TableComment 返回表注释。
type BaseJob ¶
type BaseJob struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:任务ID" json:"id"` // 任务ID
Name string `gorm:"column:name;type:varchar(50);not null;comment:任务名称" json:"name"` // 任务名称
InvokeTarget string `` // 调用目标
/* 135-byte string literal not displayed */
Args string `gorm:"column:args;type:json;comment:目标参数" json:"args"` // 目标参数
CronExpression string `gorm:"column:cron_expression;type:varchar(50);not null;comment:cron表达式" json:"cron_expression"` // cron表达式
EntryID int32 `gorm:"column:entry_id;type:smallint;comment:job启动时返回的id" json:"entry_id"` // job启动时返回的id
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 149-byte string literal not displayed */
}
BaseJob 定时任务信息
type BaseJobLog ¶
type BaseJobLog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:任务日志ID" json:"id"` // 任务日志ID
JobID int64 `gorm:"column:job_id;type:bigint;not null;index:idx_base_job_log_job_id,priority:1;comment:任务ID" json:"job_id"` // 任务ID
Input string `gorm:"column:input;type:varchar(1024);comment:执行参数" json:"input"` // 执行参数
Output string `gorm:"column:output;type:text;comment:输出结果" json:"output"` // 输出结果
Error string `gorm:"column:error;type:text;comment:错误信息" json:"error"` // 错误信息
ProcessTime int32 `gorm:"column:process_time;type:int;not null;comment:消耗时间/毫秒" json:"process_time"` // 消耗时间/毫秒
ExecuteTime time.Time `gorm:"column:execute_time;type:datetime;not null;comment:执行时间" json:"execute_time"` // 执行时间
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【BaseJobLogStatus】" json:"status"` // 状态:枚举【BaseJobLogStatus】
}
BaseJobLog 定时任务日志信息
func (*BaseJobLog) TableName ¶
func (*BaseJobLog) TableName() string
TableName BaseJobLog's table name
type BaseLanguage ¶ added in v0.0.21
type BaseLanguage struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:语言ID" json:"id"` // 语言ID
LanguageCode string `` // 标准语言代码
/* 145-byte string literal not displayed */
LanguageName string `` // 语言名称
/* 135-byte string literal not displayed */
NativeName string `` // 本地语言名称
/* 144-byte string literal not displayed */
Sort int32 `` // 排序,值越小越靠前
/* 131-byte string literal not displayed */
IsPrimary bool `gorm:"column:is_primary;type:tinyint(1);not null;comment:是否主语言" json:"is_primary"` // 是否主语言
Status int32 `` // 启用状态:枚举【Status】
/* 145-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 154-byte string literal not displayed */
}
BaseLanguage 语言信息
func (*BaseLanguage) TableComment ¶ added in v0.0.21
func (*BaseLanguage) TableComment() string
TableComment 返回表注释。
func (*BaseLanguage) TableName ¶ added in v0.0.21
func (*BaseLanguage) TableName() string
TableName BaseLanguage's table name
type BaseLoginLog ¶ added in v0.0.30
type BaseLoginLog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:登录日志ID" json:"id"` // 登录日志ID
TenantID int64 `` // 租户ID
/* 232-byte string literal not displayed */
TenantCode string `gorm:"column:tenant_code;type:varchar(64);comment:租户编码" json:"tenant_code"` // 租户编码
UserID int64 `gorm:"column:user_id;type:bigint;index:idx_base_login_log_user_occurred_at,priority:2;comment:用户ID" json:"user_id"` // 用户ID
UserName string `gorm:"column:user_name;type:varchar(128);comment:账号名" json:"user_name"` // 账号名
LoginType int32 `gorm:"column:login_type;type:tinyint;not null;comment:登录类型:枚举【BaseLoginLogType】" json:"login_type"` // 登录类型:枚举【BaseLoginLogType】
Result int32 `` // 结果:枚举【BaseLogResult】
/* 154-byte string literal not displayed */
ReasonCode string `gorm:"column:reason_code;type:varchar(64);comment:原因编码" json:"reason_code"` // 原因编码
Reason string `gorm:"column:reason;type:varchar(500);comment:原因说明" json:"reason"` // 原因说明
ClientIP string `` // 客户端IP
/* 128-byte string literal not displayed */
UserAgent string `gorm:"column:user_agent;type:varchar(1024);comment:用户代理" json:"user_agent"` // 用户代理
DeviceID string `gorm:"column:device_id;type:varchar(128);comment:设备标识" json:"device_id"` // 设备标识
RequestID string `gorm:"column:request_id;type:varchar(64);index:idx_base_login_log_request_id,priority:1;comment:请求ID" json:"request_id"` // 请求ID
TraceID string `gorm:"column:trace_id;type:varchar(128);index:idx_base_login_log_trace_id,priority:1;comment:链路追踪ID" json:"trace_id"` // 链路追踪ID
OccurredAt time.Time `` // 事件发生时间
/* 311-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;comment:日志创建时间" json:"created_at"` // 日志创建时间
}
BaseLoginLog 登录日志表
func (*BaseLoginLog) TableComment ¶ added in v0.0.30
func (*BaseLoginLog) TableComment() string
TableComment 返回表注释。
func (*BaseLoginLog) TableName ¶ added in v0.0.30
func (*BaseLoginLog) TableName() string
TableName BaseLoginLog's table name
type BaseLoginPolicy ¶ added in v0.0.32
type BaseLoginPolicy struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:登录策略ID" json:"id"` // 登录策略ID
ScopeType int32 `` // 作用域类型:枚举【BaseLoginPolicyScopeType】
/* 225-byte string literal not displayed */
TenantID int64 `` // 租户ID
/* 175-byte string literal not displayed */
UserID int64 `` // 用户ID
/* 169-byte string literal not displayed */
MaxFailedAttempts int32 `gorm:"column:max_failed_attempts;type:int;not null;comment:最大登录失败次数" json:"max_failed_attempts"` // 最大登录失败次数
LockDurationMinutes int32 `gorm:"column:lock_duration_minutes;type:int;not null;comment:锁定时长(分钟)" json:"lock_duration_minutes"` // 锁定时长(分钟)
AllowConcurrentLogin int32 `gorm:"column:allow_concurrent_login;type:tinyint;not null;comment:是否允许同时登录" json:"allow_concurrent_login"` // 是否允许同时登录
PasswordMinLength int32 `gorm:"column:password_min_length;type:int;not null;comment:密码最小长度" json:"password_min_length"` // 密码最小长度
PasswordHistoryCount int32 `` // 禁止重复使用的历史密码数量,0表示不启用
/* 151-byte string literal not displayed */
PasswordMinComplexityClasses int32 `` // 密码至少满足的字符类别数量
/* 150-byte string literal not displayed */
PasswordMaxAgeDays int32 `` // 密码有效期(天),0表示不启用
/* 134-byte string literal not displayed */
MFARememberDays int32 `` // MFA设备免验证天数,0表示每次登录都验证
/* 138-byte string literal not displayed */
InitialPasswordHash string `` // 初始化密码哈希,不保存明文
/* 139-byte string literal not displayed */
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 158-byte string literal not displayed */
}
BaseLoginPolicy 登录策略
func (*BaseLoginPolicy) TableComment ¶ added in v0.0.32
func (*BaseLoginPolicy) TableComment() string
TableComment 返回表注释。
func (*BaseLoginPolicy) TableName ¶ added in v0.0.32
func (*BaseLoginPolicy) TableName() string
TableName BaseLoginPolicy's table name
type BaseLoginPolicyRule ¶ added in v0.0.32
type BaseLoginPolicyRule struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:登录策略规则ID" json:"id"` // 登录策略规则ID
PolicyID int64 `` // 登录策略ID
/* 191-byte string literal not displayed */
RestrictionType int32 `` // 限制类型:枚举【BaseLoginPolicyRestrictionType】
/* 195-byte string literal not displayed */
RestrictionMethod int32 `` // 限制方式:枚举【BaseLoginPolicyRestrictionMethod】
/* 252-byte string literal not displayed */
RestrictionValue string `` // 限制值
/* 154-byte string literal not displayed */
Reason string `gorm:"column:reason;type:varchar(500);not null;comment:限制原因" json:"reason"` // 限制原因
Status int32 `` // 状态:枚举【Status】
/* 143-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 163-byte string literal not displayed */
}
BaseLoginPolicyRule 登录策略规则
func (*BaseLoginPolicyRule) TableComment ¶ added in v0.0.32
func (*BaseLoginPolicyRule) TableComment() string
TableComment 返回表注释。
func (*BaseLoginPolicyRule) TableName ¶ added in v0.0.32
func (*BaseLoginPolicyRule) TableName() string
TableName BaseLoginPolicyRule's table name
type BaseMenu ¶
type BaseMenu struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:菜单ID" json:"id"` // 菜单ID
ParentID int64 `gorm:"column:parent_id;type:bigint;not null;index:idx_base_menu_parent_id,priority:1;comment:父级菜单ID" json:"parent_id"` // 父级菜单ID
Type int32 `gorm:"column:type;type:tinyint;not null;comment:菜单类型:枚举【BaseMenuType】" json:"type"` // 菜单类型:枚举【BaseMenuType】
Path string `` // 路径,当其类型为'按钮'的时候对应的按钮权限base:user:create
/* 143-byte string literal not displayed */
Name string `` // 路由命名,然后我们可以使用 name 而不是 path 来传递 to 属性给 <router-link>。如果需要开启缓存,需保证页面 defineOptions 中的 name 与此处一致,建议使用驼峰。
/* 264-byte string literal not displayed */
Component string `gorm:"column:component;type:varchar(255);comment:前端页面组件" json:"component"` // 前端页面组件
Redirect string `gorm:"column:redirect;type:varchar(1024);comment:重定向地址" json:"redirect"` // 重定向地址
Meta string `gorm:"column:meta;type:json;not null;comment:前端页面组件" json:"meta"` // 前端页面组件
API string `gorm:"column:api;type:json;not null;comment:分配的API列表" json:"api"` // 分配的API列表
Sort int32 `gorm:"column:sort;type:int;not null;comment:排序" json:"sort"` // 排序
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
BaseMenu 菜单信息
type BaseMessage ¶ added in v0.0.30
type BaseMessage struct {
ID int64 `` // 消息ID
/* 305-byte string literal not displayed */
TenantID int64 `` // 租户ID
/* 235-byte string literal not displayed */
CategoryID int64 `` // 消息分类ID
/* 151-byte string literal not displayed */
SourceType int32 `gorm:"column:source_type;type:tinyint;not null;comment:来源类型:枚举【MessageSourceType】" json:"source_type"` // 来源类型:枚举【MessageSourceType】
Source string `gorm:"column:source;type:varchar(64);not null;uniqueIndex:unique_base_message,priority:2;comment:来源标识" json:"source"` // 来源标识
IdempotencyKey string `` // 幂等键
/* 131-byte string literal not displayed */
PayloadHash string `gorm:"column:payload_hash;type:char(64);comment:消息载荷SHA256摘要" json:"payload_hash"` // 消息载荷SHA256摘要
SenderType int32 `gorm:"column:sender_type;type:tinyint;not null;comment:发送者类型:枚举【MessageSenderType】" json:"sender_type"` // 发送者类型:枚举【MessageSenderType】
SenderID int64 `gorm:"column:sender_id;type:bigint;not null;comment:发送者ID" json:"sender_id"` // 发送者ID
SenderName string `gorm:"column:sender_name;type:varchar(50);comment:发送者名称快照" json:"sender_name"` // 发送者名称快照
Priority int32 `gorm:"column:priority;type:tinyint;not null;comment:消息优先级:枚举【MessagePriority】" json:"priority"` // 消息优先级:枚举【MessagePriority】
Title string `gorm:"column:title;type:varchar(200);not null;comment:消息标题" json:"title"` // 消息标题
Content string `gorm:"column:content;type:mediumtext;not null;comment:消息正文" json:"content"` // 消息正文
ContentFormat int32 `` // 正文格式:枚举【MessageContentFormat】
/* 128-byte string literal not displayed */
ActionType int32 `gorm:"column:action_type;type:tinyint;not null;comment:动作类型:枚举【MessageActionType】" json:"action_type"` // 动作类型:枚举【MessageActionType】
ActionTarget string `gorm:"column:action_target;type:varchar(255);comment:动作目标" json:"action_target"` // 动作目标
ActionParams string `gorm:"column:action_params;type:json;not null;comment:动作参数" json:"action_params"` // 动作参数
ScheduledAt int64 `` // 计划发布时间戳,毫秒
/* 160-byte string literal not displayed */
PublishedAt int64 `gorm:"column:published_at;type:bigint;not null;comment:发布时间戳,毫秒" json:"published_at"` // 发布时间戳,毫秒
RevokedAt int64 `gorm:"column:revoked_at;type:bigint;not null;comment:撤回时间戳,毫秒" json:"revoked_at"` // 撤回时间戳,毫秒
ExpiresAt int64 `` // 过期时间戳,毫秒
/* 148-byte string literal not displayed */
RecipientTotal int64 `gorm:"column:recipient_total;type:bigint;not null;comment:目标人数" json:"recipient_total"` // 目标人数
DeliveredTotal int64 `gorm:"column:delivered_total;type:bigint;not null;comment:已投递人数" json:"delivered_total"` // 已投递人数
FailedTotal int64 `gorm:"column:failed_total;type:bigint;not null;comment:失败人数" json:"failed_total"` // 失败人数
Version int64 `gorm:"column:version;type:bigint;not null;comment:乐观锁版本" json:"version"` // 乐观锁版本
Status int32 `` // 消息状态:枚举【MessageStatus】
/* 325-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `` // 创建时间
/* 200-byte string literal not displayed */
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 153-byte string literal not displayed */
}
BaseMessage 消息信息
func (*BaseMessage) TableComment ¶ added in v0.0.30
func (*BaseMessage) TableComment() string
TableComment 返回表注释。
func (*BaseMessage) TableName ¶ added in v0.0.30
func (*BaseMessage) TableName() string
TableName BaseMessage's table name
type BaseMessageCategory ¶ added in v0.0.30
type BaseMessageCategory struct {
ID int64 `` // 消息分类ID
/* 146-byte string literal not displayed */
Code string `` // 分类编码
/* 129-byte string literal not displayed */
Name string `gorm:"column:name;type:varchar(50);not null;comment:分类名称" json:"name"` // 分类名称
Icon string `gorm:"column:icon;type:varchar(100);comment:分类图标" json:"icon"` // 分类图标
Color string `gorm:"column:color;type:varchar(20);comment:分类颜色" json:"color"` // 分类颜色
Sort int32 `gorm:"column:sort;type:int;not null;index:idx_base_message_category_status_sort,priority:2;comment:排序" json:"sort"` // 排序
DefaultPriority int32 `` // 默认优先级:枚举【MessagePriority】
/* 130-byte string literal not displayed */
RetentionDays int32 `gorm:"column:retention_days;type:int;not null;comment:保留天数,0表示使用系统默认值" json:"retention_days"` // 保留天数,0表示使用系统默认值
AllowArchive bool `gorm:"column:allow_archive;type:tinyint(1);not null;comment:是否允许用户归档" json:"allow_archive"` // 是否允许用户归档
AllowDelete bool `gorm:"column:allow_delete;type:tinyint(1);not null;comment:是否允许用户删除" json:"allow_delete"` // 是否允许用户删除
Status int32 `` // 状态:枚举【Status】
/* 147-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 162-byte string literal not displayed */
}
BaseMessageCategory 消息分类
func (*BaseMessageCategory) TableComment ¶ added in v0.0.30
func (*BaseMessageCategory) TableComment() string
TableComment 返回表注释。
func (*BaseMessageCategory) TableName ¶ added in v0.0.30
func (*BaseMessageCategory) TableName() string
TableName BaseMessageCategory's table name
type BaseMessageDelivery ¶ added in v0.0.30
type BaseMessageDelivery struct {
ID int64 `` // 消息投递ID
/* 292-byte string literal not displayed */
TenantID int64 `` // 租户ID
/* 331-byte string literal not displayed */
MessageID int64 `` // 消息ID
/* 196-byte string literal not displayed */
UserID int64 `` // 接收用户ID
/* 269-byte string literal not displayed */
ReceivedAt time.Time `gorm:"column:received_at;type:datetime;not null;comment:接收时间" json:"received_at"` // 接收时间
ExpiresAt int64 `gorm:"column:expires_at;type:bigint;not null;comment:过期时间戳,毫秒" json:"expires_at"` // 过期时间戳,毫秒
ReadAt int64 `` // 已读时间戳,毫秒
/* 158-byte string literal not displayed */
ArchivedAt int64 `` // 归档时间戳,毫秒
/* 167-byte string literal not displayed */
RevokedAt int64 `` // 撤回时间戳,毫秒
/* 164-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 299-byte string literal not displayed */
}
BaseMessageDelivery 用户消息投递
func (*BaseMessageDelivery) TableComment ¶ added in v0.0.30
func (*BaseMessageDelivery) TableComment() string
TableComment 返回表注释。
func (*BaseMessageDelivery) TableName ¶ added in v0.0.30
func (*BaseMessageDelivery) TableName() string
TableName BaseMessageDelivery's table name
type BaseMessageDispatch ¶ added in v0.0.30
type BaseMessageDispatch struct {
ID int64 `` // 消息投递任务ID
/* 158-byte string literal not displayed */
TenantID int64 `` // 租户ID
/* 149-byte string literal not displayed */
MessageID int64 `` // 消息ID
/* 203-byte string literal not displayed */
AudienceType int32 `` // 受众类型:枚举【MessageAudienceType】
/* 177-byte string literal not displayed */
AudienceID int64 `` // 受众ID
/* 134-byte string literal not displayed */
IncludeChildren bool `` // 是否包含子部门
/* 161-byte string literal not displayed */
CursorUserID int64 `gorm:"column:cursor_user_id;type:bigint;not null;comment:用户分页游标" json:"cursor_user_id"` // 用户分页游标
BatchSize int32 `gorm:"column:batch_size;type:int;not null;comment:批次大小" json:"batch_size"` // 批次大小
MatchedTotal int64 `gorm:"column:matched_total;type:bigint;not null;comment:匹配人数" json:"matched_total"` // 匹配人数
InsertedTotal int64 `gorm:"column:inserted_total;type:bigint;not null;comment:新增投递人数" json:"inserted_total"` // 新增投递人数
AttemptCount int32 `gorm:"column:attempt_count;type:int;not null;comment:尝试次数" json:"attempt_count"` // 尝试次数
NextRetryAt int64 `` // 下次重试时间戳,毫秒
/* 169-byte string literal not displayed */
LastError string `gorm:"column:last_error;type:varchar(500);comment:最近错误" json:"last_error"` // 最近错误
LockToken string `gorm:"column:lock_token;type:varchar(64);comment:执行租约标识" json:"lock_token"` // 执行租约标识
LockedUntil int64 `` // 执行租约截止时间戳,毫秒
/* 173-byte string literal not displayed */
Version int64 `gorm:"column:version;type:bigint;not null;comment:乐观锁版本" json:"version"` // 乐观锁版本
QueuedAt int64 `gorm:"column:queued_at;type:bigint;not null;comment:入队时间戳,毫秒" json:"queued_at"` // 入队时间戳,毫秒
StartedAt int64 `gorm:"column:started_at;type:bigint;not null;comment:开始时间戳,毫秒" json:"started_at"` // 开始时间戳,毫秒
CompletedAt int64 `gorm:"column:completed_at;type:bigint;not null;comment:完成时间戳,毫秒" json:"completed_at"` // 完成时间戳,毫秒
Status int32 `` // 投递状态:枚举【MessageDispatchStatus】
/* 245-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 162-byte string literal not displayed */
}
BaseMessageDispatch 消息投递任务
func (*BaseMessageDispatch) TableComment ¶ added in v0.0.30
func (*BaseMessageDispatch) TableComment() string
TableComment 返回表注释。
func (*BaseMessageDispatch) TableName ¶ added in v0.0.30
func (*BaseMessageDispatch) TableName() string
TableName BaseMessageDispatch's table name
type BaseMigration ¶
type BaseMigration struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
Module string `` // 迁移模块
/* 126-byte string literal not displayed */
DataSource string `` // 数据源
/* 133-byte string literal not displayed */
Version string `` // 迁移版本
/* 128-byte string literal not displayed */
UpFiles string `gorm:"column:up_files;type:json;comment:升级脚本文件引用" json:"up_files"` // 升级脚本文件引用
DownFiles string `gorm:"column:down_files;type:json;comment:回退脚本文件引用" json:"down_files"` // 回退脚本文件引用
DescriptionFiles string `gorm:"column:description_files;type:json;comment:升级说明文件引用" json:"description_files"` // 升级说明文件引用
CreatedAt time.Time `gorm:"column:created_at;type:datetime;comment:创建时间" json:"created_at"` // 创建时间
}
BaseMigration 数据库迁移记录
func (*BaseMigration) TableComment ¶
func (*BaseMigration) TableComment() string
TableComment 返回表注释。
func (*BaseMigration) TableName ¶
func (*BaseMigration) TableName() string
TableName BaseMigration's table name
type BaseOperationLog ¶ added in v0.0.30
type BaseOperationLog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:操作日志ID" json:"id"` // 操作日志ID
TenantID int64 `` // 租户ID
/* 302-byte string literal not displayed */
TenantCode string `gorm:"column:tenant_code;type:varchar(64);not null;comment:租户编码" json:"tenant_code"` // 租户编码
UserID int64 `gorm:"column:user_id;type:bigint;index:idx_base_operation_log_user_occurred_at,priority:2;comment:用户ID" json:"user_id"` // 用户ID
UserName string `gorm:"column:user_name;type:varchar(128);comment:用户名称" json:"user_name"` // 用户名称
RequestID string `` // 请求ID
/* 127-byte string literal not displayed */
TraceID string `` // 链路追踪ID
/* 128-byte string literal not displayed */
ResourceType string `` // 资源类型
/* 145-byte string literal not displayed */
ResourceID string `` // 资源ID
/* 128-byte string literal not displayed */
ResourceName string `gorm:"column:resource_name;type:varchar(255);comment:资源名称" json:"resource_name"` // 资源名称
Action int32 `` // 操作动作:枚举【BaseOperationAction】
/* 170-byte string literal not displayed */
ChangedFields string `gorm:"column:changed_fields;type:json;comment:变更字段" json:"changed_fields"` // 变更字段
BeforeData string `gorm:"column:before_data;type:json;comment:变更前数据" json:"before_data"` // 变更前数据
AfterData string `gorm:"column:after_data;type:json;comment:变更后数据" json:"after_data"` // 变更后数据
Result int32 `gorm:"column:result;type:tinyint;not null;comment:结果:枚举【BaseLogResult】" json:"result"` // 结果:枚举【BaseLogResult】
ReasonCode string `gorm:"column:reason_code;type:varchar(64);comment:原因编码" json:"reason_code"` // 原因编码
Reason string `gorm:"column:reason;type:varchar(500);comment:原因说明" json:"reason"` // 原因说明
OccurredAt time.Time `` // 事件发生时间
/* 321-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;comment:日志创建时间" json:"created_at"` // 日志创建时间
}
BaseOperationLog 业务操作日志表
func (*BaseOperationLog) TableComment ¶ added in v0.0.30
func (*BaseOperationLog) TableComment() string
TableComment 返回表注释。
func (*BaseOperationLog) TableName ¶ added in v0.0.30
func (*BaseOperationLog) TableName() string
TableName BaseOperationLog's table name
type BasePermissionLog ¶ added in v0.0.30
type BasePermissionLog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:权限日志ID" json:"id"` // 权限日志ID
TenantID int64 `` // 租户ID
/* 304-byte string literal not displayed */
TenantCode string `gorm:"column:tenant_code;type:varchar(64);not null;comment:租户编码" json:"tenant_code"` // 租户编码
UserID int64 `gorm:"column:user_id;type:bigint;index:idx_base_permission_log_user_occurred_at,priority:2;comment:用户ID" json:"user_id"` // 用户ID
UserName string `gorm:"column:user_name;type:varchar(128);comment:用户名称" json:"user_name"` // 用户名称
RequestID string `` // 请求ID
/* 128-byte string literal not displayed */
TraceID string `` // 链路追踪ID
/* 129-byte string literal not displayed */
TargetType int32 `` // 目标类型:枚举【BasePermissionTargetType】
/* 174-byte string literal not displayed */
TargetID string `gorm:"column:target_id;type:varchar(128);index:idx_base_permission_log_target,priority:3;comment:目标ID" json:"target_id"` // 目标ID
TargetName string `gorm:"column:target_name;type:varchar(255);comment:目标名称" json:"target_name"` // 目标名称
Action int32 `` // 权限动作:枚举【BasePermissionAction】
/* 172-byte string literal not displayed */
OldValue string `gorm:"column:old_value;type:json;comment:变更前权限" json:"old_value"` // 变更前权限
NewValue string `gorm:"column:new_value;type:json;comment:变更后权限" json:"new_value"` // 变更后权限
Result int32 `gorm:"column:result;type:tinyint;not null;comment:结果:枚举【BaseLogResult】" json:"result"` // 结果:枚举【BaseLogResult】
ReasonCode string `gorm:"column:reason_code;type:varchar(64);comment:原因编码" json:"reason_code"` // 原因编码
Reason string `gorm:"column:reason;type:varchar(500);comment:原因说明" json:"reason"` // 原因说明
OccurredAt time.Time `` // 事件发生时间
/* 323-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;comment:日志创建时间" json:"created_at"` // 日志创建时间
}
BasePermissionLog 权限日志表
func (*BasePermissionLog) TableComment ¶ added in v0.0.30
func (*BasePermissionLog) TableComment() string
TableComment 返回表注释。
func (*BasePermissionLog) TableName ¶ added in v0.0.30
func (*BasePermissionLog) TableName() string
TableName BasePermissionLog's table name
type BasePolicyEvaluationLog ¶ added in v0.0.30
type BasePolicyEvaluationLog struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:策略评估日志ID" json:"id"` // 策略评估日志ID
TenantID int64 `` // 租户ID
/* 313-byte string literal not displayed */
TenantCode string `gorm:"column:tenant_code;type:varchar(64);not null;comment:租户编码" json:"tenant_code"` // 租户编码
UserID int64 `gorm:"column:user_id;type:bigint;index:idx_base_policy_evaluation_log_subject,priority:2;comment:用户ID" json:"user_id"` // 用户ID
UserName string `gorm:"column:user_name;type:varchar(128);comment:用户名称" json:"user_name"` // 用户名称
RoleID int64 `gorm:"column:role_id;type:bigint;comment:角色ID" json:"role_id"` // 角色ID
RoleCode string `gorm:"column:role_code;type:varchar(128);comment:角色编码" json:"role_code"` // 角色编码
RequestID string `` // 请求ID
/* 135-byte string literal not displayed */
TraceID string `` // 链路追踪ID
/* 136-byte string literal not displayed */
ClientIP string `gorm:"column:client_ip;type:varchar(64);comment:客户端IP" json:"client_ip"` // 客户端IP
Engine string `gorm:"column:engine;type:varchar(32);not null;comment:鉴权引擎" json:"engine"` // 鉴权引擎
EvaluationType int32 `` // 评估类型:枚举【BasePolicyEvaluationType】
/* 134-byte string literal not displayed */
Resource string `` // 资源
/* 137-byte string literal not displayed */
Action string `` // 动作
/* 132-byte string literal not displayed */
Project string `gorm:"column:project;type:varchar(128);comment:项目范围" json:"project"` // 项目范围
Decision int32 `` // 决策结果:枚举【BasePolicyDecision】
/* 178-byte string literal not displayed */
ReasonCode string `gorm:"column:reason_code;type:varchar(64);comment:原因编码" json:"reason_code"` // 原因编码
Reason string `gorm:"column:reason;type:varchar(500);comment:原因说明" json:"reason"` // 原因说明
DurationMs int32 `gorm:"column:duration_ms;type:int;not null;comment:评估耗时毫秒" json:"duration_ms"` // 评估耗时毫秒
CandidateCount int32 `gorm:"column:candidate_count;type:int;not null;comment:候选数量" json:"candidate_count"` // 候选数量
MatchedCount int32 `gorm:"column:matched_count;type:int;not null;comment:命中数量" json:"matched_count"` // 命中数量
InputHash string `` // 输入摘要
/* 136-byte string literal not displayed */
OccurredAt time.Time `` // 事件发生时间
/* 341-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;comment:日志创建时间" json:"created_at"` // 日志创建时间
}
BasePolicyEvaluationLog 策略评估日志表
func (*BasePolicyEvaluationLog) TableComment ¶ added in v0.0.30
func (*BasePolicyEvaluationLog) TableComment() string
TableComment 返回表注释。
func (*BasePolicyEvaluationLog) TableName ¶ added in v0.0.30
func (*BasePolicyEvaluationLog) TableName() string
TableName BasePolicyEvaluationLog's table name
type BasePost ¶
type BasePost struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:岗位ID" json:"id"` // 岗位ID
TenantID int64 `` // 租户ID
/* 159-byte string literal not displayed */
Name string `gorm:"column:name;type:varchar(50);not null;comment:岗位名称" json:"name"` // 岗位名称
Code string `gorm:"column:code;type:varchar(100);not null;uniqueIndex:unique_base_post,priority:2;comment:岗位编码" json:"code"` // 岗位编码
Sort int32 `gorm:"column:sort;type:int;not null;comment:显示顺序" json:"sort"` // 显示顺序
Remark string `gorm:"column:remark;type:varchar(500);comment:备注" json:"remark"` // 备注
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 150-byte string literal not displayed */
}
BasePost 岗位信息
type BaseRedactOutputPolicy ¶ added in v0.0.33
type BaseRedactOutputPolicy struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:出库策略ID" json:"id"` // 出库策略ID
Operation string `` // RPC完整操作名
/* 207-byte string literal not displayed */
ServiceName string `` // 服务名
/* 150-byte string literal not displayed */
MessageRef string `` // Proto消息完整名称
/* 159-byte string literal not displayed */
FieldPath string `` // Proto字段路径
/* 151-byte string literal not displayed */
Mode int32 `gorm:"column:mode;type:tinyint;not null;comment:处理模式:枚举【BaseRedactOutputPolicyMode】" json:"mode"` // 处理模式:枚举【BaseRedactOutputPolicyMode】
RuleID int64 `` // 规则模板ID,非规则模式为0
/* 157-byte string literal not displayed */
RuleParams string `gorm:"column:rule_params;type:json;not null;comment:策略规则参数" json:"rule_params"` // 策略规则参数
Status int32 `` // 状态:枚举【Status】
/* 149-byte string literal not displayed */
Remark string `gorm:"column:remark;type:varchar(500);not null;comment:备注" json:"remark"` // 备注
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 166-byte string literal not displayed */
}
BaseRedactOutputPolicy Proto字段出库策略
func (*BaseRedactOutputPolicy) TableComment ¶ added in v0.0.33
func (*BaseRedactOutputPolicy) TableComment() string
TableComment 返回表注释。
func (*BaseRedactOutputPolicy) TableName ¶ added in v0.0.33
func (*BaseRedactOutputPolicy) TableName() string
TableName BaseRedactOutputPolicy's table name
type BaseRedactRule ¶ added in v0.0.32
type BaseRedactRule struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:脱敏规则ID" json:"id"` // 脱敏规则ID
Code string `gorm:"column:code;type:varchar(64);not null;uniqueIndex:unique_base_redact_rule,priority:1;comment:规则编码" json:"code"` // 规则编码
Name string `gorm:"column:name;type:varchar(100);not null;comment:规则名称" json:"name"` // 规则名称
RuleType string `gorm:"column:rule_type;type:varchar(32);not null;comment:规则类型" json:"rule_type"` // 规则类型
DefaultParams string `gorm:"column:default_params;type:json;not null;comment:默认规则参数" json:"default_params"` // 默认规则参数
Status int32 `` // 状态:枚举【Status】
/* 137-byte string literal not displayed */
Remark string `gorm:"column:remark;type:varchar(500);not null;comment:备注" json:"remark"` // 备注
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 157-byte string literal not displayed */
}
BaseRedactRule 脱敏规则模板
func (*BaseRedactRule) TableComment ¶ added in v0.0.32
func (*BaseRedactRule) TableComment() string
TableComment 返回表注释。
func (*BaseRedactRule) TableName ¶ added in v0.0.32
func (*BaseRedactRule) TableName() string
TableName BaseRedactRule's table name
type BaseRedactStoragePolicy ¶ added in v0.0.33
type BaseRedactStoragePolicy struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:入库策略ID" json:"id"` // 入库策略ID
SourceName string `` // 数据源名称
/* 151-byte string literal not displayed */
TableName_ string `` // 数据库表名
/* 150-byte string literal not displayed */
ColumnName string `` // 数据库字段名
/* 155-byte string literal not displayed */
RuleID int64 `` // 规则模板ID
/* 136-byte string literal not displayed */
RuleParams string `gorm:"column:rule_params;type:json;not null;comment:策略规则参数" json:"rule_params"` // 策略规则参数
Status int32 `` // 状态:枚举【Status】
/* 147-byte string literal not displayed */
Remark string `gorm:"column:remark;type:varchar(500);not null;comment:备注" json:"remark"` // 备注
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 167-byte string literal not displayed */
}
BaseRedactStoragePolicy 敏感字段入库策略
func (*BaseRedactStoragePolicy) TableComment ¶ added in v0.0.33
func (*BaseRedactStoragePolicy) TableComment() string
TableComment 返回表注释。
func (*BaseRedactStoragePolicy) TableName ¶ added in v0.0.33
func (*BaseRedactStoragePolicy) TableName() string
TableName BaseRedactStoragePolicy's table name
type BaseRedactStorageValue ¶ added in v0.0.33
type BaseRedactStorageValue struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:加密数据ID" json:"id"` // 加密数据ID
StoragePolicyID int64 `` // 入库策略ID
/* 210-byte string literal not displayed */
RecordID int64 `` // 主表记录ID
/* 140-byte string literal not displayed */
Ciphertext []byte `gorm:"column:ciphertext;type:blob;not null;comment:加密原文" json:"ciphertext"` // 加密原文
Digest []byte `` // HMAC查询摘要
/* 138-byte string literal not displayed */
}
BaseRedactStorageValue 敏感字段加密原文
func (*BaseRedactStorageValue) TableComment ¶ added in v0.0.33
func (*BaseRedactStorageValue) TableComment() string
TableComment 返回表注释。
func (*BaseRedactStorageValue) TableName ¶ added in v0.0.33
func (*BaseRedactStorageValue) TableName() string
TableName BaseRedactStorageValue's table name
type BaseRole ¶
type BaseRole struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:角色ID" json:"id"` // 角色ID
TenantID int64 `` // 租户ID
/* 159-byte string literal not displayed */
Name string `gorm:"column:name;type:varchar(30);not null;comment:角色名称" json:"name"` // 角色名称
Code string `gorm:"column:code;type:varchar(100);not null;uniqueIndex:unique_base_role,priority:2;comment:角色代码" json:"code"` // 角色代码
DataScope int32 `gorm:"column:data_scope;type:tinyint;not null;comment:数据权限:枚举【BaseRoleDataScope】" json:"data_scope"` // 数据权限:枚举【BaseRoleDataScope】
Menus string `gorm:"column:menus;type:json;not null;comment:分配的菜单列表" json:"menus"` // 分配的菜单列表
Remark string `gorm:"column:remark;type:varchar(500);comment:备注" json:"remark"` // 备注
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 150-byte string literal not displayed */
}
BaseRole 角色信息
type BaseTableArchive ¶ added in v0.0.32
type BaseTableArchive struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:归档配置ID" json:"id"` // 归档配置ID
SourceName string `` // 数据源名称
/* 143-byte string literal not displayed */
TableName_ string `` // 数据表名称
/* 142-byte string literal not displayed */
ArchiveMode int32 `gorm:"column:archive_mode;type:tinyint;not null;comment:归档模式:枚举【BaseTableArchiveMode】" json:"archive_mode"` // 归档模式:枚举【BaseTableArchiveMode】
OnlineRetentionDays int32 `gorm:"column:online_retention_days;type:int;not null;comment:在线保留天数" json:"online_retention_days"` // 在线保留天数
ArchiveRetentionDays int32 `gorm:"column:archive_retention_days;type:int;not null;comment:归档保留天数" json:"archive_retention_days"` // 归档保留天数
BatchSize int32 `gorm:"column:batch_size;type:int;not null;comment:批处理数量" json:"batch_size"` // 批处理数量
DeleteAfterVerify int32 `gorm:"column:delete_after_verify;type:tinyint;not null;comment:校验成功后删除在线数据" json:"delete_after_verify"` // 校验成功后删除在线数据
OSSPrefix string `gorm:"column:oss_prefix;type:varchar(255);not null;comment:OSS对象前缀" json:"oss_prefix"` // OSS对象前缀
Status int32 `` // 状态:枚举【Status】
/* 139-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:修改人ID" json:"updated_by"` // 修改人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 159-byte string literal not displayed */
}
BaseTableArchive 表归档配置
func (*BaseTableArchive) TableComment ¶ added in v0.0.32
func (*BaseTableArchive) TableComment() string
TableComment 返回表注释。
func (*BaseTableArchive) TableName ¶ added in v0.0.32
func (*BaseTableArchive) TableName() string
TableName BaseTableArchive's table name
type BaseTableArchiveRecord ¶ added in v0.0.32
type BaseTableArchiveRecord struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:归档记录ID" json:"id"` // 归档记录ID
ArchiveID int64 `` // 归档配置ID
/* 144-byte string literal not displayed */
SourceName string `` // 数据源名称
/* 161-byte string literal not displayed */
TableName_ string `` // 数据表名称
/* 220-byte string literal not displayed */
ArchiveMode int32 `gorm:"column:archive_mode;type:tinyint;not null;comment:归档模式:枚举【BaseTableArchiveMode】" json:"archive_mode"` // 归档模式:枚举【BaseTableArchiveMode】
CutoffAt time.Time `gorm:"column:cutoff_at;type:datetime;not null;comment:归档截止时间" json:"cutoff_at"` // 归档截止时间
Cursor string `gorm:"column:cursor;type:varchar(128);not null;comment:断点游标" json:"cursor"` // 断点游标
ScannedRows int64 `gorm:"column:scanned_rows;type:bigint;not null;comment:扫描条数" json:"scanned_rows"` // 扫描条数
ArchivedRows int64 `gorm:"column:archived_rows;type:bigint;not null;comment:归档条数" json:"archived_rows"` // 归档条数
DeletedRows int64 `gorm:"column:deleted_rows;type:bigint;not null;comment:删除条数" json:"deleted_rows"` // 删除条数
ArchiveTableName string `gorm:"column:archive_table_name;type:varchar(128);not null;comment:内部归档表名" json:"archive_table_name"` // 内部归档表名
ObjectKey string `gorm:"column:object_key;type:varchar(512);not null;comment:OSS对象Key" json:"object_key"` // OSS对象Key
SizeBytes int64 `gorm:"column:size_bytes;type:bigint;not null;comment:对象大小" json:"size_bytes"` // 对象大小
Sha256 string `gorm:"column:sha256;type:varchar(64);not null;comment:SHA-256" json:"sha256"` // SHA-256
Status int32 `` // 归档状态:枚举【BaseTableArchiveRecordStatus】
/* 247-byte string literal not displayed */
Error string `gorm:"column:error;type:text;not null;comment:错误信息" json:"error"` // 错误信息
StartedAt time.Time `gorm:"column:started_at;type:datetime;not null;comment:开始时间" json:"started_at"` // 开始时间
FinishedAt time.Time `gorm:"column:finished_at;type:datetime;not null;comment:完成时间" json:"finished_at"` // 完成时间
}
BaseTableArchiveRecord 表归档执行记录
func (*BaseTableArchiveRecord) TableComment ¶ added in v0.0.32
func (*BaseTableArchiveRecord) TableComment() string
TableComment 返回表注释。
func (*BaseTableArchiveRecord) TableName ¶ added in v0.0.32
func (*BaseTableArchiveRecord) TableName() string
TableName BaseTableArchiveRecord's table name
type BaseTableArchiveRestore ¶ added in v0.0.32
type BaseTableArchiveRestore struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:归档恢复记录ID" json:"id"` // 归档恢复记录ID
ArchiveRecordID int64 `` // 归档记录ID
/* 166-byte string literal not displayed */
TableName_ string `gorm:"column:table_name;type:varchar(128);not null;comment:数据表名称" json:"table_name"` // 数据表名称
RestoreMode int32 `` // 恢复模式:枚举【BaseTableArchiveRestoreMode】
/* 131-byte string literal not displayed */
RestoreRange string `gorm:"column:restore_range;type:varchar(512);not null;comment:恢复范围" json:"restore_range"` // 恢复范围
RestoredRows int64 `gorm:"column:restored_rows;type:bigint;not null;comment:恢复条数" json:"restored_rows"` // 恢复条数
OperatorID int64 `gorm:"column:operator_id;type:bigint;not null;comment:操作人ID" json:"operator_id"` // 操作人ID
Status int32 `` // 恢复状态:枚举【BaseTableArchiveRestoreStatus】
/* 176-byte string literal not displayed */
Error string `gorm:"column:error;type:text;not null;comment:错误信息" json:"error"` // 错误信息
StartedAt time.Time `gorm:"column:started_at;type:datetime;not null;comment:开始时间" json:"started_at"` // 开始时间
FinishedAt time.Time `gorm:"column:finished_at;type:datetime;not null;comment:完成时间" json:"finished_at"` // 完成时间
}
BaseTableArchiveRestore 表归档恢复记录
func (*BaseTableArchiveRestore) TableComment ¶ added in v0.0.32
func (*BaseTableArchiveRestore) TableComment() string
TableComment 返回表注释。
func (*BaseTableArchiveRestore) TableName ¶ added in v0.0.32
func (*BaseTableArchiveRestore) TableName() string
TableName BaseTableArchiveRestore's table name
type BaseTableBackup ¶ added in v0.0.32
type BaseTableBackup struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:备份配置ID" json:"id"` // 备份配置ID
SourceName string `` // 数据源名称
/* 142-byte string literal not displayed */
BackupType int32 `gorm:"column:backup_type;type:tinyint;not null;comment:备份类型:枚举【BaseTableBackupType】" json:"backup_type"` // 备份类型:枚举【BaseTableBackupType】
OSSPrefix string `gorm:"column:oss_prefix;type:varchar(255);not null;comment:OSS对象前缀" json:"oss_prefix"` // OSS对象前缀
RetentionCount int32 `gorm:"column:retention_count;type:int;not null;comment:保留备份数量" json:"retention_count"` // 保留备份数量
Status int32 `` // 状态:枚举【Status】
/* 138-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:修改人ID" json:"updated_by"` // 修改人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 158-byte string literal not displayed */
}
BaseTableBackup 数据库备份配置
func (*BaseTableBackup) TableComment ¶ added in v0.0.32
func (*BaseTableBackup) TableComment() string
TableComment 返回表注释。
func (*BaseTableBackup) TableName ¶ added in v0.0.32
func (*BaseTableBackup) TableName() string
TableName BaseTableBackup's table name
type BaseTableBackupRecord ¶ added in v0.0.32
type BaseTableBackupRecord struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:备份记录ID" json:"id"` // 备份记录ID
BackupID int64 `` // 备份配置ID
/* 140-byte string literal not displayed */
SourceName string `` // 数据源名称
/* 154-byte string literal not displayed */
DatabaseName string `gorm:"column:database_name;type:varchar(128);not null;comment:数据库名称" json:"database_name"` // 数据库名称
BackupType int32 `gorm:"column:backup_type;type:tinyint;not null;comment:备份类型:枚举【BaseTableBackupType】" json:"backup_type"` // 备份类型:枚举【BaseTableBackupType】
ObjectKey string `gorm:"column:object_key;type:varchar(512);not null;comment:OSS对象Key" json:"object_key"` // OSS对象Key
SizeBytes int64 `gorm:"column:size_bytes;type:bigint;not null;comment:对象大小" json:"size_bytes"` // 对象大小
Sha256 string `gorm:"column:sha256;type:varchar(64);not null;comment:SHA-256" json:"sha256"` // SHA-256
Hmac string `gorm:"column:hmac;type:varchar(128);not null;comment:HMAC" json:"hmac"` // HMAC
Status int32 `` // 备份状态:枚举【BaseTableBackupRecordStatus】
/* 179-byte string literal not displayed */
Error string `gorm:"column:error;type:text;not null;comment:错误信息" json:"error"` // 错误信息
StartedAt time.Time `gorm:"column:started_at;type:datetime;not null;comment:开始时间" json:"started_at"` // 开始时间
FinishedAt time.Time `gorm:"column:finished_at;type:datetime;not null;comment:完成时间" json:"finished_at"` // 完成时间
VerifiedAt time.Time `gorm:"column:verified_at;type:datetime;not null;comment:校验时间" json:"verified_at"` // 校验时间
}
BaseTableBackupRecord 数据库备份执行记录
func (*BaseTableBackupRecord) TableComment ¶ added in v0.0.32
func (*BaseTableBackupRecord) TableComment() string
TableComment 返回表注释。
func (*BaseTableBackupRecord) TableName ¶ added in v0.0.32
func (*BaseTableBackupRecord) TableName() string
TableName BaseTableBackupRecord's table name
type BaseTableBackupRestore ¶ added in v0.0.32
type BaseTableBackupRestore struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:备份恢复记录ID" json:"id"` // 备份恢复记录ID
BackupRecordID int64 `` // 备份记录ID
/* 162-byte string literal not displayed */
SourceName string `gorm:"column:source_name;type:varchar(64);not null;comment:源数据源" json:"source_name"` // 源数据源
TargetSourceName string `gorm:"column:target_source_name;type:varchar(64);not null;comment:目标数据源" json:"target_source_name"` // 目标数据源
TargetDatabase string `gorm:"column:target_database;type:varchar(128);not null;comment:目标数据库" json:"target_database"` // 目标数据库
RestoreMode int32 `` // 恢复模式:枚举【BaseTableBackupRestoreMode】
/* 130-byte string literal not displayed */
OperatorID int64 `gorm:"column:operator_id;type:bigint;not null;comment:操作人ID" json:"operator_id"` // 操作人ID
Status int32 `` // 恢复状态:枚举【BaseTableBackupRestoreStatus】
/* 174-byte string literal not displayed */
Error string `gorm:"column:error;type:text;not null;comment:错误信息" json:"error"` // 错误信息
StartedAt time.Time `gorm:"column:started_at;type:datetime;not null;comment:开始时间" json:"started_at"` // 开始时间
FinishedAt time.Time `gorm:"column:finished_at;type:datetime;not null;comment:完成时间" json:"finished_at"` // 完成时间
}
BaseTableBackupRestore 数据库备份恢复记录
func (*BaseTableBackupRestore) TableComment ¶ added in v0.0.32
func (*BaseTableBackupRestore) TableComment() string
TableComment 返回表注释。
func (*BaseTableBackupRestore) TableName ¶ added in v0.0.32
func (*BaseTableBackupRestore) TableName() string
TableName BaseTableBackupRestore's table name
type BaseTenant ¶
type BaseTenant struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:租户ID" json:"id"` // 租户ID
Code string `gorm:"column:code;type:varchar(50);not null;uniqueIndex:unique_base_tenant,priority:1;comment:租户编码" json:"code"` // 租户编码
Name string `gorm:"column:name;type:varchar(100);not null;comment:租户名称" json:"name"` // 租户名称
ContactName string `gorm:"column:contact_name;type:varchar(50);comment:联系人" json:"contact_name"` // 联系人
ContactPhone string `gorm:"column:contact_phone;type:varchar(20);comment:联系电话" json:"contact_phone"` // 联系电话
Remark string `gorm:"column:remark;type:varchar(500);comment:备注" json:"remark"` // 备注
Status int32 `` // 状态:枚举【Status】
/* 132-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 152-byte string literal not displayed */
}
BaseTenant 租户信息表
func (*BaseTenant) TableName ¶
func (*BaseTenant) TableName() string
TableName BaseTenant's table name
type BaseThirdAccount ¶
type BaseThirdAccount struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:三方账号ID" json:"id"` // 三方账号ID
UserID int64 `` // 用户ID
/* 176-byte string literal not displayed */
Provider string `` // 三方登录提供商
/* 197-byte string literal not displayed */
Identifier string `` // 三方唯一标识
/* 145-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 213-byte string literal not displayed */
}
BaseThirdAccount 用户三方登录账号
func (*BaseThirdAccount) TableComment ¶
func (*BaseThirdAccount) TableComment() string
TableComment 返回表注释。
func (*BaseThirdAccount) TableName ¶
func (*BaseThirdAccount) TableName() string
TableName BaseThirdAccount's table name
type BaseUser ¶
type BaseUser struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:用户ID" json:"id"` // 用户ID
TenantID int64 `` // 租户ID
/* 221-byte string literal not displayed */
UserName string `` // 用户账号
/* 138-byte string literal not displayed */
UserCode string `` // 用户编号
/* 138-byte string literal not displayed */
NickName string `gorm:"column:nick_name;type:varchar(30);comment:用户昵称" json:"nick_name"` // 用户昵称
RoleID int64 `gorm:"column:role_id;type:bigint;not null;comment:角色ID" json:"role_id"` // 角色ID
DeptID int64 `gorm:"column:dept_id;type:bigint;not null;comment:部门ID" json:"dept_id"` // 部门ID
PostID int64 `gorm:"column:post_id;type:bigint;comment:岗位ID" json:"post_id"` // 岗位ID
Phone string `gorm:"column:phone;type:varchar(20);comment:手机号码" json:"phone"` // 手机号码
Email string `gorm:"column:email;type:varchar(128);comment:邮箱" json:"email"` // 邮箱
IDType int32 `gorm:"column:id_type;type:tinyint;comment:证件类型:枚举【BaseUserIDType】" json:"id_type"` // 证件类型:枚举【BaseUserIDType】
IDCode string `gorm:"column:id_code;type:varchar(64);comment:证件号" json:"id_code"` // 证件号
Password string `gorm:"column:password;type:varchar(100);comment:密码" json:"password"` // 密码
PasswordChangedAt time.Time `gorm:"column:password_changed_at;type:datetime;not null;comment:密码最近修改时间" json:"password_changed_at"` // 密码最近修改时间
PasswordHistory string `` // 历史密码哈希列表(不保存明文)
/* 127-byte string literal not displayed */
MustChangePassword int32 `` // 密码修改状态:枚举【BaseUserPasswordChangeStatus】
/* 154-byte string literal not displayed */
Gender int32 `gorm:"column:gender;type:tinyint;not null;comment:用户性别:枚举【BaseUserGender】" json:"gender"` // 用户性别:枚举【BaseUserGender】
Avatar string `gorm:"column:avatar;type:varchar(1024);comment:头像地址" json:"avatar"` // 头像地址
Remark string `gorm:"column:remark;type:varchar(500);comment:备注" json:"remark"` // 备注
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 212-byte string literal not displayed */
}
BaseUser 用户信息
type BaseUserMFA ¶ added in v0.0.30
type BaseUserMFA struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:MFA配置ID" json:"id"` // MFA配置ID
TenantID int64 `gorm:"column:tenant_id;type:bigint;not null;index:idx_base_user_mfa_tenant_id,priority:1;comment:租户ID" json:"tenant_id"` // 租户ID
UserID int64 `` // 用户ID
/* 173-byte string literal not displayed */
Method string `` // 认证方式:totp、webauthn
/* 155-byte string literal not displayed */
ConfirmedAt time.Time `gorm:"column:confirmed_at;type:datetime;comment:确认启用时间" json:"confirmed_at"` // 确认启用时间
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【Status】" json:"status"` // 状态:枚举【Status】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 166-byte string literal not displayed */
}
BaseUserMFA 用户多因素认证配置
func (*BaseUserMFA) TableComment ¶ added in v0.0.30
func (*BaseUserMFA) TableComment() string
TableComment 返回表注释。
func (*BaseUserMFA) TableName ¶ added in v0.0.30
func (*BaseUserMFA) TableName() string
TableName BaseUserMFA's table name
type BaseUserMFARecovery ¶ added in v0.0.30
type BaseUserMFARecovery struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:恢复码ID" json:"id"` // 恢复码ID
MFAID int64 `` // MFA配置ID
/* 126-byte string literal not displayed */
UserID int64 `` // 用户ID
/* 126-byte string literal not displayed */
CodeHash string `gorm:"column:code_hash;type:varchar(255);not null;comment:恢复码哈希" json:"code_hash"` // 恢复码哈希
UsedAt time.Time `gorm:"column:used_at;type:datetime;comment:使用时间" json:"used_at"` // 使用时间
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
BaseUserMFARecovery 用户多因素认证恢复码
func (*BaseUserMFARecovery) TableComment ¶ added in v0.0.30
func (*BaseUserMFARecovery) TableComment() string
TableComment 返回表注释。
func (*BaseUserMFARecovery) TableName ¶ added in v0.0.30
func (*BaseUserMFARecovery) TableName() string
TableName BaseUserMFARecovery's table name
type BaseUserMFATotp ¶ added in v0.0.30
type BaseUserMFATotp struct {
MFAID int64 `gorm:"column:mfa_id;type:bigint;primaryKey;autoIncrement:true;comment:MFA配置ID" json:"mfa_id"` // MFA配置ID
SecretCiphertext string `gorm:"column:secret_ciphertext;type:varchar(512);not null;comment:加密后的TOTP密钥" json:"secret_ciphertext"` // 加密后的TOTP密钥
LastUsedStep int64 `gorm:"column:last_used_step;type:bigint;not null;comment:最近使用的TOTP时间窗口" json:"last_used_step"` // 最近使用的TOTP时间窗口
}
BaseUserMFATotp 用户TOTP多因素认证配置
func (*BaseUserMFATotp) TableComment ¶ added in v0.0.30
func (*BaseUserMFATotp) TableComment() string
TableComment 返回表注释。
func (*BaseUserMFATotp) TableName ¶ added in v0.0.30
func (*BaseUserMFATotp) TableName() string
TableName BaseUserMFATotp's table name
type BaseUserMFAWebauthn ¶ added in v0.0.30
type BaseUserMFAWebauthn struct {
MFAID int64 `gorm:"column:mfa_id;type:bigint;primaryKey;autoIncrement:true;comment:MFA配置ID" json:"mfa_id"` // MFA配置ID
CredentialID []byte `` // WebAuthn凭据ID
/* 170-byte string literal not displayed */
PublicKey []byte `gorm:"column:public_key;type:blob;not null;comment:WebAuthn凭据公钥" json:"public_key"` // WebAuthn凭据公钥
Aaguid []byte `gorm:"column:aaguid;type:binary(16);comment:认证器AAGUID" json:"aaguid"` // 认证器AAGUID
SignCount int64 `gorm:"column:sign_count;type:bigint unsigned;not null;comment:WebAuthn签名计数器" json:"sign_count"` // WebAuthn签名计数器
Transports string `gorm:"column:transports;type:json;comment:认证器传输方式" json:"transports"` // 认证器传输方式
BackupEligible bool `gorm:"column:backup_eligible;type:tinyint(1);not null;comment:是否支持备份" json:"backup_eligible"` // 是否支持备份
BackupState bool `gorm:"column:backup_state;type:tinyint(1);not null;comment:是否已备份" json:"backup_state"` // 是否已备份
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
}
BaseUserMFAWebauthn 用户WebAuthn多因素认证配置
func (*BaseUserMFAWebauthn) TableComment ¶ added in v0.0.30
func (*BaseUserMFAWebauthn) TableComment() string
TableComment 返回表注释。
func (*BaseUserMFAWebauthn) TableName ¶ added in v0.0.30
func (*BaseUserMFAWebauthn) TableName() string
TableName BaseUserMFAWebauthn's table name
type CasbinRule ¶
type CasbinRule struct {
ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true;comment:策略规则ID" json:"id"` // 策略规则ID
Ptype string `gorm:"column:ptype;type:varchar(100);not null;uniqueIndex:idx_casbin_rule,priority:1;comment:策略类型" json:"ptype"` // 策略类型
V0 string `gorm:"column:v0;type:varchar(100);not null;uniqueIndex:idx_casbin_rule,priority:2;comment:租户编码" json:"v0"` // 租户编码
V1 string `gorm:"column:v1;type:varchar(100);not null;uniqueIndex:idx_casbin_rule,priority:3;comment:角色编码" json:"v1"` // 角色编码
V2 string `gorm:"column:v2;type:varchar(100);not null;uniqueIndex:idx_casbin_rule,priority:4;comment:资源路径" json:"v2"` // 资源路径
V3 string `gorm:"column:v3;type:varchar(100);not null;uniqueIndex:idx_casbin_rule,priority:5;comment:请求方法" json:"v3"` // 请求方法
V4 string `gorm:"column:v4;type:varchar(100);not null;uniqueIndex:idx_casbin_rule,priority:6;comment:项目范围" json:"v4"` // 项目范围
V5 string `gorm:"column:v5;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:7;comment:扩展策略参数" json:"v5"` // 扩展策略参数
}
CasbinRule Casbin权限信息
func (*CasbinRule) TableName ¶
func (*CasbinRule) TableName() string
TableName CasbinRule's table name
type CodeGenColumn ¶
type CodeGenColumn struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
TableID int64 `` // 生成对象ID
/* 225-byte string literal not displayed */
Name string `` // 字段名
/* 172-byte string literal not displayed */
Comment string `gorm:"column:comment;type:varchar(255);comment:字段描述" json:"comment"` // 字段描述
I18NConfig string `gorm:"column:i18n_config;type:json;comment:字段国际化配置JSON" json:"i18n_config"` // 字段国际化配置JSON
QueryConfig string `gorm:"column:query_config;type:json;not null;comment:查询条件配置JSON" json:"query_config"` // 查询条件配置JSON
ListConfig string `gorm:"column:list_config;type:json;not null;comment:列表展示配置JSON" json:"list_config"` // 列表展示配置JSON
FormConfig string `gorm:"column:form_config;type:json;not null;comment:表单录入配置JSON" json:"form_config"` // 表单录入配置JSON
Sort int32 `gorm:"column:sort;type:int;not null;comment:排序" json:"sort"` // 排序
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 156-byte string literal not displayed */
}
CodeGenColumn 代码生成字段配置表
func (*CodeGenColumn) TableComment ¶
func (*CodeGenColumn) TableComment() string
TableComment 返回表注释。
func (*CodeGenColumn) TableName ¶
func (*CodeGenColumn) TableName() string
TableName CodeGenColumn's table name
type CodeGenProto ¶
type CodeGenProto struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
TableID int64 `` // 生成对象ID
/* 127-byte string literal not displayed */
TriggerType string `` // 触发来源:crud page_tree left_tree field_option field_status
/* 146-byte string literal not displayed */
APIKind string `gorm:"column:api_kind;type:varchar(32);not null;comment:接口类型:crud list option tree status" json:"api_kind"` // 接口类型:crud list option tree status
GenerateWhenMissing int32 `gorm:"column:generate_when_missing;type:tinyint;not null;comment:缺失时是否生成" json:"generate_when_missing"` // 缺失时是否生成
Config string `gorm:"column:config;type:json;not null;comment:接口类型配置JSON" json:"config"` // 接口类型配置JSON
Sort int32 `gorm:"column:sort;type:int;not null;comment:排序" json:"sort"` // 排序
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint unsigned;not null;comment:删除时间;softDelete:milli" json:"deleted_at"` // 删除时间
}
CodeGenProto 代码生成Proto接口配置表
func (*CodeGenProto) TableName ¶
func (*CodeGenProto) TableName() string
TableName CodeGenProto's table name
type CodeGenTable ¶
type CodeGenTable struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
SourceName string `` // 数据源名称
/* 139-byte string literal not displayed */
Name string `gorm:"column:name;type:varchar(128);not null;uniqueIndex:unique_code_gen_table,priority:2;comment:业务表名" json:"name"` // 业务表名
Comment string `gorm:"column:comment;type:varchar(128);comment:业务表描述" json:"comment"` // 业务表描述
BusinessModule string `gorm:"column:business_module;type:varchar(64);comment:业务模块" json:"business_module"` // 业务模块
ParentMenuID int64 `gorm:"column:parent_menu_id;type:bigint;not null;comment:父级菜单ID" json:"parent_menu_id"` // 父级菜单ID
PageType string `` // 页面类型:normal普通表格 tree树形表格 left_tree左树右表
/* 147-byte string literal not displayed */
ParentColumn string `gorm:"column:parent_column;type:varchar(64);comment:树形表格父节点字段" json:"parent_column"` // 树形表格父节点字段
TreeLabelColumn string `gorm:"column:tree_label_column;type:varchar(64);comment:树节点显示字段" json:"tree_label_column"` // 树节点显示字段
LeftTreeConfig string `gorm:"column:left_tree_config;type:json;comment:左树配置JSON" json:"left_tree_config"` // 左树配置JSON
I18NConfig string `gorm:"column:i18n_config;type:json;comment:表级国际化配置JSON" json:"i18n_config"` // 表级国际化配置JSON
GenBackend int32 `gorm:"column:gen_backend;type:tinyint;not null;comment:是否生成后端" json:"gen_backend"` // 是否生成后端
GenFrontend int32 `gorm:"column:gen_frontend;type:tinyint;not null;comment:是否生成前端" json:"gen_frontend"` // 是否生成前端
GenSql int32 `gorm:"column:gen_sql;type:tinyint;not null;comment:是否生成建表SQL" json:"gen_sql"` // 是否生成建表SQL
Remark string `gorm:"column:remark;type:varchar(500);comment:备注" json:"remark"` // 备注
Status int32 `gorm:"column:status;type:tinyint;not null;comment:状态:枚举【CodeGenTableStatus】" json:"status"` // 状态:枚举【CodeGenTableStatus】
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建人ID" json:"created_by"` // 创建人ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新人ID" json:"updated_by"` // 更新人ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 155-byte string literal not displayed */
}
CodeGenTable 代码生成对象表
func (*CodeGenTable) TableName ¶
func (*CodeGenTable) TableName() string
TableName CodeGenTable's table name
type OauthClient ¶ added in v0.0.30
type OauthClient struct {
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:OAuth客户端ID" json:"id"` // OAuth客户端ID
TenantID int64 `` // 绑定租户ID
/* 128-byte string literal not displayed */
ClientID string `` // 客户端标识
/* 143-byte string literal not displayed */
ClientSecret string `gorm:"column:client_secret;type:varchar(128);not null;comment:客户端密钥" json:"client_secret"` // 客户端密钥
ClientName string `gorm:"column:client_name;type:varchar(100);not null;comment:客户端名称" json:"client_name"` // 客户端名称
CryptoType string `` // 协议加密类型:枚举【OauthClientCryptoType】
/* 133-byte string literal not displayed */
CryptoKey string `gorm:"column:crypto_key;type:varchar(255);not null;comment:协议加密密钥" json:"crypto_key"` // 协议加密密钥
IPWhitelist string `gorm:"column:ip_whitelist;type:varchar(512);not null;comment:IP白名单,逗号分隔,支持CIDR" json:"ip_whitelist"` // IP白名单,逗号分隔,支持CIDR
API string `gorm:"column:api;type:json;not null;comment:允许访问的API operation JSON数组" json:"api"` // 允许访问的API operation JSON数组
Status int32 `` // 状态:枚举【Status】
/* 133-byte string literal not displayed */
CreatedBy int64 `gorm:"column:created_by;type:bigint;not null;comment:创建者ID" json:"created_by"` // 创建者ID
UpdatedBy int64 `gorm:"column:updated_by;type:bigint;not null;comment:更新者ID" json:"updated_by"` // 更新者ID
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;comment:更新时间" json:"updated_at"` // 更新时间
DeletedAt soft_delete.DeletedAt `` // 删除时间
/* 163-byte string literal not displayed */
}
OauthClient 开放授权客户端
func (*OauthClient) TableComment ¶ added in v0.0.30
func (*OauthClient) TableComment() string
TableComment 返回表注释。
func (*OauthClient) TableName ¶ added in v0.0.30
func (*OauthClient) TableName() string
TableName OauthClient's table name
Source Files
¶
- ai_message.gen.go
- ai_session.gen.go
- base_api.gen.go
- base_api_i18n.gen.go
- base_api_log.gen.go
- base_area.gen.go
- base_config.gen.go
- base_data_access_log.gen.go
- base_dept.gen.go
- base_dict.gen.go
- base_dict_item.gen.go
- base_file.gen.go
- base_i18n.gen.go
- base_job.gen.go
- base_job_log.gen.go
- base_language.gen.go
- base_login_log.gen.go
- base_login_policy.gen.go
- base_login_policy_rule.gen.go
- base_menu.gen.go
- base_message.gen.go
- base_message_category.gen.go
- base_message_delivery.gen.go
- base_message_dispatch.gen.go
- base_migration.gen.go
- base_operation_log.gen.go
- base_permission_log.gen.go
- base_policy_evaluation_log.gen.go
- base_post.gen.go
- base_redact_output_policy.gen.go
- base_redact_rule.gen.go
- base_redact_storage_policy.gen.go
- base_redact_storage_value.gen.go
- base_role.gen.go
- base_table_archive.gen.go
- base_table_archive_record.gen.go
- base_table_archive_restore.gen.go
- base_table_backup.gen.go
- base_table_backup_record.gen.go
- base_table_backup_restore.gen.go
- base_tenant.gen.go
- base_third_account.gen.go
- base_user.gen.go
- base_user_mfa.gen.go
- base_user_mfa_recovery.gen.go
- base_user_mfa_totp.gen.go
- base_user_mfa_webauthn.gen.go
- casbin_rule.gen.go
- code_gen_column.gen.go
- code_gen_proto.gen.go
- code_gen_table.gen.go
- oauth_client.gen.go
- table_comment.gen.go