chore: 并入 iotlcm-app 历史到 app/(原提交 f40bda9)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// batchDetailDao is the data access object for the table batch_detail.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type batchDetailDao struct {
|
||||
*internal.BatchDetailDao
|
||||
}
|
||||
|
||||
var (
|
||||
// BatchDetail is a globally accessible object for table batch_detail operations.
|
||||
BatchDetail = batchDetailDao{internal.NewBatchDetailDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// batchMainDao is the data access object for the table batch_main.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type batchMainDao struct {
|
||||
*internal.BatchMainDao
|
||||
}
|
||||
|
||||
var (
|
||||
// BatchMain is a globally accessible object for table batch_main operations.
|
||||
BatchMain = batchMainDao{internal.NewBatchMainDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// cardChannelAssocDao is the data access object for the table card_channel_assoc.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type cardChannelAssocDao struct {
|
||||
*internal.CardChannelAssocDao
|
||||
}
|
||||
|
||||
var (
|
||||
// CardChannelAssoc is a globally accessible object for table card_channel_assoc operations.
|
||||
CardChannelAssoc = cardChannelAssocDao{internal.NewCardChannelAssocDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// genTableDao is the data access object for the table gen_table.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type genTableDao struct {
|
||||
*internal.GenTableDao
|
||||
}
|
||||
|
||||
var (
|
||||
// GenTable is a globally accessible object for table gen_table operations.
|
||||
GenTable = genTableDao{internal.NewGenTableDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// genTableColumnDao is the data access object for the table gen_table_column.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type genTableColumnDao struct {
|
||||
*internal.GenTableColumnDao
|
||||
}
|
||||
|
||||
var (
|
||||
// GenTableColumn is a globally accessible object for table gen_table_column operations.
|
||||
GenTableColumn = genTableColumnDao{internal.NewGenTableColumnDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// BatchDetailDao is the data access object for the table batch_detail.
|
||||
type BatchDetailDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns BatchDetailColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// BatchDetailColumns defines and stores column names for the table batch_detail.
|
||||
type BatchDetailColumns struct {
|
||||
Id string // 主键ID
|
||||
BatchNo string // 批次编号
|
||||
BatchType string // 批次类型 枚举(与主表一致)
|
||||
DetailStatus string // 明细异步处理状态 0-待处理 1-处理中 2-成功 3-失败
|
||||
BlankOutStatus string // 作废状态 0-是 1-否
|
||||
RowNo string // 行号
|
||||
ItemId string // 项ID:卡ICCID/设备编码
|
||||
ErrorCode string // 异常编码
|
||||
ErrorReason string // 异常原因
|
||||
Snapshot string // 信息快照
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// batchDetailColumns holds the columns for the table batch_detail.
|
||||
var batchDetailColumns = BatchDetailColumns{
|
||||
Id: "id",
|
||||
BatchNo: "batch_no",
|
||||
BatchType: "batch_type",
|
||||
DetailStatus: "detail_status",
|
||||
BlankOutStatus: "blank_out_status",
|
||||
RowNo: "row_no",
|
||||
ItemId: "item_id",
|
||||
ErrorCode: "error_code",
|
||||
ErrorReason: "error_reason",
|
||||
Snapshot: "snapshot",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewBatchDetailDao creates and returns a new DAO object for table data access.
|
||||
func NewBatchDetailDao(handlers ...gdb.ModelHandler) *BatchDetailDao {
|
||||
return &BatchDetailDao{
|
||||
group: "default",
|
||||
table: "batch_detail",
|
||||
columns: batchDetailColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *BatchDetailDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *BatchDetailDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *BatchDetailDao) Columns() BatchDetailColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *BatchDetailDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *BatchDetailDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *BatchDetailDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// BatchMainDao is the data access object for the table batch_main.
|
||||
type BatchMainDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns BatchMainColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// BatchMainColumns defines and stores column names for the table batch_main.
|
||||
type BatchMainColumns struct {
|
||||
Id string // 主键ID
|
||||
BatchNo string // 批次编号
|
||||
OrderSn string // 订单编号
|
||||
BatchType string // 批次类型 枚举
|
||||
BatchStatus string // 批次状态 枚举
|
||||
BatchAsyncStatus string // 异步处理状态
|
||||
SourceType string // 来源方式 枚举
|
||||
SourceBatchNo string // 来源批次编号
|
||||
SourceOssId string // 源文件OSS ID
|
||||
ResultOssId string // 结果文件OSS ID
|
||||
IsCrossDept string // 是否跨级操作机构
|
||||
TargetDeptId string // 目标机构编号
|
||||
DeptId string // 机构编号
|
||||
TotalCount string // 总数量
|
||||
ValidCount string // 有效数量
|
||||
SuccessCount string // 成功数量
|
||||
FailCount string // 失败数量
|
||||
RunResult string // 运行结果
|
||||
FailReason string // 失败原因
|
||||
BatchInfo string // 批次信息:入库/出库展示字段
|
||||
Remark string // 备注扩展字段
|
||||
StartTime string // 开始时间
|
||||
EndTime string // 结束时间
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
SourceChannel string // 发起渠道:console/mini_program/api/system/legacy
|
||||
ExecutionMode string // 操作规模:0未知1单卡2批量
|
||||
}
|
||||
|
||||
// batchMainColumns holds the columns for the table batch_main.
|
||||
var batchMainColumns = BatchMainColumns{
|
||||
Id: "id",
|
||||
BatchNo: "batch_no",
|
||||
OrderSn: "order_sn",
|
||||
BatchType: "batch_type",
|
||||
BatchStatus: "batch_status",
|
||||
BatchAsyncStatus: "batch_async_status",
|
||||
SourceType: "source_type",
|
||||
SourceBatchNo: "source_batch_no",
|
||||
SourceOssId: "source_oss_id",
|
||||
ResultOssId: "result_oss_id",
|
||||
IsCrossDept: "is_cross_dept",
|
||||
TargetDeptId: "target_dept_id",
|
||||
DeptId: "dept_id",
|
||||
TotalCount: "total_count",
|
||||
ValidCount: "valid_count",
|
||||
SuccessCount: "success_count",
|
||||
FailCount: "fail_count",
|
||||
RunResult: "run_result",
|
||||
FailReason: "fail_reason",
|
||||
BatchInfo: "batch_info",
|
||||
Remark: "remark",
|
||||
StartTime: "start_time",
|
||||
EndTime: "end_time",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
SourceChannel: "source_channel",
|
||||
ExecutionMode: "execution_mode",
|
||||
}
|
||||
|
||||
// NewBatchMainDao creates and returns a new DAO object for table data access.
|
||||
func NewBatchMainDao(handlers ...gdb.ModelHandler) *BatchMainDao {
|
||||
return &BatchMainDao{
|
||||
group: "default",
|
||||
table: "batch_main",
|
||||
columns: batchMainColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *BatchMainDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *BatchMainDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *BatchMainDao) Columns() BatchMainColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *BatchMainDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *BatchMainDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *BatchMainDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// CardChannelAssocDao is the data access object for the table card_channel_assoc.
|
||||
type CardChannelAssocDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns CardChannelAssocColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// CardChannelAssocColumns defines and stores column names for the table card_channel_assoc.
|
||||
type CardChannelAssocColumns struct {
|
||||
Id string // 主键
|
||||
ChannelId string // 通道ID
|
||||
MatchType string // 匹配类型: 1单卡 2号段
|
||||
Iccid string // 单卡ICCID
|
||||
IccidStart string // 号段起始ICCID
|
||||
IccidEnd string // 号段结束ICCID
|
||||
Status string // 状态: 1启用 0停用
|
||||
Remark string // 备注
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// cardChannelAssocColumns holds the columns for the table card_channel_assoc.
|
||||
var cardChannelAssocColumns = CardChannelAssocColumns{
|
||||
Id: "id",
|
||||
ChannelId: "channel_id",
|
||||
MatchType: "match_type",
|
||||
Iccid: "iccid",
|
||||
IccidStart: "iccid_start",
|
||||
IccidEnd: "iccid_end",
|
||||
Status: "status",
|
||||
Remark: "remark",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewCardChannelAssocDao creates and returns a new DAO object for table data access.
|
||||
func NewCardChannelAssocDao(handlers ...gdb.ModelHandler) *CardChannelAssocDao {
|
||||
return &CardChannelAssocDao{
|
||||
group: "default",
|
||||
table: "card_channel_assoc",
|
||||
columns: cardChannelAssocColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *CardChannelAssocDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *CardChannelAssocDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *CardChannelAssocDao) Columns() CardChannelAssocColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *CardChannelAssocDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *CardChannelAssocDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *CardChannelAssocDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// GenTableDao is the data access object for the table gen_table.
|
||||
type GenTableDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns GenTableColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// GenTableColumns defines and stores column names for the table gen_table.
|
||||
type GenTableColumns struct {
|
||||
TableId string // 编号
|
||||
DataName string // 数据源名称
|
||||
TableName string // 表名称
|
||||
TableComment string // 表描述
|
||||
SubTableName string // 关联子表的表名
|
||||
SubTableFkName string // 子表关联的外键名
|
||||
ClassName string // 实体类名称
|
||||
TplCategory string // 使用的模板(crud单表操作 tree树表操作)
|
||||
PackageName string // 生成包路径
|
||||
ModuleName string // 生成模块名
|
||||
BusinessName string // 生成业务名
|
||||
FunctionName string // 生成功能名
|
||||
FunctionAuthor string // 生成功能作者
|
||||
GenType string // 生成代码方式(0zip压缩包 1自定义路径)
|
||||
GenPath string // 生成路径(不填默认项目路径)
|
||||
Options string // 其它生成选项
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// genTableColumns holds the columns for the table gen_table.
|
||||
var genTableColumns = GenTableColumns{
|
||||
TableId: "table_id",
|
||||
DataName: "data_name",
|
||||
TableName: "table_name",
|
||||
TableComment: "table_comment",
|
||||
SubTableName: "sub_table_name",
|
||||
SubTableFkName: "sub_table_fk_name",
|
||||
ClassName: "class_name",
|
||||
TplCategory: "tpl_category",
|
||||
PackageName: "package_name",
|
||||
ModuleName: "module_name",
|
||||
BusinessName: "business_name",
|
||||
FunctionName: "function_name",
|
||||
FunctionAuthor: "function_author",
|
||||
GenType: "gen_type",
|
||||
GenPath: "gen_path",
|
||||
Options: "options",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewGenTableDao creates and returns a new DAO object for table data access.
|
||||
func NewGenTableDao(handlers ...gdb.ModelHandler) *GenTableDao {
|
||||
return &GenTableDao{
|
||||
group: "default",
|
||||
table: "gen_table",
|
||||
columns: genTableColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *GenTableDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *GenTableDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *GenTableDao) Columns() GenTableColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *GenTableDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *GenTableDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *GenTableDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// GenTableColumnDao is the data access object for the table gen_table_column.
|
||||
type GenTableColumnDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns GenTableColumnColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// GenTableColumnColumns defines and stores column names for the table gen_table_column.
|
||||
type GenTableColumnColumns struct {
|
||||
ColumnId string // 编号
|
||||
TableId string // 归属表编号
|
||||
ColumnName string // 列名称
|
||||
ColumnComment string // 列描述
|
||||
ColumnType string // 列类型
|
||||
JavaType string // JAVA类型
|
||||
JavaField string // JAVA字段名
|
||||
IsPk string // 是否主键(1是)
|
||||
IsIncrement string // 是否自增(1是)
|
||||
IsRequired string // 是否必填(1是)
|
||||
IsInsert string // 是否为插入字段(1是)
|
||||
IsEdit string // 是否编辑字段(1是)
|
||||
IsList string // 是否列表字段(1是)
|
||||
IsQuery string // 是否查询字段(1是)
|
||||
QueryType string // 查询方式(等于、不等于、大于、小于、范围)
|
||||
HtmlType string // 显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)
|
||||
DictType string // 字典类型
|
||||
Sort string // 排序
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// genTableColumnColumns holds the columns for the table gen_table_column.
|
||||
var genTableColumnColumns = GenTableColumnColumns{
|
||||
ColumnId: "column_id",
|
||||
TableId: "table_id",
|
||||
ColumnName: "column_name",
|
||||
ColumnComment: "column_comment",
|
||||
ColumnType: "column_type",
|
||||
JavaType: "java_type",
|
||||
JavaField: "java_field",
|
||||
IsPk: "is_pk",
|
||||
IsIncrement: "is_increment",
|
||||
IsRequired: "is_required",
|
||||
IsInsert: "is_insert",
|
||||
IsEdit: "is_edit",
|
||||
IsList: "is_list",
|
||||
IsQuery: "is_query",
|
||||
QueryType: "query_type",
|
||||
HtmlType: "html_type",
|
||||
DictType: "dict_type",
|
||||
Sort: "sort",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewGenTableColumnDao creates and returns a new DAO object for table data access.
|
||||
func NewGenTableColumnDao(handlers ...gdb.ModelHandler) *GenTableColumnDao {
|
||||
return &GenTableColumnDao{
|
||||
group: "default",
|
||||
table: "gen_table_column",
|
||||
columns: genTableColumnColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *GenTableColumnDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *GenTableColumnDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *GenTableColumnDao) Columns() GenTableColumnColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *GenTableColumnDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *GenTableColumnDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *GenTableColumnDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysClientDao is the data access object for the table sys_client.
|
||||
type SysClientDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysClientColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysClientColumns defines and stores column names for the table sys_client.
|
||||
type SysClientColumns struct {
|
||||
Id string // id
|
||||
ClientId string // 客户端id
|
||||
ClientKey string // 客户端key
|
||||
ClientSecret string // 客户端秘钥
|
||||
GrantType string // 授权类型
|
||||
DeviceType string // 设备类型
|
||||
ActiveTimeout string // token活跃超时时间
|
||||
Timeout string // token固定超时
|
||||
Status string // 状态(0正常 1停用)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysClientColumns holds the columns for the table sys_client.
|
||||
var sysClientColumns = SysClientColumns{
|
||||
Id: "id",
|
||||
ClientId: "client_id",
|
||||
ClientKey: "client_key",
|
||||
ClientSecret: "client_secret",
|
||||
GrantType: "grant_type",
|
||||
DeviceType: "device_type",
|
||||
ActiveTimeout: "active_timeout",
|
||||
Timeout: "timeout",
|
||||
Status: "status",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysClientDao creates and returns a new DAO object for table data access.
|
||||
func NewSysClientDao(handlers ...gdb.ModelHandler) *SysClientDao {
|
||||
return &SysClientDao{
|
||||
group: "default",
|
||||
table: "sys_client",
|
||||
columns: sysClientColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysClientDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysClientDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysClientDao) Columns() SysClientColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysClientDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysClientDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysClientDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysConfigDao is the data access object for the table sys_config.
|
||||
type SysConfigDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysConfigColumns defines and stores column names for the table sys_config.
|
||||
type SysConfigColumns struct {
|
||||
ConfigId string // 参数主键
|
||||
TenantId string // 租户编号
|
||||
ConfigName string // 参数名称
|
||||
ConfigKey string // 参数键名
|
||||
ConfigValue string // 参数键值
|
||||
ConfigType string // 系统内置(Y是 N否)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysConfigColumns holds the columns for the table sys_config.
|
||||
var sysConfigColumns = SysConfigColumns{
|
||||
ConfigId: "config_id",
|
||||
TenantId: "tenant_id",
|
||||
ConfigName: "config_name",
|
||||
ConfigKey: "config_key",
|
||||
ConfigValue: "config_value",
|
||||
ConfigType: "config_type",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewSysConfigDao(handlers ...gdb.ModelHandler) *SysConfigDao {
|
||||
return &SysConfigDao{
|
||||
group: "default",
|
||||
table: "sys_config",
|
||||
columns: sysConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysConfigDao) Columns() SysConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysConfigDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysConfigDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysDeptDao is the data access object for the table sys_dept.
|
||||
type SysDeptDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysDeptColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysDeptColumns defines and stores column names for the table sys_dept.
|
||||
type SysDeptColumns struct {
|
||||
DeptId string // 部门id
|
||||
TenantId string // 租户编号
|
||||
ParentId string // 父部门id
|
||||
Ancestors string // 祖级列表
|
||||
DeptKey string // 机构编号
|
||||
DeptName string // 部门名称
|
||||
DeptType string // 部门类型(0:部门 1:公司)
|
||||
DeptCategory string // 部门类别编码
|
||||
OrderNum string // 显示顺序
|
||||
Leader string // 负责人
|
||||
Phone string // 联系电话
|
||||
Email string // 邮箱
|
||||
Status string // 部门状态(0正常 1停用)
|
||||
CreditCode string // 统一社会信用代码
|
||||
AreaCode string // 行政区域代码
|
||||
Address string // 地址
|
||||
DeptRole string // 机构默认角色ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysDeptColumns holds the columns for the table sys_dept.
|
||||
var sysDeptColumns = SysDeptColumns{
|
||||
DeptId: "dept_id",
|
||||
TenantId: "tenant_id",
|
||||
ParentId: "parent_id",
|
||||
Ancestors: "ancestors",
|
||||
DeptKey: "dept_key",
|
||||
DeptName: "dept_name",
|
||||
DeptType: "dept_type",
|
||||
DeptCategory: "dept_category",
|
||||
OrderNum: "order_num",
|
||||
Leader: "leader",
|
||||
Phone: "phone",
|
||||
Email: "email",
|
||||
Status: "status",
|
||||
CreditCode: "credit_code",
|
||||
AreaCode: "area_code",
|
||||
Address: "address",
|
||||
DeptRole: "dept_role",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysDeptDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDeptDao(handlers ...gdb.ModelHandler) *SysDeptDao {
|
||||
return &SysDeptDao{
|
||||
group: "default",
|
||||
table: "sys_dept",
|
||||
columns: sysDeptColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysDeptDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysDeptDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysDeptDao) Columns() SysDeptColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysDeptDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysDeptDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysDictDataDao is the data access object for the table sys_dict_data.
|
||||
type SysDictDataDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysDictDataColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysDictDataColumns defines and stores column names for the table sys_dict_data.
|
||||
type SysDictDataColumns struct {
|
||||
DictCode string // 字典编码
|
||||
TenantId string // 租户编号
|
||||
DictSort string // 字典排序
|
||||
DictLabel string // 字典标签
|
||||
DictValue string // 字典键值
|
||||
DictType string // 字典类型
|
||||
CssClass string // 样式属性(其他样式扩展)
|
||||
ListClass string // 表格回显样式
|
||||
IsDefault string // 是否默认(Y是 N否)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysDictDataColumns holds the columns for the table sys_dict_data.
|
||||
var sysDictDataColumns = SysDictDataColumns{
|
||||
DictCode: "dict_code",
|
||||
TenantId: "tenant_id",
|
||||
DictSort: "dict_sort",
|
||||
DictLabel: "dict_label",
|
||||
DictValue: "dict_value",
|
||||
DictType: "dict_type",
|
||||
CssClass: "css_class",
|
||||
ListClass: "list_class",
|
||||
IsDefault: "is_default",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysDictDataDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDictDataDao(handlers ...gdb.ModelHandler) *SysDictDataDao {
|
||||
return &SysDictDataDao{
|
||||
group: "default",
|
||||
table: "sys_dict_data",
|
||||
columns: sysDictDataColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysDictDataDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysDictDataDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysDictDataDao) Columns() SysDictDataColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysDictDataDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysDictDataDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysDictDataDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysDictTypeDao is the data access object for the table sys_dict_type.
|
||||
type SysDictTypeDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysDictTypeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysDictTypeColumns defines and stores column names for the table sys_dict_type.
|
||||
type SysDictTypeColumns struct {
|
||||
DictId string // 字典主键
|
||||
TenantId string // 租户编号
|
||||
DictName string // 字典名称
|
||||
DictType string // 字典类型
|
||||
IsSys string // 是否系统(0是 1否)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysDictTypeColumns holds the columns for the table sys_dict_type.
|
||||
var sysDictTypeColumns = SysDictTypeColumns{
|
||||
DictId: "dict_id",
|
||||
TenantId: "tenant_id",
|
||||
DictName: "dict_name",
|
||||
DictType: "dict_type",
|
||||
IsSys: "is_sys",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysDictTypeDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDictTypeDao(handlers ...gdb.ModelHandler) *SysDictTypeDao {
|
||||
return &SysDictTypeDao{
|
||||
group: "default",
|
||||
table: "sys_dict_type",
|
||||
columns: sysDictTypeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysDictTypeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysDictTypeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysDictTypeDao) Columns() SysDictTypeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysDictTypeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysDictTypeDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysDictTypeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysGenTableDao is the data access object for the table sys_gen_table.
|
||||
type SysGenTableDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysGenTableColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysGenTableColumns defines and stores column names for the table sys_gen_table.
|
||||
type SysGenTableColumns struct {
|
||||
TableId string // 生成ID
|
||||
GenType string // 生成类型
|
||||
GenTemplate string // 生成模板
|
||||
VarName string // 实体命名
|
||||
Options string // 配置选项
|
||||
DbName string // 数据库名称
|
||||
TableName string // 主表名称
|
||||
TableComment string // 主表注释
|
||||
DaoName string // 主表dao模型
|
||||
MasterColumns string // 主表字段
|
||||
AddonName string // 插件名称
|
||||
Status string // 生成状态(0成功 1未开始)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysGenTableColumns holds the columns for the table sys_gen_table.
|
||||
var sysGenTableColumns = SysGenTableColumns{
|
||||
TableId: "table_id",
|
||||
GenType: "gen_type",
|
||||
GenTemplate: "gen_template",
|
||||
VarName: "var_name",
|
||||
Options: "options",
|
||||
DbName: "db_name",
|
||||
TableName: "table_name",
|
||||
TableComment: "table_comment",
|
||||
DaoName: "dao_name",
|
||||
MasterColumns: "master_columns",
|
||||
AddonName: "addon_name",
|
||||
Status: "status",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysGenTableDao creates and returns a new DAO object for table data access.
|
||||
func NewSysGenTableDao(handlers ...gdb.ModelHandler) *SysGenTableDao {
|
||||
return &SysGenTableDao{
|
||||
group: "default",
|
||||
table: "sys_gen_table",
|
||||
columns: sysGenTableColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysGenTableDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysGenTableDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysGenTableDao) Columns() SysGenTableColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysGenTableDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysGenTableDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysGenTableDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysJobDao is the data access object for the table sys_job.
|
||||
type SysJobDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysJobColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysJobColumns defines and stores column names for the table sys_job.
|
||||
type SysJobColumns struct {
|
||||
JobId string // 任务ID
|
||||
JobName string // 任务名称
|
||||
JobParams string // 参数
|
||||
JobGroup string // 任务组名
|
||||
InvokeTarget string // 调用目标字符串
|
||||
CronExpression string // cron执行表达式
|
||||
MisfirePolicy string // 计划执行策略(1多次执行 2执行一次)
|
||||
Concurrent string // 是否并发执行(0允许 1禁止)
|
||||
Status string // 状态(0正常 1暂停)
|
||||
Remark string // 备注信息
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysJobColumns holds the columns for the table sys_job.
|
||||
var sysJobColumns = SysJobColumns{
|
||||
JobId: "job_id",
|
||||
JobName: "job_name",
|
||||
JobParams: "job_params",
|
||||
JobGroup: "job_group",
|
||||
InvokeTarget: "invoke_target",
|
||||
CronExpression: "cron_expression",
|
||||
MisfirePolicy: "misfire_policy",
|
||||
Concurrent: "concurrent",
|
||||
Status: "status",
|
||||
Remark: "remark",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysJobDao creates and returns a new DAO object for table data access.
|
||||
func NewSysJobDao(handlers ...gdb.ModelHandler) *SysJobDao {
|
||||
return &SysJobDao{
|
||||
group: "default",
|
||||
table: "sys_job",
|
||||
columns: sysJobColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysJobDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysJobDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysJobDao) Columns() SysJobColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysJobDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysJobDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysJobDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysLogininforDao is the data access object for the table sys_logininfor.
|
||||
type SysLogininforDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysLogininforColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysLogininforColumns defines and stores column names for the table sys_logininfor.
|
||||
type SysLogininforColumns struct {
|
||||
InfoId string // 访问ID
|
||||
TenantId string // 租户编号
|
||||
UserName string // 用户账号
|
||||
ClientKey string // 客户端
|
||||
DeviceType string // 设备类型
|
||||
Ipaddr string // 登录IP地址
|
||||
LoginLocation string // 登录地点
|
||||
Browser string // 浏览器类型
|
||||
Os string // 操作系统
|
||||
Status string // 登录状态(0成功 1失败)
|
||||
Msg string // 提示消息
|
||||
LoginTime string // 访问时间
|
||||
}
|
||||
|
||||
// sysLogininforColumns holds the columns for the table sys_logininfor.
|
||||
var sysLogininforColumns = SysLogininforColumns{
|
||||
InfoId: "info_id",
|
||||
TenantId: "tenant_id",
|
||||
UserName: "user_name",
|
||||
ClientKey: "client_key",
|
||||
DeviceType: "device_type",
|
||||
Ipaddr: "ipaddr",
|
||||
LoginLocation: "login_location",
|
||||
Browser: "browser",
|
||||
Os: "os",
|
||||
Status: "status",
|
||||
Msg: "msg",
|
||||
LoginTime: "login_time",
|
||||
}
|
||||
|
||||
// NewSysLogininforDao creates and returns a new DAO object for table data access.
|
||||
func NewSysLogininforDao(handlers ...gdb.ModelHandler) *SysLogininforDao {
|
||||
return &SysLogininforDao{
|
||||
group: "default",
|
||||
table: "sys_logininfor",
|
||||
columns: sysLogininforColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysLogininforDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysLogininforDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysLogininforDao) Columns() SysLogininforColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysLogininforDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysLogininforDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysLogininforDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysMenuDao is the data access object for the table sys_menu.
|
||||
type SysMenuDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysMenuColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysMenuColumns defines and stores column names for the table sys_menu.
|
||||
type SysMenuColumns struct {
|
||||
MenuId string // 菜单ID
|
||||
MenuName string // 菜单名称
|
||||
ParentId string // 父菜单ID
|
||||
Level string // 关系树等级
|
||||
Tree string // 关系树
|
||||
OrderNum string // 显示顺序
|
||||
Path string // 路由地址
|
||||
Component string // 组件路径
|
||||
QueryParam string // 路由参数
|
||||
IsFrame string // 是否为外链(0是 1否)
|
||||
IsCache string // 是否缓存(0缓存 1不缓存)
|
||||
MenuType string // 菜单类型(M目录 C菜单 F按钮)
|
||||
Visible string // 显示状态(0显示 1隐藏)
|
||||
Status string // 菜单状态(0正常 1停用)
|
||||
Perms string // 权限标识
|
||||
Icon string // 菜单图标
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysMenuColumns holds the columns for the table sys_menu.
|
||||
var sysMenuColumns = SysMenuColumns{
|
||||
MenuId: "menu_id",
|
||||
MenuName: "menu_name",
|
||||
ParentId: "parent_id",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
OrderNum: "order_num",
|
||||
Path: "path",
|
||||
Component: "component",
|
||||
QueryParam: "query_param",
|
||||
IsFrame: "is_frame",
|
||||
IsCache: "is_cache",
|
||||
MenuType: "menu_type",
|
||||
Visible: "visible",
|
||||
Status: "status",
|
||||
Perms: "perms",
|
||||
Icon: "icon",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysMenuDao creates and returns a new DAO object for table data access.
|
||||
func NewSysMenuDao(handlers ...gdb.ModelHandler) *SysMenuDao {
|
||||
return &SysMenuDao{
|
||||
group: "default",
|
||||
table: "sys_menu",
|
||||
columns: sysMenuColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysMenuDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysMenuDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysMenuDao) Columns() SysMenuColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysMenuDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysMenuDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysNoticeDao is the data access object for the table sys_notice.
|
||||
type SysNoticeDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysNoticeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysNoticeColumns defines and stores column names for the table sys_notice.
|
||||
type SysNoticeColumns struct {
|
||||
NoticeId string // 公告ID
|
||||
TenantId string // 租户编号
|
||||
NoticeTitle string // 公告标题
|
||||
NoticeType string // 公告类型(1通知 2公告)
|
||||
NoticeContent string // 公告内容
|
||||
Status string // 公告状态(0正常 1关闭)
|
||||
NoticeRange string // 通知范围(1全员 2指定机构 3指定用户)
|
||||
DeptIds string // 通知机构ID列表JSON
|
||||
UserIds string // 通知用户ID列表JSON
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysNoticeColumns holds the columns for the table sys_notice.
|
||||
var sysNoticeColumns = SysNoticeColumns{
|
||||
NoticeId: "notice_id",
|
||||
TenantId: "tenant_id",
|
||||
NoticeTitle: "notice_title",
|
||||
NoticeType: "notice_type",
|
||||
NoticeContent: "notice_content",
|
||||
Status: "status",
|
||||
NoticeRange: "notice_range",
|
||||
DeptIds: "dept_ids",
|
||||
UserIds: "user_ids",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysNoticeDao creates and returns a new DAO object for table data access.
|
||||
func NewSysNoticeDao(handlers ...gdb.ModelHandler) *SysNoticeDao {
|
||||
return &SysNoticeDao{
|
||||
group: "default",
|
||||
table: "sys_notice",
|
||||
columns: sysNoticeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysNoticeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysNoticeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysNoticeDao) Columns() SysNoticeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysNoticeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysNoticeDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysNoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysNoticeUserDao is the data access object for the table sys_notice_user.
|
||||
type SysNoticeUserDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysNoticeUserColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysNoticeUserColumns defines and stores column names for the table sys_notice_user.
|
||||
type SysNoticeUserColumns struct {
|
||||
Id string // ID
|
||||
NoticeId string // 公告ID
|
||||
TenantId string // 租户编号
|
||||
NoticeTitle string // 公告标题
|
||||
NoticeType string // 公告类型(1通知 2公告)
|
||||
NoticeContent string // 公告内容
|
||||
Status string // 公告状态(0正常 1关闭)
|
||||
UserId string // 用户ID
|
||||
IsRead string // 是否已读(0未读 1已读)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysNoticeUserColumns holds the columns for the table sys_notice_user.
|
||||
var sysNoticeUserColumns = SysNoticeUserColumns{
|
||||
Id: "id",
|
||||
NoticeId: "notice_id",
|
||||
TenantId: "tenant_id",
|
||||
NoticeTitle: "notice_title",
|
||||
NoticeType: "notice_type",
|
||||
NoticeContent: "notice_content",
|
||||
Status: "status",
|
||||
UserId: "user_id",
|
||||
IsRead: "is_read",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysNoticeUserDao creates and returns a new DAO object for table data access.
|
||||
func NewSysNoticeUserDao(handlers ...gdb.ModelHandler) *SysNoticeUserDao {
|
||||
return &SysNoticeUserDao{
|
||||
group: "default",
|
||||
table: "sys_notice_user",
|
||||
columns: sysNoticeUserColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysNoticeUserDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysNoticeUserDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysNoticeUserDao) Columns() SysNoticeUserColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysNoticeUserDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysNoticeUserDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysNoticeUserDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysOperLogDao is the data access object for the table sys_oper_log.
|
||||
type SysOperLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysOperLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysOperLogColumns defines and stores column names for the table sys_oper_log.
|
||||
type SysOperLogColumns struct {
|
||||
OperId string // 日志主键
|
||||
TenantId string // 租户编号
|
||||
Title string // 模块标题
|
||||
BusinessType string // 业务类型(0其它 1新增 2修改 3删除)
|
||||
Method string // 方法名称
|
||||
RequestMethod string // 请求方式
|
||||
OperatorType string // 操作类别(0其它 1后台用户 2手机端用户)
|
||||
OperName string // 操作人员
|
||||
DeptName string // 部门名称
|
||||
OperUrl string // 请求URL
|
||||
OperIp string // 主机地址
|
||||
OperLocation string // 操作地点
|
||||
OperParam string // 请求参数
|
||||
JsonResult string // 返回参数
|
||||
Status string // 操作状态(0正常 1异常)
|
||||
ErrorMsg string // 错误消息
|
||||
OperTime string // 操作时间
|
||||
CostTime string // 消耗时间
|
||||
}
|
||||
|
||||
// sysOperLogColumns holds the columns for the table sys_oper_log.
|
||||
var sysOperLogColumns = SysOperLogColumns{
|
||||
OperId: "oper_id",
|
||||
TenantId: "tenant_id",
|
||||
Title: "title",
|
||||
BusinessType: "business_type",
|
||||
Method: "method",
|
||||
RequestMethod: "request_method",
|
||||
OperatorType: "operator_type",
|
||||
OperName: "oper_name",
|
||||
DeptName: "dept_name",
|
||||
OperUrl: "oper_url",
|
||||
OperIp: "oper_ip",
|
||||
OperLocation: "oper_location",
|
||||
OperParam: "oper_param",
|
||||
JsonResult: "json_result",
|
||||
Status: "status",
|
||||
ErrorMsg: "error_msg",
|
||||
OperTime: "oper_time",
|
||||
CostTime: "cost_time",
|
||||
}
|
||||
|
||||
// NewSysOperLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSysOperLogDao(handlers ...gdb.ModelHandler) *SysOperLogDao {
|
||||
return &SysOperLogDao{
|
||||
group: "default",
|
||||
table: "sys_oper_log",
|
||||
columns: sysOperLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysOperLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysOperLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysOperLogDao) Columns() SysOperLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysOperLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysOperLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysOperLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysOssDao is the data access object for the table sys_oss.
|
||||
type SysOssDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysOssColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysOssColumns defines and stores column names for the table sys_oss.
|
||||
type SysOssColumns struct {
|
||||
OssId string // 对象存储主键
|
||||
TenantId string // 租户编号
|
||||
FileName string // 文件名
|
||||
OriginalName string // 原名
|
||||
FileSuffix string // 文件后缀名
|
||||
Path string // 存储路径
|
||||
Url string // URL地址
|
||||
CreatedDept string // 创建部门
|
||||
CreatedAt string // 创建时间
|
||||
CreatedBy string // 创建者
|
||||
UpdatedAt string // 更新时间
|
||||
UpdatedBy string // 更新者
|
||||
Service string // 服务商
|
||||
Md5 string // 文件MD5
|
||||
FileSize string // 文件大小
|
||||
FileCrc16 string // 文件Crc16
|
||||
FileSum string // 文件校验和
|
||||
}
|
||||
|
||||
// sysOssColumns holds the columns for the table sys_oss.
|
||||
var sysOssColumns = SysOssColumns{
|
||||
OssId: "oss_id",
|
||||
TenantId: "tenant_id",
|
||||
FileName: "file_name",
|
||||
OriginalName: "original_name",
|
||||
FileSuffix: "file_suffix",
|
||||
Path: "path",
|
||||
Url: "url",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedAt: "created_at",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedAt: "updated_at",
|
||||
UpdatedBy: "updated_by",
|
||||
Service: "service",
|
||||
Md5: "md5",
|
||||
FileSize: "file_size",
|
||||
FileCrc16: "file_crc16",
|
||||
FileSum: "file_sum",
|
||||
}
|
||||
|
||||
// NewSysOssDao creates and returns a new DAO object for table data access.
|
||||
func NewSysOssDao(handlers ...gdb.ModelHandler) *SysOssDao {
|
||||
return &SysOssDao{
|
||||
group: "default",
|
||||
table: "sys_oss",
|
||||
columns: sysOssColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysOssDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysOssDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysOssDao) Columns() SysOssColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysOssDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysOssDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysOssDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysOssConfigDao is the data access object for the table sys_oss_config.
|
||||
type SysOssConfigDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysOssConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysOssConfigColumns defines and stores column names for the table sys_oss_config.
|
||||
type SysOssConfigColumns struct {
|
||||
OssConfigId string // 主键
|
||||
TenantId string // 租户编号
|
||||
ConfigKey string // 配置key
|
||||
AccessKey string // accessKey
|
||||
SecretKey string // 秘钥
|
||||
BucketName string // 桶名称
|
||||
Prefix string // 前缀
|
||||
Endpoint string // 访问站点
|
||||
Domain string // 自定义域名
|
||||
IsHttps string // 是否https(Y=是,N=否)
|
||||
Region string // 域
|
||||
AccessPolicy string // 桶权限类型(0=private 1=public 2=custom)
|
||||
Status string // 是否默认(0=是,1=否)
|
||||
Ext1 string // 扩展字段
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysOssConfigColumns holds the columns for the table sys_oss_config.
|
||||
var sysOssConfigColumns = SysOssConfigColumns{
|
||||
OssConfigId: "oss_config_id",
|
||||
TenantId: "tenant_id",
|
||||
ConfigKey: "config_key",
|
||||
AccessKey: "access_key",
|
||||
SecretKey: "secret_key",
|
||||
BucketName: "bucket_name",
|
||||
Prefix: "prefix",
|
||||
Endpoint: "endpoint",
|
||||
Domain: "domain",
|
||||
IsHttps: "is_https",
|
||||
Region: "region",
|
||||
AccessPolicy: "access_policy",
|
||||
Status: "status",
|
||||
Ext1: "ext1",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysOssConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewSysOssConfigDao(handlers ...gdb.ModelHandler) *SysOssConfigDao {
|
||||
return &SysOssConfigDao{
|
||||
group: "default",
|
||||
table: "sys_oss_config",
|
||||
columns: sysOssConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysOssConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysOssConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysOssConfigDao) Columns() SysOssConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysOssConfigDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysOssConfigDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysOssConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysPostDao is the data access object for the table sys_post.
|
||||
type SysPostDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysPostColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysPostColumns defines and stores column names for the table sys_post.
|
||||
type SysPostColumns struct {
|
||||
PostId string // 岗位ID
|
||||
TenantId string // 租户编号
|
||||
DeptId string // 部门id
|
||||
PostCode string // 岗位编码
|
||||
PostCategory string // 岗位类别编码
|
||||
PostName string // 岗位名称
|
||||
PostSort string // 显示顺序
|
||||
Status string // 状态(0正常 1停用)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysPostColumns holds the columns for the table sys_post.
|
||||
var sysPostColumns = SysPostColumns{
|
||||
PostId: "post_id",
|
||||
TenantId: "tenant_id",
|
||||
DeptId: "dept_id",
|
||||
PostCode: "post_code",
|
||||
PostCategory: "post_category",
|
||||
PostName: "post_name",
|
||||
PostSort: "post_sort",
|
||||
Status: "status",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysPostDao creates and returns a new DAO object for table data access.
|
||||
func NewSysPostDao(handlers ...gdb.ModelHandler) *SysPostDao {
|
||||
return &SysPostDao{
|
||||
group: "default",
|
||||
table: "sys_post",
|
||||
columns: sysPostColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysPostDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysPostDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysPostDao) Columns() SysPostColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysPostDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysPostDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysRoleDao is the data access object for the table sys_role.
|
||||
type SysRoleDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysRoleColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysRoleColumns defines and stores column names for the table sys_role.
|
||||
type SysRoleColumns struct {
|
||||
RoleId string // 角色ID
|
||||
TenantId string // 租户编号
|
||||
DeptId string // 部门机构id
|
||||
RoleName string // 角色名称
|
||||
RoleKey string // 角色权限字符串
|
||||
RoleSort string // 显示顺序
|
||||
DataScope string // 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:仅本人数据权限 6:仅本人数据权限 7:本组织及下一级数据权限
|
||||
MenuCheckStrictly string // 菜单树选择项是否关联显示
|
||||
DeptCheckStrictly string // 部门树选择项是否关联显示
|
||||
Status string // 角色状态(0正常 1停用)
|
||||
IsPass string // 是否传递数据权限(0:传递 1:不传递)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysRoleColumns holds the columns for the table sys_role.
|
||||
var sysRoleColumns = SysRoleColumns{
|
||||
RoleId: "role_id",
|
||||
TenantId: "tenant_id",
|
||||
DeptId: "dept_id",
|
||||
RoleName: "role_name",
|
||||
RoleKey: "role_key",
|
||||
RoleSort: "role_sort",
|
||||
DataScope: "data_scope",
|
||||
MenuCheckStrictly: "menu_check_strictly",
|
||||
DeptCheckStrictly: "dept_check_strictly",
|
||||
Status: "status",
|
||||
IsPass: "is_pass",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysRoleDao creates and returns a new DAO object for table data access.
|
||||
func NewSysRoleDao(handlers ...gdb.ModelHandler) *SysRoleDao {
|
||||
return &SysRoleDao{
|
||||
group: "default",
|
||||
table: "sys_role",
|
||||
columns: sysRoleColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysRoleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysRoleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysRoleDao) Columns() SysRoleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysRoleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysRoleDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysRoleDeptDao is the data access object for the table sys_role_dept.
|
||||
type SysRoleDeptDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysRoleDeptColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysRoleDeptColumns defines and stores column names for the table sys_role_dept.
|
||||
type SysRoleDeptColumns struct {
|
||||
TenantId string // 租户编号
|
||||
RoleId string // 角色ID
|
||||
DeptId string // 部门ID
|
||||
}
|
||||
|
||||
// sysRoleDeptColumns holds the columns for the table sys_role_dept.
|
||||
var sysRoleDeptColumns = SysRoleDeptColumns{
|
||||
TenantId: "tenant_id",
|
||||
RoleId: "role_id",
|
||||
DeptId: "dept_id",
|
||||
}
|
||||
|
||||
// NewSysRoleDeptDao creates and returns a new DAO object for table data access.
|
||||
func NewSysRoleDeptDao(handlers ...gdb.ModelHandler) *SysRoleDeptDao {
|
||||
return &SysRoleDeptDao{
|
||||
group: "default",
|
||||
table: "sys_role_dept",
|
||||
columns: sysRoleDeptColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysRoleDeptDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysRoleDeptDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysRoleDeptDao) Columns() SysRoleDeptColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysRoleDeptDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysRoleDeptDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysRoleDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysRoleMenuDao is the data access object for the table sys_role_menu.
|
||||
type SysRoleMenuDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysRoleMenuColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysRoleMenuColumns defines and stores column names for the table sys_role_menu.
|
||||
type SysRoleMenuColumns struct {
|
||||
TenantId string // 租户编号
|
||||
RoleId string // 角色ID
|
||||
MenuId string // 菜单ID
|
||||
DataScope string // 数据范围(0按角色数据权限 1全部数据权限 3本部门数据权限 4本部门及以下数据权限 5仅本人数据权限 6本部门及以下或本人数据权限 7本组织及本组织下一级数据权限 8本组织下一级数据权限)
|
||||
}
|
||||
|
||||
// sysRoleMenuColumns holds the columns for the table sys_role_menu.
|
||||
var sysRoleMenuColumns = SysRoleMenuColumns{
|
||||
TenantId: "tenant_id",
|
||||
RoleId: "role_id",
|
||||
MenuId: "menu_id",
|
||||
DataScope: "data_scope",
|
||||
}
|
||||
|
||||
// NewSysRoleMenuDao creates and returns a new DAO object for table data access.
|
||||
func NewSysRoleMenuDao(handlers ...gdb.ModelHandler) *SysRoleMenuDao {
|
||||
return &SysRoleMenuDao{
|
||||
group: "default",
|
||||
table: "sys_role_menu",
|
||||
columns: sysRoleMenuColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysRoleMenuDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysRoleMenuDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysRoleMenuDao) Columns() SysRoleMenuColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysRoleMenuDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysRoleMenuDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysRoleMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysSocialDao is the data access object for the table sys_social.
|
||||
type SysSocialDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysSocialColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysSocialColumns defines and stores column names for the table sys_social.
|
||||
type SysSocialColumns struct {
|
||||
Id string // 主键
|
||||
UserId string // 用户ID
|
||||
TenantId string // 租户id
|
||||
AuthId string // 平台+平台唯一id
|
||||
Source string // 用户来源
|
||||
OpenId string // 平台编号唯一id
|
||||
UserName string // 登录账号
|
||||
NickName string // 用户昵称
|
||||
Email string // 用户邮箱
|
||||
Avatar string // 头像地址
|
||||
AccessToken string // 用户的授权令牌
|
||||
ExpireIn string // 用户的授权令牌的有效期,部分平台可能没有
|
||||
RefreshToken string // 刷新令牌,部分平台可能没有
|
||||
AccessCode string // 平台的授权信息,部分平台可能没有
|
||||
UnionId string // 用户的 unionid
|
||||
Scope string // 授予的权限,部分平台可能没有
|
||||
TokenType string // 个别平台的授权信息,部分平台可能没有
|
||||
IdToken string // id token,部分平台可能没有
|
||||
MacAlgorithm string // 小米平台用户的附带属性,部分平台可能没有
|
||||
MacKey string // 小米平台用户的附带属性,部分平台可能没有
|
||||
Code string // 用户的授权code,部分平台可能没有
|
||||
OauthToken string // Twitter平台用户的附带属性,部分平台可能没有
|
||||
OauthTokenSecret string // Twitter平台用户的附带属性,部分平台可能没有
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysSocialColumns holds the columns for the table sys_social.
|
||||
var sysSocialColumns = SysSocialColumns{
|
||||
Id: "id",
|
||||
UserId: "user_id",
|
||||
TenantId: "tenant_id",
|
||||
AuthId: "auth_id",
|
||||
Source: "source",
|
||||
OpenId: "open_id",
|
||||
UserName: "user_name",
|
||||
NickName: "nick_name",
|
||||
Email: "email",
|
||||
Avatar: "avatar",
|
||||
AccessToken: "access_token",
|
||||
ExpireIn: "expire_in",
|
||||
RefreshToken: "refresh_token",
|
||||
AccessCode: "access_code",
|
||||
UnionId: "union_id",
|
||||
Scope: "scope",
|
||||
TokenType: "token_type",
|
||||
IdToken: "id_token",
|
||||
MacAlgorithm: "mac_algorithm",
|
||||
MacKey: "mac_key",
|
||||
Code: "code",
|
||||
OauthToken: "oauth_token",
|
||||
OauthTokenSecret: "oauth_token_secret",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysSocialDao creates and returns a new DAO object for table data access.
|
||||
func NewSysSocialDao(handlers ...gdb.ModelHandler) *SysSocialDao {
|
||||
return &SysSocialDao{
|
||||
group: "default",
|
||||
table: "sys_social",
|
||||
columns: sysSocialColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysSocialDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysSocialDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysSocialDao) Columns() SysSocialColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysSocialDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysSocialDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysSocialDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysTenantDao is the data access object for the table sys_tenant.
|
||||
type SysTenantDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysTenantColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysTenantColumns defines and stores column names for the table sys_tenant.
|
||||
type SysTenantColumns struct {
|
||||
Id string // id
|
||||
TenantId string // 租户编号
|
||||
ContactUserName string // 联系人
|
||||
ContactPhone string // 联系电话
|
||||
CompanyName string // 企业名称
|
||||
LicenseNumber string // 统一社会信用代码
|
||||
Address string // 地址
|
||||
Intro string // 企业简介
|
||||
Domain string // 域名
|
||||
Remark string // 备注
|
||||
PackageId string // 租户套餐编号
|
||||
AdminRoleId string // 管理员角色ID
|
||||
AdminDeptId string // 管理员部门ID
|
||||
AdminUserId string // 管理员用户ID
|
||||
ExpireTime string // 过期时间
|
||||
AccountCount string // 用户数量(-1不限制)
|
||||
Status string // 租户状态(0正常 1停用)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysTenantColumns holds the columns for the table sys_tenant.
|
||||
var sysTenantColumns = SysTenantColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ContactUserName: "contact_user_name",
|
||||
ContactPhone: "contact_phone",
|
||||
CompanyName: "company_name",
|
||||
LicenseNumber: "license_number",
|
||||
Address: "address",
|
||||
Intro: "intro",
|
||||
Domain: "domain",
|
||||
Remark: "remark",
|
||||
PackageId: "package_id",
|
||||
AdminRoleId: "admin_role_id",
|
||||
AdminDeptId: "admin_dept_id",
|
||||
AdminUserId: "admin_user_id",
|
||||
ExpireTime: "expire_time",
|
||||
AccountCount: "account_count",
|
||||
Status: "status",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysTenantDao creates and returns a new DAO object for table data access.
|
||||
func NewSysTenantDao(handlers ...gdb.ModelHandler) *SysTenantDao {
|
||||
return &SysTenantDao{
|
||||
group: "default",
|
||||
table: "sys_tenant",
|
||||
columns: sysTenantColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysTenantDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysTenantDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysTenantDao) Columns() SysTenantColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysTenantDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysTenantDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysTenantDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysTenantPackageDao is the data access object for the table sys_tenant_package.
|
||||
type SysTenantPackageDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysTenantPackageColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysTenantPackageColumns defines and stores column names for the table sys_tenant_package.
|
||||
type SysTenantPackageColumns struct {
|
||||
PackageId string // 租户套餐id
|
||||
PackageName string // 套餐名称
|
||||
MenuIds string // 关联菜单id
|
||||
Remark string // 备注
|
||||
MenuCheckStrictly string // 菜单树选择项是否关联显示
|
||||
Status string // 状态(0正常 1停用)
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysTenantPackageColumns holds the columns for the table sys_tenant_package.
|
||||
var sysTenantPackageColumns = SysTenantPackageColumns{
|
||||
PackageId: "package_id",
|
||||
PackageName: "package_name",
|
||||
MenuIds: "menu_ids",
|
||||
Remark: "remark",
|
||||
MenuCheckStrictly: "menu_check_strictly",
|
||||
Status: "status",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysTenantPackageDao creates and returns a new DAO object for table data access.
|
||||
func NewSysTenantPackageDao(handlers ...gdb.ModelHandler) *SysTenantPackageDao {
|
||||
return &SysTenantPackageDao{
|
||||
group: "default",
|
||||
table: "sys_tenant_package",
|
||||
columns: sysTenantPackageColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysTenantPackageDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysTenantPackageDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysTenantPackageDao) Columns() SysTenantPackageColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysTenantPackageDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysTenantPackageDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysTenantPackageDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysUserDao is the data access object for the table sys_user.
|
||||
type SysUserDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysUserColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysUserColumns defines and stores column names for the table sys_user.
|
||||
type SysUserColumns struct {
|
||||
UserId string // 用户ID
|
||||
TenantId string // 租户编号
|
||||
DeptId string // 部门ID
|
||||
UserName string // 用户账号
|
||||
NickName string // 用户昵称
|
||||
UserType string // 用户类型(sys_user系统用户)
|
||||
Email string // 用户邮箱
|
||||
Phonenumber string // 手机号码
|
||||
Sex string // 用户性别(0男 1女 2未知)
|
||||
Avatar string // 头像地址
|
||||
Salt string // 加密盐
|
||||
Password string // 密码
|
||||
Status string // 帐号状态(0正常 1停用)
|
||||
LoginIp string // 最后登录IP
|
||||
LoginDate string // 最后登录时间
|
||||
MfaEnabled string // 是否开启邮箱MFA 0否 1是
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
Remark string // 备注
|
||||
}
|
||||
|
||||
// sysUserColumns holds the columns for the table sys_user.
|
||||
var sysUserColumns = SysUserColumns{
|
||||
UserId: "user_id",
|
||||
TenantId: "tenant_id",
|
||||
DeptId: "dept_id",
|
||||
UserName: "user_name",
|
||||
NickName: "nick_name",
|
||||
UserType: "user_type",
|
||||
Email: "email",
|
||||
Phonenumber: "phonenumber",
|
||||
Sex: "sex",
|
||||
Avatar: "avatar",
|
||||
Salt: "salt",
|
||||
Password: "password",
|
||||
Status: "status",
|
||||
LoginIp: "login_ip",
|
||||
LoginDate: "login_date",
|
||||
MfaEnabled: "mfa_enabled",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
Remark: "remark",
|
||||
}
|
||||
|
||||
// NewSysUserDao creates and returns a new DAO object for table data access.
|
||||
func NewSysUserDao(handlers ...gdb.ModelHandler) *SysUserDao {
|
||||
return &SysUserDao{
|
||||
group: "default",
|
||||
table: "sys_user",
|
||||
columns: sysUserColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysUserDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysUserDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysUserDao) Columns() SysUserColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysUserDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysUserDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysUserDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysUserOnlineDao is the data access object for the table sys_user_online.
|
||||
type SysUserOnlineDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysUserOnlineColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysUserOnlineColumns defines and stores column names for the table sys_user_online.
|
||||
type SysUserOnlineColumns struct {
|
||||
OnlineId string // 访问ID
|
||||
TenantId string // 租户编号
|
||||
Uuid string // UUID
|
||||
UserName string // 用户账号
|
||||
ClientKey string // 客户端
|
||||
DeviceType string // 设备类型
|
||||
Ipaddr string // 登录IP地址
|
||||
LoginLocation string // 登录地点
|
||||
Browser string // 浏览器类型
|
||||
Os string // 操作系统
|
||||
Token string // Token
|
||||
LoginTime string // 访问时间
|
||||
ExpireTime string // 过期时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysUserOnlineColumns holds the columns for the table sys_user_online.
|
||||
var sysUserOnlineColumns = SysUserOnlineColumns{
|
||||
OnlineId: "online_id",
|
||||
TenantId: "tenant_id",
|
||||
Uuid: "uuid",
|
||||
UserName: "user_name",
|
||||
ClientKey: "client_key",
|
||||
DeviceType: "device_type",
|
||||
Ipaddr: "ipaddr",
|
||||
LoginLocation: "login_location",
|
||||
Browser: "browser",
|
||||
Os: "os",
|
||||
Token: "token",
|
||||
LoginTime: "login_time",
|
||||
ExpireTime: "expire_time",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysUserOnlineDao creates and returns a new DAO object for table data access.
|
||||
func NewSysUserOnlineDao(handlers ...gdb.ModelHandler) *SysUserOnlineDao {
|
||||
return &SysUserOnlineDao{
|
||||
group: "default",
|
||||
table: "sys_user_online",
|
||||
columns: sysUserOnlineColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysUserOnlineDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysUserOnlineDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysUserOnlineDao) Columns() SysUserOnlineColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysUserOnlineDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysUserOnlineDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysUserOnlineDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysUserPostDao is the data access object for the table sys_user_post.
|
||||
type SysUserPostDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysUserPostColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysUserPostColumns defines and stores column names for the table sys_user_post.
|
||||
type SysUserPostColumns struct {
|
||||
TenantId string // 租户编号
|
||||
UserId string // 用户ID
|
||||
PostId string // 岗位ID
|
||||
}
|
||||
|
||||
// sysUserPostColumns holds the columns for the table sys_user_post.
|
||||
var sysUserPostColumns = SysUserPostColumns{
|
||||
TenantId: "tenant_id",
|
||||
UserId: "user_id",
|
||||
PostId: "post_id",
|
||||
}
|
||||
|
||||
// NewSysUserPostDao creates and returns a new DAO object for table data access.
|
||||
func NewSysUserPostDao(handlers ...gdb.ModelHandler) *SysUserPostDao {
|
||||
return &SysUserPostDao{
|
||||
group: "default",
|
||||
table: "sys_user_post",
|
||||
columns: sysUserPostColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysUserPostDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysUserPostDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysUserPostDao) Columns() SysUserPostColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysUserPostDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysUserPostDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysUserPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysUserRoleDao is the data access object for the table sys_user_role.
|
||||
type SysUserRoleDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns SysUserRoleColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysUserRoleColumns defines and stores column names for the table sys_user_role.
|
||||
type SysUserRoleColumns struct {
|
||||
TenantId string // 租户编号
|
||||
UserId string // 用户ID
|
||||
RoleId string // 角色ID
|
||||
}
|
||||
|
||||
// sysUserRoleColumns holds the columns for the table sys_user_role.
|
||||
var sysUserRoleColumns = SysUserRoleColumns{
|
||||
TenantId: "tenant_id",
|
||||
UserId: "user_id",
|
||||
RoleId: "role_id",
|
||||
}
|
||||
|
||||
// NewSysUserRoleDao creates and returns a new DAO object for table data access.
|
||||
func NewSysUserRoleDao(handlers ...gdb.ModelHandler) *SysUserRoleDao {
|
||||
return &SysUserRoleDao{
|
||||
group: "default",
|
||||
table: "sys_user_role",
|
||||
columns: sysUserRoleColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysUserRoleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysUserRoleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysUserRoleDao) Columns() SysUserRoleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysUserRoleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *SysUserRoleDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *SysUserRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TAgentBalanceDao is the data access object for the table t_agent_balance.
|
||||
type TAgentBalanceDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TAgentBalanceColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TAgentBalanceColumns defines and stores column names for the table t_agent_balance.
|
||||
type TAgentBalanceColumns struct {
|
||||
Id string // 账户ID
|
||||
DeptId string // 机构ID
|
||||
Balance string // 账户余额
|
||||
WithdrawAmount string // 可提现金额
|
||||
WithdrawAmountStatus string // 可提现金额状态: 0-正常,1-冻结
|
||||
InvoiceAmount string // 已开票金额
|
||||
CanInvoiceAmount string // 可开票金额
|
||||
CreditLimit string // 信用额度
|
||||
UsedCredit string // 已使用信用额度
|
||||
PendingRepayment string // 待还款金额
|
||||
Status string // 状态: 0-正常, 1-禁用
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tAgentBalanceColumns holds the columns for the table t_agent_balance.
|
||||
var tAgentBalanceColumns = TAgentBalanceColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
Balance: "balance",
|
||||
WithdrawAmount: "withdraw_amount",
|
||||
WithdrawAmountStatus: "withdraw_amount_status",
|
||||
InvoiceAmount: "invoice_amount",
|
||||
CanInvoiceAmount: "can_invoice_amount",
|
||||
CreditLimit: "credit_limit",
|
||||
UsedCredit: "used_credit",
|
||||
PendingRepayment: "pending_repayment",
|
||||
Status: "status",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTAgentBalanceDao creates and returns a new DAO object for table data access.
|
||||
func NewTAgentBalanceDao(handlers ...gdb.ModelHandler) *TAgentBalanceDao {
|
||||
return &TAgentBalanceDao{
|
||||
group: "default",
|
||||
table: "t_agent_balance",
|
||||
columns: tAgentBalanceColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TAgentBalanceDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TAgentBalanceDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TAgentBalanceDao) Columns() TAgentBalanceColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TAgentBalanceDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TAgentBalanceDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TAgentBalanceDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TAgentEnterpriseDao is the data access object for the table t_agent_enterprise.
|
||||
type TAgentEnterpriseDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TAgentEnterpriseColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TAgentEnterpriseColumns defines and stores column names for the table t_agent_enterprise.
|
||||
type TAgentEnterpriseColumns struct {
|
||||
Id string // 主键ID
|
||||
DeptId string // 部门机构id
|
||||
FullName string // 单位全称
|
||||
Industry string // 行业
|
||||
LegalPersonName string // 法人名称
|
||||
LegalPersonIdCard string // 法人身份证号
|
||||
CompanyType string // 单位类型
|
||||
EstablishTime string // 单位成立时间
|
||||
BankName string // 开户行名称
|
||||
BankAccount string // 开户行账号
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tAgentEnterpriseColumns holds the columns for the table t_agent_enterprise.
|
||||
var tAgentEnterpriseColumns = TAgentEnterpriseColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
FullName: "full_name",
|
||||
Industry: "industry",
|
||||
LegalPersonName: "legal_person_name",
|
||||
LegalPersonIdCard: "legal_person_id_card",
|
||||
CompanyType: "company_type",
|
||||
EstablishTime: "establish_time",
|
||||
BankName: "bank_name",
|
||||
BankAccount: "bank_account",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTAgentEnterpriseDao creates and returns a new DAO object for table data access.
|
||||
func NewTAgentEnterpriseDao(handlers ...gdb.ModelHandler) *TAgentEnterpriseDao {
|
||||
return &TAgentEnterpriseDao{
|
||||
group: "default",
|
||||
table: "t_agent_enterprise",
|
||||
columns: tAgentEnterpriseColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TAgentEnterpriseDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TAgentEnterpriseDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TAgentEnterpriseDao) Columns() TAgentEnterpriseColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TAgentEnterpriseDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TAgentEnterpriseDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TAgentEnterpriseDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TApiDao is the data access object for the table t_api.
|
||||
type TApiDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TApiColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TApiColumns defines and stores column names for the table t_api.
|
||||
type TApiColumns struct {
|
||||
Id string // ID
|
||||
AppKey string // APPKey
|
||||
AppSecret string // APPSecret
|
||||
RateLimitPeriod string // 限流周期(秒,0:不限流)
|
||||
RateLimitCount string // 限流次数
|
||||
DeptId string // 所属机构
|
||||
GroupId string // 开放接口权限组ID
|
||||
Status string // 状态:0启用,1停用
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tApiColumns holds the columns for the table t_api.
|
||||
var tApiColumns = TApiColumns{
|
||||
Id: "id",
|
||||
AppKey: "app_key",
|
||||
AppSecret: "app_secret",
|
||||
RateLimitPeriod: "rate_limit_period",
|
||||
RateLimitCount: "rate_limit_count",
|
||||
DeptId: "dept_id",
|
||||
GroupId: "group_id",
|
||||
Status: "status",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTApiDao creates and returns a new DAO object for table data access.
|
||||
func NewTApiDao(handlers ...gdb.ModelHandler) *TApiDao {
|
||||
return &TApiDao{
|
||||
group: "default",
|
||||
table: "t_api",
|
||||
columns: tApiColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TApiDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TApiDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TApiDao) Columns() TApiColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TApiDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TApiDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TApiDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TApiGroupDao is the data access object for the table t_api_group.
|
||||
type TApiGroupDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TApiGroupColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TApiGroupColumns defines and stores column names for the table t_api_group.
|
||||
type TApiGroupColumns struct {
|
||||
Id string // 主键ID
|
||||
GroupName string // 权限组名称
|
||||
GroupCode string // 权限组编码
|
||||
Status string // 状态:0启用,1停用
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tApiGroupColumns holds the columns for the table t_api_group.
|
||||
var tApiGroupColumns = TApiGroupColumns{
|
||||
Id: "id",
|
||||
GroupName: "group_name",
|
||||
GroupCode: "group_code",
|
||||
Status: "status",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTApiGroupDao creates and returns a new DAO object for table data access.
|
||||
func NewTApiGroupDao(handlers ...gdb.ModelHandler) *TApiGroupDao {
|
||||
return &TApiGroupDao{
|
||||
group: "default",
|
||||
table: "t_api_group",
|
||||
columns: tApiGroupColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TApiGroupDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TApiGroupDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TApiGroupDao) Columns() TApiGroupColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TApiGroupDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TApiGroupDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TApiGroupDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TApiGroupResourceDao is the data access object for the table t_api_group_resource.
|
||||
type TApiGroupResourceDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TApiGroupResourceColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TApiGroupResourceColumns defines and stores column names for the table t_api_group_resource.
|
||||
type TApiGroupResourceColumns struct {
|
||||
GroupId string // 权限组ID,对应t_api_group.id
|
||||
ApiId string // 开放接口资源ID,对应t_api_resource.id
|
||||
}
|
||||
|
||||
// tApiGroupResourceColumns holds the columns for the table t_api_group_resource.
|
||||
var tApiGroupResourceColumns = TApiGroupResourceColumns{
|
||||
GroupId: "group_id",
|
||||
ApiId: "api_id",
|
||||
}
|
||||
|
||||
// NewTApiGroupResourceDao creates and returns a new DAO object for table data access.
|
||||
func NewTApiGroupResourceDao(handlers ...gdb.ModelHandler) *TApiGroupResourceDao {
|
||||
return &TApiGroupResourceDao{
|
||||
group: "default",
|
||||
table: "t_api_group_resource",
|
||||
columns: tApiGroupResourceColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TApiGroupResourceDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TApiGroupResourceDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TApiGroupResourceDao) Columns() TApiGroupResourceColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TApiGroupResourceDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TApiGroupResourceDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TApiGroupResourceDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TApiResourceDao is the data access object for the table t_api_resource.
|
||||
type TApiResourceDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TApiResourceColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TApiResourceColumns defines and stores column names for the table t_api_resource.
|
||||
type TApiResourceColumns struct {
|
||||
Id string // 主键ID
|
||||
ApiName string // 接口名称
|
||||
ApiCode string // 接口权限标识
|
||||
Method string // 请求方法:1:POST,2:PUT,3:DELETE,4:GET
|
||||
Path string // 接口路径
|
||||
Status string // 状态:0启用,1停用
|
||||
Version string // 接口版本
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tApiResourceColumns holds the columns for the table t_api_resource.
|
||||
var tApiResourceColumns = TApiResourceColumns{
|
||||
Id: "id",
|
||||
ApiName: "api_name",
|
||||
ApiCode: "api_code",
|
||||
Method: "method",
|
||||
Path: "path",
|
||||
Status: "status",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTApiResourceDao creates and returns a new DAO object for table data access.
|
||||
func NewTApiResourceDao(handlers ...gdb.ModelHandler) *TApiResourceDao {
|
||||
return &TApiResourceDao{
|
||||
group: "default",
|
||||
table: "t_api_resource",
|
||||
columns: tApiResourceColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TApiResourceDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TApiResourceDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TApiResourceDao) Columns() TApiResourceColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TApiResourceDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TApiResourceDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TApiResourceDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TBalanceDetailDao is the data access object for the table t_balance_detail.
|
||||
type TBalanceDetailDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TBalanceDetailColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TBalanceDetailColumns defines and stores column names for the table t_balance_detail.
|
||||
type TBalanceDetailColumns struct {
|
||||
Id string // 明细ID
|
||||
DeptId string // 账户ID
|
||||
SerialNo string // 流水号
|
||||
TransactionTime string // 交易时间
|
||||
IncomeExpenseType string // 收支类型: 0收入,1支出
|
||||
TransactionType string // 交易类型:0充值 1消费 2转可提现 3可提现转入 4人工调整
|
||||
TransactionChannel string // 交易渠道:1支付宝 2微信 3可提现金额
|
||||
TransactionStatus string // 交易状态:0待支付、1已支付、2已过期、3交易失败
|
||||
Amount string // 交易金额
|
||||
BeforeBalance string // 变动前余额
|
||||
BalanceAfter string // 变动后余额
|
||||
ChannelSerialNo string // 交易渠道流水号
|
||||
OrderSn string // 关联订单号
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tBalanceDetailColumns holds the columns for the table t_balance_detail.
|
||||
var tBalanceDetailColumns = TBalanceDetailColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
SerialNo: "serial_no",
|
||||
TransactionTime: "transaction_time",
|
||||
IncomeExpenseType: "income_expense_type",
|
||||
TransactionType: "transaction_type",
|
||||
TransactionChannel: "transaction_channel",
|
||||
TransactionStatus: "transaction_status",
|
||||
Amount: "amount",
|
||||
BeforeBalance: "before_balance",
|
||||
BalanceAfter: "balance_after",
|
||||
ChannelSerialNo: "channel_serial_no",
|
||||
OrderSn: "order_sn",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTBalanceDetailDao creates and returns a new DAO object for table data access.
|
||||
func NewTBalanceDetailDao(handlers ...gdb.ModelHandler) *TBalanceDetailDao {
|
||||
return &TBalanceDetailDao{
|
||||
group: "default",
|
||||
table: "t_balance_detail",
|
||||
columns: tBalanceDetailColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TBalanceDetailDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TBalanceDetailDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TBalanceDetailDao) Columns() TBalanceDetailColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TBalanceDetailDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TBalanceDetailDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TBalanceDetailDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TBrandDao is the data access object for the table t_brand.
|
||||
type TBrandDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TBrandColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TBrandColumns defines and stores column names for the table t_brand.
|
||||
type TBrandColumns struct {
|
||||
BrandId string // 自增id号
|
||||
BrandName string // 品牌名称
|
||||
BrandLogo string // 上传的该公司Logo图片
|
||||
BrandDesc string // 品牌描述
|
||||
SiteUrl string // 品牌的网址
|
||||
SortOrder string // 品牌在前台页面的显示顺序,数字越大越靠后
|
||||
IsShow string // 该品牌是否显示 枚举
|
||||
BrandType string // 品牌分类
|
||||
BrandIsHot string // 是否热销品牌 枚举:yesno_enum
|
||||
FirstWord string // 首字母
|
||||
BrandEnName string // 品牌英文名
|
||||
Status string // 状态 枚举sys_status
|
||||
TenantId string //
|
||||
CreatedDept string //
|
||||
CreatedBy string //
|
||||
CreatedAt string //
|
||||
UpdatedBy string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// tBrandColumns holds the columns for the table t_brand.
|
||||
var tBrandColumns = TBrandColumns{
|
||||
BrandId: "brand_id",
|
||||
BrandName: "brand_name",
|
||||
BrandLogo: "brand_logo",
|
||||
BrandDesc: "brand_desc",
|
||||
SiteUrl: "site_url",
|
||||
SortOrder: "sort_order",
|
||||
IsShow: "is_show",
|
||||
BrandType: "brand_type",
|
||||
BrandIsHot: "brand_is_hot",
|
||||
FirstWord: "first_word",
|
||||
BrandEnName: "brand_en_name",
|
||||
Status: "status",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTBrandDao creates and returns a new DAO object for table data access.
|
||||
func NewTBrandDao(handlers ...gdb.ModelHandler) *TBrandDao {
|
||||
return &TBrandDao{
|
||||
group: "default",
|
||||
table: "t_brand",
|
||||
columns: tBrandColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TBrandDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TBrandDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TBrandDao) Columns() TBrandColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TBrandDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TBrandDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TBrandDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TCategoryDao is the data access object for the table t_category.
|
||||
type TCategoryDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TCategoryColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TCategoryColumns defines and stores column names for the table t_category.
|
||||
type TCategoryColumns struct {
|
||||
CategoryId string // 分类ID
|
||||
CategoryName string // 分类名称
|
||||
ShortName string // 分类短名
|
||||
Level string // 层级深度:1-一级 2-二级 3-三级...
|
||||
Keywords string // 分类关键字(搜索用)
|
||||
SearchKeywords string // 搜索关键字
|
||||
CategoryDesc string // 分类描述
|
||||
ParentId string // 父分类ID(0=顶级分类)
|
||||
SortOrder string // 排序序号(数字越大越靠后)
|
||||
MeasureUnit string // 计量单位
|
||||
IsShow string // 是否前台显示 枚举
|
||||
IsHot string // 是否热门 枚举:yesno_enum
|
||||
SeoTitle string // SEO标题
|
||||
CategoryPic string // 分类图片
|
||||
CategoryIco string // 分类图标
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tCategoryColumns holds the columns for the table t_category.
|
||||
var tCategoryColumns = TCategoryColumns{
|
||||
CategoryId: "category_id",
|
||||
CategoryName: "category_name",
|
||||
ShortName: "short_name",
|
||||
Level: "level",
|
||||
Keywords: "keywords",
|
||||
SearchKeywords: "search_keywords",
|
||||
CategoryDesc: "category_desc",
|
||||
ParentId: "parent_id",
|
||||
SortOrder: "sort_order",
|
||||
MeasureUnit: "measure_unit",
|
||||
IsShow: "is_show",
|
||||
IsHot: "is_hot",
|
||||
SeoTitle: "seo_title",
|
||||
CategoryPic: "category_pic",
|
||||
CategoryIco: "category_ico",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTCategoryDao creates and returns a new DAO object for table data access.
|
||||
func NewTCategoryDao(handlers ...gdb.ModelHandler) *TCategoryDao {
|
||||
return &TCategoryDao{
|
||||
group: "default",
|
||||
table: "t_category",
|
||||
columns: tCategoryColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TCategoryDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TCategoryDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TCategoryDao) Columns() TCategoryColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TCategoryDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TCategoryDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TCategoryDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TConsumeAccountMonthBillDao is the data access object for the table t_consume_account_month_bill.
|
||||
type TConsumeAccountMonthBillDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TConsumeAccountMonthBillColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillColumns defines and stores column names for the table t_consume_account_month_bill.
|
||||
type TConsumeAccountMonthBillColumns struct {
|
||||
Id string // 账单ID
|
||||
DeptId string // 机构ID
|
||||
AccountPeriod string // 账期YYYY-MM
|
||||
OpeningBalance string // 月初余额
|
||||
RechargeIncome string // 充值收入
|
||||
WithdrawableTransferInIncome string // 可提现转入收入
|
||||
ManualAdjustIncome string // 人工调账收入
|
||||
RefundIncome string // 退款收入
|
||||
ConsumeExpense string // 平台消费支出
|
||||
BalanceTransferOutExpense string // 转可提现支出
|
||||
ManualAdjustExpense string // 人工调账支出
|
||||
ConsumeCreditRepayExpense string // 消费账户还款支出
|
||||
TotalIncome string // 本月收入总额
|
||||
TotalExpense string // 本月支出总额
|
||||
ClosingBalance string // 月末余额(月初余额+本月收入-本月支出)
|
||||
IncomeCount string // 收入笔数
|
||||
ExpenseCount string // 支出笔数
|
||||
CreditUsed string // 本月使用信用额度
|
||||
CreditRepaid string // 本月还款信用额度
|
||||
BillStatus string // 账单状态:1正常,2已调整,3已作废
|
||||
SettleTime string // 结算时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tConsumeAccountMonthBillColumns holds the columns for the table t_consume_account_month_bill.
|
||||
var tConsumeAccountMonthBillColumns = TConsumeAccountMonthBillColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
AccountPeriod: "account_period",
|
||||
OpeningBalance: "opening_balance",
|
||||
RechargeIncome: "recharge_income",
|
||||
WithdrawableTransferInIncome: "withdrawable_transfer_in_income",
|
||||
ManualAdjustIncome: "manual_adjust_income",
|
||||
RefundIncome: "refund_income",
|
||||
ConsumeExpense: "consume_expense",
|
||||
BalanceTransferOutExpense: "balance_transfer_out_expense",
|
||||
ManualAdjustExpense: "manual_adjust_expense",
|
||||
ConsumeCreditRepayExpense: "consume_credit_repay_expense",
|
||||
TotalIncome: "total_income",
|
||||
TotalExpense: "total_expense",
|
||||
ClosingBalance: "closing_balance",
|
||||
IncomeCount: "income_count",
|
||||
ExpenseCount: "expense_count",
|
||||
CreditUsed: "credit_used",
|
||||
CreditRepaid: "credit_repaid",
|
||||
BillStatus: "bill_status",
|
||||
SettleTime: "settle_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTConsumeAccountMonthBillDao creates and returns a new DAO object for table data access.
|
||||
func NewTConsumeAccountMonthBillDao(handlers ...gdb.ModelHandler) *TConsumeAccountMonthBillDao {
|
||||
return &TConsumeAccountMonthBillDao{
|
||||
group: "default",
|
||||
table: "t_consume_account_month_bill",
|
||||
columns: tConsumeAccountMonthBillColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TConsumeAccountMonthBillDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TConsumeAccountMonthBillDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TConsumeAccountMonthBillDao) Columns() TConsumeAccountMonthBillColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TConsumeAccountMonthBillDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TConsumeAccountMonthBillDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TConsumeAccountMonthBillDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TCreditDetailDao is the data access object for the table t_credit_detail.
|
||||
type TCreditDetailDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TCreditDetailColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TCreditDetailColumns defines and stores column names for the table t_credit_detail.
|
||||
type TCreditDetailColumns struct {
|
||||
Id string // 明细ID
|
||||
DeptId string // 组织机构ID
|
||||
AccountPeriod string // 账期(YYYY-MM)
|
||||
TransactionType string // 交易类型: 使用/还款
|
||||
Amount string // 金额
|
||||
CreditBalanceBefore string // 变动前信用额度余额
|
||||
CreditBalanceAfter string // 变动后信用额度余额
|
||||
RelatedOrderSn string // 关联订单号
|
||||
RepaymentMethod string // 还款方式: 0 余额 1 银行卡 2 支付宝 3 微信
|
||||
RepaymentChannelSerial string // 交易渠道流水号
|
||||
TransactionTime string // 交易时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tCreditDetailColumns holds the columns for the table t_credit_detail.
|
||||
var tCreditDetailColumns = TCreditDetailColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
AccountPeriod: "account_period",
|
||||
TransactionType: "transaction_type",
|
||||
Amount: "amount",
|
||||
CreditBalanceBefore: "credit_balance_before",
|
||||
CreditBalanceAfter: "credit_balance_after",
|
||||
RelatedOrderSn: "related_order_sn",
|
||||
RepaymentMethod: "repayment_method",
|
||||
RepaymentChannelSerial: "repayment_channel_serial",
|
||||
TransactionTime: "transaction_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTCreditDetailDao creates and returns a new DAO object for table data access.
|
||||
func NewTCreditDetailDao(handlers ...gdb.ModelHandler) *TCreditDetailDao {
|
||||
return &TCreditDetailDao{
|
||||
group: "default",
|
||||
table: "t_credit_detail",
|
||||
columns: tCreditDetailColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TCreditDetailDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TCreditDetailDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TCreditDetailDao) Columns() TCreditDetailColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TCreditDetailDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TCreditDetailDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TCreditDetailDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TCustWithdrawAccountDao is the data access object for the table t_cust_withdraw_account.
|
||||
type TCustWithdrawAccountDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TCustWithdrawAccountColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TCustWithdrawAccountColumns defines and stores column names for the table t_cust_withdraw_account.
|
||||
type TCustWithdrawAccountColumns struct {
|
||||
Id string // 主键ID
|
||||
DeptId string // 企业客户ID
|
||||
AccountType string // 提现账号类型,1:支付宝,2:微信
|
||||
AccountNo string // 账号
|
||||
AccountName string // 账户名称/真实姓名
|
||||
Mobile string // 手机号
|
||||
IsDefault string // 是否默认账号:0-否 1-是
|
||||
Enabled string // 是否启用:0-未启用 1-启用
|
||||
Status string // 状态:0-禁用 1-正常
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tCustWithdrawAccountColumns holds the columns for the table t_cust_withdraw_account.
|
||||
var tCustWithdrawAccountColumns = TCustWithdrawAccountColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
AccountType: "account_type",
|
||||
AccountNo: "account_no",
|
||||
AccountName: "account_name",
|
||||
Mobile: "mobile",
|
||||
IsDefault: "is_default",
|
||||
Enabled: "enabled",
|
||||
Status: "status",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTCustWithdrawAccountDao creates and returns a new DAO object for table data access.
|
||||
func NewTCustWithdrawAccountDao(handlers ...gdb.ModelHandler) *TCustWithdrawAccountDao {
|
||||
return &TCustWithdrawAccountDao{
|
||||
group: "default",
|
||||
table: "t_cust_withdraw_account",
|
||||
columns: tCustWithdrawAccountColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TCustWithdrawAccountDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TCustWithdrawAccountDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TCustWithdrawAccountDao) Columns() TCustWithdrawAccountColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TCustWithdrawAccountDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TCustWithdrawAccountDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TCustWithdrawAccountDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TDeptFlowDailyDao is the data access object for the table t_dept_flow_daily.
|
||||
type TDeptFlowDailyDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TDeptFlowDailyColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TDeptFlowDailyColumns defines and stores column names for the table t_dept_flow_daily.
|
||||
type TDeptFlowDailyColumns struct {
|
||||
Id string // 自增主键
|
||||
DeptId string // 渠道客户ID
|
||||
StatDate string // 统计日期
|
||||
TotalUsedFlowMb string // 当日所有卡总消耗流量GB
|
||||
TotalSms string // 当日总短信使用条数
|
||||
TotalVoiceMin string // 当日总语音分钟数
|
||||
Remark string // 备注,同步失败原因/特殊说明
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tDeptFlowDailyColumns holds the columns for the table t_dept_flow_daily.
|
||||
var tDeptFlowDailyColumns = TDeptFlowDailyColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
StatDate: "stat_date",
|
||||
TotalUsedFlowMb: "total_used_flow_mb",
|
||||
TotalSms: "total_sms",
|
||||
TotalVoiceMin: "total_voice_min",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTDeptFlowDailyDao creates and returns a new DAO object for table data access.
|
||||
func NewTDeptFlowDailyDao(handlers ...gdb.ModelHandler) *TDeptFlowDailyDao {
|
||||
return &TDeptFlowDailyDao{
|
||||
group: "default",
|
||||
table: "t_dept_flow_daily",
|
||||
columns: tDeptFlowDailyColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TDeptFlowDailyDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TDeptFlowDailyDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TDeptFlowDailyDao) Columns() TDeptFlowDailyColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TDeptFlowDailyDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TDeptFlowDailyDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TDeptFlowDailyDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TDivisionCodeDao is the data access object for the table t_division_code.
|
||||
type TDivisionCodeDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TDivisionCodeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TDivisionCodeColumns defines and stores column names for the table t_division_code.
|
||||
type TDivisionCodeColumns struct {
|
||||
RegionId string // ID
|
||||
RegionCode string // 行政区域代码
|
||||
RegionName string // 行政区域名称
|
||||
RegionLevel string // 等级
|
||||
RegionParent string // 上级代码
|
||||
RegionType string // 城乡分类代码
|
||||
}
|
||||
|
||||
// tDivisionCodeColumns holds the columns for the table t_division_code.
|
||||
var tDivisionCodeColumns = TDivisionCodeColumns{
|
||||
RegionId: "region_id",
|
||||
RegionCode: "region_code",
|
||||
RegionName: "region_name",
|
||||
RegionLevel: "region_level",
|
||||
RegionParent: "region_parent",
|
||||
RegionType: "region_type",
|
||||
}
|
||||
|
||||
// NewTDivisionCodeDao creates and returns a new DAO object for table data access.
|
||||
func NewTDivisionCodeDao(handlers ...gdb.ModelHandler) *TDivisionCodeDao {
|
||||
return &TDivisionCodeDao{
|
||||
group: "default",
|
||||
table: "t_division_code",
|
||||
columns: tDivisionCodeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TDivisionCodeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TDivisionCodeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TDivisionCodeDao) Columns() TDivisionCodeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TDivisionCodeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TDivisionCodeDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TDivisionCodeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TFinCommissionDetailDao is the data access object for the table t_fin_commission_detail.
|
||||
type TFinCommissionDetailDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TFinCommissionDetailColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TFinCommissionDetailColumns defines and stores column names for the table t_fin_commission_detail.
|
||||
type TFinCommissionDetailColumns struct {
|
||||
Id string // 主键ID
|
||||
CommissionNo string // 分润明细编号
|
||||
OrderSn string // 订单编号
|
||||
OrderType string // 订单类型
|
||||
ProductId string // 商品ID
|
||||
PayerDeptId string // 下级机构ID
|
||||
BenefitDeptId string // 受益机构ID
|
||||
BenefitDeptLevel string // 受益机构层级
|
||||
CommissionAmount string // 分润金额
|
||||
CommissionStatus string // 分润状态:0待结算,1可提现
|
||||
BenefitSnapshot string // 价格快照(受益机构的成本价+利润+利润悉数=出货单价)
|
||||
AccountPeriod string // 账期(YYYY-MM)
|
||||
SettlementTime string // 结算时间
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tFinCommissionDetailColumns holds the columns for the table t_fin_commission_detail.
|
||||
var tFinCommissionDetailColumns = TFinCommissionDetailColumns{
|
||||
Id: "id",
|
||||
CommissionNo: "commission_no",
|
||||
OrderSn: "order_sn",
|
||||
OrderType: "order_type",
|
||||
ProductId: "product_id",
|
||||
PayerDeptId: "payer_dept_id",
|
||||
BenefitDeptId: "benefit_dept_id",
|
||||
BenefitDeptLevel: "benefit_dept_level",
|
||||
CommissionAmount: "commission_amount",
|
||||
CommissionStatus: "commission_status",
|
||||
BenefitSnapshot: "benefit_snapshot",
|
||||
AccountPeriod: "account_period",
|
||||
SettlementTime: "settlement_time",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTFinCommissionDetailDao creates and returns a new DAO object for table data access.
|
||||
func NewTFinCommissionDetailDao(handlers ...gdb.ModelHandler) *TFinCommissionDetailDao {
|
||||
return &TFinCommissionDetailDao{
|
||||
group: "default",
|
||||
table: "t_fin_commission_detail",
|
||||
columns: tFinCommissionDetailColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TFinCommissionDetailDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TFinCommissionDetailDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TFinCommissionDetailDao) Columns() TFinCommissionDetailColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TFinCommissionDetailDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TFinCommissionDetailDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TFinCommissionDetailDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TFinWithdrawableChangeDao is the data access object for the table t_fin_withdrawable_change.
|
||||
type TFinWithdrawableChangeDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TFinWithdrawableChangeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TFinWithdrawableChangeColumns defines and stores column names for the table t_fin_withdrawable_change.
|
||||
type TFinWithdrawableChangeColumns struct {
|
||||
Id string // 主键ID
|
||||
DeptId string // 机构ID
|
||||
ChangeType string // 变动类型:0分润,1提现,2转出(可提现转余额)3转入(余额转可提现)4还款
|
||||
IncomeExpenseType string // 收支类型: 0收入,1支出
|
||||
ChangeAmount string // 变动金额
|
||||
BeforeBalance string // 变动前可提现余额
|
||||
AfterBalance string // 变动后可提现余额
|
||||
AccountType string // 提现账号类型,1:银行卡,2:支付宝,3:微信
|
||||
BankName string // 开户行名称
|
||||
BankAccount string // 开户行账号或账号
|
||||
AccountName string // 用户姓名
|
||||
IdentityCard string // 用户身份证号
|
||||
SourceNo string // 来源单号
|
||||
Remark string // 备注
|
||||
AccountPeriod string // 账期(YYYY-MM)
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tFinWithdrawableChangeColumns holds the columns for the table t_fin_withdrawable_change.
|
||||
var tFinWithdrawableChangeColumns = TFinWithdrawableChangeColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
ChangeType: "change_type",
|
||||
IncomeExpenseType: "income_expense_type",
|
||||
ChangeAmount: "change_amount",
|
||||
BeforeBalance: "before_balance",
|
||||
AfterBalance: "after_balance",
|
||||
AccountType: "account_type",
|
||||
BankName: "bank_name",
|
||||
BankAccount: "bank_account",
|
||||
AccountName: "account_name",
|
||||
IdentityCard: "identity_card",
|
||||
SourceNo: "source_no",
|
||||
Remark: "remark",
|
||||
AccountPeriod: "account_period",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTFinWithdrawableChangeDao creates and returns a new DAO object for table data access.
|
||||
func NewTFinWithdrawableChangeDao(handlers ...gdb.ModelHandler) *TFinWithdrawableChangeDao {
|
||||
return &TFinWithdrawableChangeDao{
|
||||
group: "default",
|
||||
table: "t_fin_withdrawable_change",
|
||||
columns: tFinWithdrawableChangeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TFinWithdrawableChangeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TFinWithdrawableChangeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TFinWithdrawableChangeDao) Columns() TFinWithdrawableChangeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TFinWithdrawableChangeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TFinWithdrawableChangeDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TFinWithdrawableChangeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TFinanceApplyDao is the data access object for the table t_finance_apply.
|
||||
type TFinanceApplyDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TFinanceApplyColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TFinanceApplyColumns defines and stores column names for the table t_finance_apply.
|
||||
type TFinanceApplyColumns struct {
|
||||
Id string // 主键ID
|
||||
ApplyNo string // 申请单号
|
||||
ApplyType string // 申请类型(1:提现申请,2:余额转提现)
|
||||
AuditType string // 审核类型:1初审,2复审
|
||||
ApplyDeptId string // 申请机构ID
|
||||
AuditDeptId string // 审核方机构ID,通常为直属上级或顶级
|
||||
AvailableAmountSnapshot string // 申请前可提现余额快照
|
||||
ApplyAmount string // 申请金额
|
||||
AccountType string // 提现账号类型,1:银行卡,2:支付宝,3:微信
|
||||
BankName string // 开户行名称
|
||||
BankAccount string // 开户行账号或账号
|
||||
AccountName string // 用户姓名
|
||||
IdentityCard string // 用户身份证号
|
||||
ReceiveAccount string // 收款账户信息快照
|
||||
ApplyStatus string // 状态:0待审核,1已通过,2已驳回,3已打款,4已取消
|
||||
ApplyTime string // 申请时间
|
||||
AuditTime string // 最近审核时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tFinanceApplyColumns holds the columns for the table t_finance_apply.
|
||||
var tFinanceApplyColumns = TFinanceApplyColumns{
|
||||
Id: "id",
|
||||
ApplyNo: "apply_no",
|
||||
ApplyType: "apply_type",
|
||||
AuditType: "audit_type",
|
||||
ApplyDeptId: "apply_dept_id",
|
||||
AuditDeptId: "audit_dept_id",
|
||||
AvailableAmountSnapshot: "available_amount_snapshot",
|
||||
ApplyAmount: "apply_amount",
|
||||
AccountType: "account_type",
|
||||
BankName: "bank_name",
|
||||
BankAccount: "bank_account",
|
||||
AccountName: "account_name",
|
||||
IdentityCard: "identity_card",
|
||||
ReceiveAccount: "receive_account",
|
||||
ApplyStatus: "apply_status",
|
||||
ApplyTime: "apply_time",
|
||||
AuditTime: "audit_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTFinanceApplyDao creates and returns a new DAO object for table data access.
|
||||
func NewTFinanceApplyDao(handlers ...gdb.ModelHandler) *TFinanceApplyDao {
|
||||
return &TFinanceApplyDao{
|
||||
group: "default",
|
||||
table: "t_finance_apply",
|
||||
columns: tFinanceApplyColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TFinanceApplyDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TFinanceApplyDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TFinanceApplyDao) Columns() TFinanceApplyColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TFinanceApplyDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TFinanceApplyDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TFinanceApplyDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TFinanceAuditRecordDao is the data access object for the table t_finance_audit_record.
|
||||
type TFinanceAuditRecordDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TFinanceAuditRecordColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TFinanceAuditRecordColumns defines and stores column names for the table t_finance_audit_record.
|
||||
type TFinanceAuditRecordColumns struct {
|
||||
Id string // 主键ID
|
||||
AuditNo string // 审核记录编号
|
||||
ApplyNo string // 申请单号
|
||||
AuditDeptId string // 审核方机构ID
|
||||
AuditorUserId string // 审核人ID
|
||||
AuditResult string // 审核结果:0通过,1驳回
|
||||
AuditOpinion string // 审核意见
|
||||
AuditTime string // 审核时间
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tFinanceAuditRecordColumns holds the columns for the table t_finance_audit_record.
|
||||
var tFinanceAuditRecordColumns = TFinanceAuditRecordColumns{
|
||||
Id: "id",
|
||||
AuditNo: "audit_no",
|
||||
ApplyNo: "apply_no",
|
||||
AuditDeptId: "audit_dept_id",
|
||||
AuditorUserId: "auditor_user_id",
|
||||
AuditResult: "audit_result",
|
||||
AuditOpinion: "audit_opinion",
|
||||
AuditTime: "audit_time",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTFinanceAuditRecordDao creates and returns a new DAO object for table data access.
|
||||
func NewTFinanceAuditRecordDao(handlers ...gdb.ModelHandler) *TFinanceAuditRecordDao {
|
||||
return &TFinanceAuditRecordDao{
|
||||
group: "default",
|
||||
table: "t_finance_audit_record",
|
||||
columns: tFinanceAuditRecordColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TFinanceAuditRecordDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TFinanceAuditRecordDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TFinanceAuditRecordDao) Columns() TFinanceAuditRecordColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TFinanceAuditRecordDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TFinanceAuditRecordDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TFinanceAuditRecordDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TFlowPackageConfigDao is the data access object for the table t_flow_package_config.
|
||||
type TFlowPackageConfigDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TFlowPackageConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TFlowPackageConfigColumns defines and stores column names for the table t_flow_package_config.
|
||||
type TFlowPackageConfigColumns struct {
|
||||
Id string // 主键ID
|
||||
PoolPackageCode string // 池编码
|
||||
PackageCodes string // 套餐编码列表
|
||||
TopupPackageCodes string // 可订购加油包套餐编码列表
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tFlowPackageConfigColumns holds the columns for the table t_flow_package_config.
|
||||
var tFlowPackageConfigColumns = TFlowPackageConfigColumns{
|
||||
Id: "id",
|
||||
PoolPackageCode: "pool_package_code",
|
||||
PackageCodes: "package_codes",
|
||||
TopupPackageCodes: "topup_package_codes",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTFlowPackageConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewTFlowPackageConfigDao(handlers ...gdb.ModelHandler) *TFlowPackageConfigDao {
|
||||
return &TFlowPackageConfigDao{
|
||||
group: "default",
|
||||
table: "t_flow_package_config",
|
||||
columns: tFlowPackageConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TFlowPackageConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TFlowPackageConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TFlowPackageConfigDao) Columns() TFlowPackageConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TFlowPackageConfigDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TFlowPackageConfigDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TFlowPackageConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TMessageLogDao is the data access object for the table t_message_log.
|
||||
type TMessageLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TMessageLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TMessageLogColumns defines and stores column names for the table t_message_log.
|
||||
type TMessageLogColumns struct {
|
||||
MessageLogId string // 主键ID
|
||||
MessageType string // 消息类型 1系统通知 2活动通知 3订单通知 4账户通知
|
||||
SendUserType string // 发送用户类型 1代理商 2终端用户
|
||||
UserIds string // 接收用户ID集合(JSON数组)
|
||||
MessageTitle string // 消息标题
|
||||
MessageContent string // 消息内容
|
||||
MessageLink string // 跳转链接地址
|
||||
SendTime string // 发送时间
|
||||
IsRecall string // 是否撤回 0未撤回 1已撤回
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tMessageLogColumns holds the columns for the table t_message_log.
|
||||
var tMessageLogColumns = TMessageLogColumns{
|
||||
MessageLogId: "message_log_id",
|
||||
MessageType: "message_type",
|
||||
SendUserType: "send_user_type",
|
||||
UserIds: "user_ids",
|
||||
MessageTitle: "message_title",
|
||||
MessageContent: "message_content",
|
||||
MessageLink: "message_link",
|
||||
SendTime: "send_time",
|
||||
IsRecall: "is_recall",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTMessageLogDao creates and returns a new DAO object for table data access.
|
||||
func NewTMessageLogDao(handlers ...gdb.ModelHandler) *TMessageLogDao {
|
||||
return &TMessageLogDao{
|
||||
group: "default",
|
||||
table: "t_message_log",
|
||||
columns: tMessageLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TMessageLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TMessageLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TMessageLogDao) Columns() TMessageLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TMessageLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TMessageLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TMessageLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TMessageTypeDao is the data access object for the table t_message_type.
|
||||
type TMessageTypeDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TMessageTypeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TMessageTypeColumns defines and stores column names for the table t_message_type.
|
||||
type TMessageTypeColumns struct {
|
||||
MessageId string // 主键ID
|
||||
Name string // 通知类型
|
||||
Describe string // 通知描述
|
||||
SendType string // 发送类型 1代理商 2终端
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tMessageTypeColumns holds the columns for the table t_message_type.
|
||||
var tMessageTypeColumns = TMessageTypeColumns{
|
||||
MessageId: "message_id",
|
||||
Name: "name",
|
||||
Describe: "describe",
|
||||
SendType: "send_type",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTMessageTypeDao creates and returns a new DAO object for table data access.
|
||||
func NewTMessageTypeDao(handlers ...gdb.ModelHandler) *TMessageTypeDao {
|
||||
return &TMessageTypeDao{
|
||||
group: "default",
|
||||
table: "t_message_type",
|
||||
columns: tMessageTypeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TMessageTypeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TMessageTypeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TMessageTypeDao) Columns() TMessageTypeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TMessageTypeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TMessageTypeDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TMessageTypeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TNotifyLogDao is the data access object for the table t_notify_log.
|
||||
type TNotifyLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TNotifyLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TNotifyLogColumns defines and stores column names for the table t_notify_log.
|
||||
type TNotifyLogColumns struct {
|
||||
NotifyId string // 主键ID
|
||||
NotifyTitle string // 标题
|
||||
NotifyContent string // 内容
|
||||
SendUserType string // 发送用户类型 1代理商 2终端用户
|
||||
SendTime string // 发送时间
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tNotifyLogColumns holds the columns for the table t_notify_log.
|
||||
var tNotifyLogColumns = TNotifyLogColumns{
|
||||
NotifyId: "notify_id",
|
||||
NotifyTitle: "notify_title",
|
||||
NotifyContent: "notify_content",
|
||||
SendUserType: "send_user_type",
|
||||
SendTime: "send_time",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTNotifyLogDao creates and returns a new DAO object for table data access.
|
||||
func NewTNotifyLogDao(handlers ...gdb.ModelHandler) *TNotifyLogDao {
|
||||
return &TNotifyLogDao{
|
||||
group: "default",
|
||||
table: "t_notify_log",
|
||||
columns: tNotifyLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TNotifyLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TNotifyLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TNotifyLogDao) Columns() TNotifyLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TNotifyLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TNotifyLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TNotifyLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TOrderDao is the data access object for the table t_order.
|
||||
type TOrderDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TOrderColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TOrderColumns defines and stores column names for the table t_order.
|
||||
type TOrderColumns struct {
|
||||
Id string // 主键ID
|
||||
OrderSn string // 订单编号
|
||||
ParentOrderId string // 父订单ID
|
||||
ParentOrderSn string // 父订单编号
|
||||
CustomerType string // 客户类型 枚举
|
||||
CustomerAgentId string // 渠道编号(购买方)
|
||||
EndUserId string // 终端客户编号
|
||||
AgentId string // 渠道编号(销售方)
|
||||
OrderType string // 订单类型 枚举
|
||||
OrderStatus string // 订单状态 枚举
|
||||
ShippingStatus string // 配送状态 枚举
|
||||
ReturnStatus string // 退货状态 枚举
|
||||
Consignee string // 收货人姓名
|
||||
Mobile string // 收货人手机
|
||||
Email string // 收货人邮箱
|
||||
Address string // 详细地址
|
||||
AreaCode string // 行政区域代码
|
||||
BuyerNote string // 买家备注
|
||||
AdminNote string // 商家备注
|
||||
Remark string // 系统备注
|
||||
ShippingMethod string // 发货方式 枚举
|
||||
LogisticsId string // 快递公司ID
|
||||
LogisticsName string // 物流公司名称
|
||||
ShippingTypeId string // 配送类型ID
|
||||
ShippingTypeName string // 配送类型名称
|
||||
TrackingNo string // 物流单号
|
||||
ShippingTime string // 发货时间
|
||||
ReceivedTime string // 收货时间
|
||||
PayType string // 支付类型 枚举
|
||||
PayStatus string // 支付状态 枚举
|
||||
PayOrderSn string // 支付订单编号
|
||||
PayTime string // 支付时间
|
||||
TotalAmount string // 订单总金额
|
||||
ProductAmount string // 商品总金额
|
||||
ShippingFee string // 运费金额
|
||||
ServiceFee string // 服务费金额
|
||||
InvoiceFee string // 发票费金额
|
||||
CouponAmount string // 优惠券抵扣金额
|
||||
DiscountAmount string // 活动优惠金额
|
||||
Balance string // 余额抵扣金额
|
||||
PaidAmount string // 已支付总金额
|
||||
OnlinePaidAmount string // 线上支付金额
|
||||
OfflinePaidAmount string // 线下支付金额
|
||||
UnpaidAmount string // 未支付金额
|
||||
UnrefundAmount string // 未退款金额
|
||||
IsNeedCommission string // 是否需要分佣 枚举:yesno_enum
|
||||
DistributionStatus string // 分销分成状态 枚举
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tOrderColumns holds the columns for the table t_order.
|
||||
var tOrderColumns = TOrderColumns{
|
||||
Id: "id",
|
||||
OrderSn: "order_sn",
|
||||
ParentOrderId: "parent_order_id",
|
||||
ParentOrderSn: "parent_order_sn",
|
||||
CustomerType: "customer_type",
|
||||
CustomerAgentId: "customer_agent_id",
|
||||
EndUserId: "end_user_id",
|
||||
AgentId: "agent_id",
|
||||
OrderType: "order_type",
|
||||
OrderStatus: "order_status",
|
||||
ShippingStatus: "shipping_status",
|
||||
ReturnStatus: "return_status",
|
||||
Consignee: "consignee",
|
||||
Mobile: "mobile",
|
||||
Email: "email",
|
||||
Address: "address",
|
||||
AreaCode: "area_code",
|
||||
BuyerNote: "buyer_note",
|
||||
AdminNote: "admin_note",
|
||||
Remark: "remark",
|
||||
ShippingMethod: "shipping_method",
|
||||
LogisticsId: "logistics_id",
|
||||
LogisticsName: "logistics_name",
|
||||
ShippingTypeId: "shipping_type_id",
|
||||
ShippingTypeName: "shipping_type_name",
|
||||
TrackingNo: "tracking_no",
|
||||
ShippingTime: "shipping_time",
|
||||
ReceivedTime: "received_time",
|
||||
PayType: "pay_type",
|
||||
PayStatus: "pay_status",
|
||||
PayOrderSn: "pay_order_sn",
|
||||
PayTime: "pay_time",
|
||||
TotalAmount: "total_amount",
|
||||
ProductAmount: "product_amount",
|
||||
ShippingFee: "shipping_fee",
|
||||
ServiceFee: "service_fee",
|
||||
InvoiceFee: "invoice_fee",
|
||||
CouponAmount: "coupon_amount",
|
||||
DiscountAmount: "discount_amount",
|
||||
Balance: "balance",
|
||||
PaidAmount: "paid_amount",
|
||||
OnlinePaidAmount: "online_paid_amount",
|
||||
OfflinePaidAmount: "offline_paid_amount",
|
||||
UnpaidAmount: "unpaid_amount",
|
||||
UnrefundAmount: "unrefund_amount",
|
||||
IsNeedCommission: "is_need_commission",
|
||||
DistributionStatus: "distribution_status",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTOrderDao creates and returns a new DAO object for table data access.
|
||||
func NewTOrderDao(handlers ...gdb.ModelHandler) *TOrderDao {
|
||||
return &TOrderDao{
|
||||
group: "default",
|
||||
table: "t_order",
|
||||
columns: tOrderColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TOrderDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TOrderDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TOrderDao) Columns() TOrderColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TOrderDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TOrderDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TOrderItemDao is the data access object for the table t_order_item.
|
||||
type TOrderItemDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TOrderItemColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TOrderItemColumns defines and stores column names for the table t_order_item.
|
||||
type TOrderItemColumns struct {
|
||||
ItemId string // 订单商品信息自增id
|
||||
OrderId string // 订单ID
|
||||
OrderSn string // 订单编号
|
||||
CustomerType string // 客户类型 枚举
|
||||
CustomerAgentId string // 渠道编号(购买方)
|
||||
EndUserId string // 客户编号
|
||||
Price string // 商品最终单价
|
||||
Quantity string // 商品的购买数量
|
||||
ProductId string // 商品ID
|
||||
ProductName string // 商品的名称
|
||||
ProductSn string // 商品的唯一货号
|
||||
PicThumb string // 商品缩略图
|
||||
SkuId string // 规格ID
|
||||
SkuData string // 【JSON】sku信息[{sku_id,sku_value,sku_name}]
|
||||
DeliveryQuantity string // 发货数量
|
||||
ProductType string // 商品类型 枚举
|
||||
IsGift string // 是否为赠品 枚举:yesno_enum
|
||||
AgentId string // 渠道编号(销售方)
|
||||
PrepayPrice string // 预售价格
|
||||
Commission string // 佣金数据
|
||||
OriginPrice string // 商品初始价格
|
||||
PromotionData string // 优惠信息
|
||||
ExtraSkuData string // 附加属性
|
||||
PayMode string // 付费方式 枚举
|
||||
ServiceBeginTime string // 服务开始时间
|
||||
ServiceEndTime string // 服务结束时间
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tOrderItemColumns holds the columns for the table t_order_item.
|
||||
var tOrderItemColumns = TOrderItemColumns{
|
||||
ItemId: "item_id",
|
||||
OrderId: "order_id",
|
||||
OrderSn: "order_sn",
|
||||
CustomerType: "customer_type",
|
||||
CustomerAgentId: "customer_agent_id",
|
||||
EndUserId: "end_user_id",
|
||||
Price: "price",
|
||||
Quantity: "quantity",
|
||||
ProductId: "product_id",
|
||||
ProductName: "product_name",
|
||||
ProductSn: "product_sn",
|
||||
PicThumb: "pic_thumb",
|
||||
SkuId: "sku_id",
|
||||
SkuData: "sku_data",
|
||||
DeliveryQuantity: "delivery_quantity",
|
||||
ProductType: "product_type",
|
||||
IsGift: "is_gift",
|
||||
AgentId: "agent_id",
|
||||
PrepayPrice: "prepay_price",
|
||||
Commission: "commission",
|
||||
OriginPrice: "origin_price",
|
||||
PromotionData: "promotion_data",
|
||||
ExtraSkuData: "extra_sku_data",
|
||||
PayMode: "pay_mode",
|
||||
ServiceBeginTime: "service_begin_time",
|
||||
ServiceEndTime: "service_end_time",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTOrderItemDao creates and returns a new DAO object for table data access.
|
||||
func NewTOrderItemDao(handlers ...gdb.ModelHandler) *TOrderItemDao {
|
||||
return &TOrderItemDao{
|
||||
group: "default",
|
||||
table: "t_order_item",
|
||||
columns: tOrderItemColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TOrderItemDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TOrderItemDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TOrderItemDao) Columns() TOrderItemColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TOrderItemDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TOrderItemDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TOrderItemDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TPackageApplyDao is the data access object for the table t_package_apply.
|
||||
type TPackageApplyDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TPackageApplyColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TPackageApplyColumns defines and stores column names for the table t_package_apply.
|
||||
type TPackageApplyColumns struct {
|
||||
Id string // 主键ID
|
||||
BatchNo string // 批次编号
|
||||
ApplyNo string // 申请单号
|
||||
ApplyType string // 申请类型(1:变更,2:退订)
|
||||
AuditType string // 审核类型:1初审,2复审
|
||||
ApplyDeptId string // 申请机构ID
|
||||
AuditDeptId string // 审核方机构ID,通常为直属上级或顶级
|
||||
ApplyPackageId string // 申请前套餐ID
|
||||
ChangePackageId string // 变更套餐ID
|
||||
DurationMonths string // 套餐时长(月)
|
||||
PackageEffectiveType string // 生效方式:1:立即生效,2:到期生效
|
||||
PackageEffectiveTime string // 生效时间
|
||||
ApplyStatus string // 状态:0待审核,1已通过,2已驳回,3已打款,4已取消
|
||||
ApplyTime string // 申请时间
|
||||
AuditTime string // 最近审核时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tPackageApplyColumns holds the columns for the table t_package_apply.
|
||||
var tPackageApplyColumns = TPackageApplyColumns{
|
||||
Id: "id",
|
||||
BatchNo: "batch_no",
|
||||
ApplyNo: "apply_no",
|
||||
ApplyType: "apply_type",
|
||||
AuditType: "audit_type",
|
||||
ApplyDeptId: "apply_dept_id",
|
||||
AuditDeptId: "audit_dept_id",
|
||||
ApplyPackageId: "apply_package_id",
|
||||
ChangePackageId: "change_package_id",
|
||||
DurationMonths: "duration_months",
|
||||
PackageEffectiveType: "package_effective_type",
|
||||
PackageEffectiveTime: "package_effective_time",
|
||||
ApplyStatus: "apply_status",
|
||||
ApplyTime: "apply_time",
|
||||
AuditTime: "audit_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTPackageApplyDao creates and returns a new DAO object for table data access.
|
||||
func NewTPackageApplyDao(handlers ...gdb.ModelHandler) *TPackageApplyDao {
|
||||
return &TPackageApplyDao{
|
||||
group: "default",
|
||||
table: "t_package_apply",
|
||||
columns: tPackageApplyColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TPackageApplyDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TPackageApplyDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TPackageApplyDao) Columns() TPackageApplyColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TPackageApplyDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TPackageApplyDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TPackageApplyDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TPackageAuditRecordDao is the data access object for the table t_package_audit_record.
|
||||
type TPackageAuditRecordDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TPackageAuditRecordColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TPackageAuditRecordColumns defines and stores column names for the table t_package_audit_record.
|
||||
type TPackageAuditRecordColumns struct {
|
||||
Id string // 主键ID
|
||||
AuditNo string // 审核记录编号
|
||||
ApplyNo string // 申请单号
|
||||
AuditDeptId string // 审核方机构ID
|
||||
AuditorUserId string // 审核人ID
|
||||
AuditResult string // 审核结果:0通过,1驳回
|
||||
AuditOpinion string // 审核意见
|
||||
AuditTime string // 审核时间
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tPackageAuditRecordColumns holds the columns for the table t_package_audit_record.
|
||||
var tPackageAuditRecordColumns = TPackageAuditRecordColumns{
|
||||
Id: "id",
|
||||
AuditNo: "audit_no",
|
||||
ApplyNo: "apply_no",
|
||||
AuditDeptId: "audit_dept_id",
|
||||
AuditorUserId: "auditor_user_id",
|
||||
AuditResult: "audit_result",
|
||||
AuditOpinion: "audit_opinion",
|
||||
AuditTime: "audit_time",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTPackageAuditRecordDao creates and returns a new DAO object for table data access.
|
||||
func NewTPackageAuditRecordDao(handlers ...gdb.ModelHandler) *TPackageAuditRecordDao {
|
||||
return &TPackageAuditRecordDao{
|
||||
group: "default",
|
||||
table: "t_package_audit_record",
|
||||
columns: tPackageAuditRecordColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TPackageAuditRecordDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TPackageAuditRecordDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TPackageAuditRecordDao) Columns() TPackageAuditRecordColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TPackageAuditRecordDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TPackageAuditRecordDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TPackageAuditRecordDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TPackageCustomerDao is the data access object for the table t_package_customer.
|
||||
type TPackageCustomerDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TPackageCustomerColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TPackageCustomerColumns defines and stores column names for the table t_package_customer.
|
||||
type TPackageCustomerColumns struct {
|
||||
Id string // 主键ID
|
||||
PackageCode string // 套餐编码
|
||||
PackageName string // 套餐名称
|
||||
DeptId string // 组织客户ID
|
||||
DeptName string // 组织客户名称
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tPackageCustomerColumns holds the columns for the table t_package_customer.
|
||||
var tPackageCustomerColumns = TPackageCustomerColumns{
|
||||
Id: "id",
|
||||
PackageCode: "package_code",
|
||||
PackageName: "package_name",
|
||||
DeptId: "dept_id",
|
||||
DeptName: "dept_name",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTPackageCustomerDao creates and returns a new DAO object for table data access.
|
||||
func NewTPackageCustomerDao(handlers ...gdb.ModelHandler) *TPackageCustomerDao {
|
||||
return &TPackageCustomerDao{
|
||||
group: "default",
|
||||
table: "t_package_customer",
|
||||
columns: tPackageCustomerColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TPackageCustomerDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TPackageCustomerDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TPackageCustomerDao) Columns() TPackageCustomerColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TPackageCustomerDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TPackageCustomerDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TPackageCustomerDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TPackageTerminalDao is the data access object for the table t_package_terminal.
|
||||
type TPackageTerminalDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TPackageTerminalColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TPackageTerminalColumns defines and stores column names for the table t_package_terminal.
|
||||
type TPackageTerminalColumns struct {
|
||||
Id string // 主键ID
|
||||
PackageCode string // 套餐编码
|
||||
PackageName string // 套餐名称
|
||||
TerminalId string // 终端客户ID
|
||||
TerminalName string // 终端客户名称
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tPackageTerminalColumns holds the columns for the table t_package_terminal.
|
||||
var tPackageTerminalColumns = TPackageTerminalColumns{
|
||||
Id: "id",
|
||||
PackageCode: "package_code",
|
||||
PackageName: "package_name",
|
||||
TerminalId: "terminal_id",
|
||||
TerminalName: "terminal_name",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTPackageTerminalDao creates and returns a new DAO object for table data access.
|
||||
func NewTPackageTerminalDao(handlers ...gdb.ModelHandler) *TPackageTerminalDao {
|
||||
return &TPackageTerminalDao{
|
||||
group: "default",
|
||||
table: "t_package_terminal",
|
||||
columns: tPackageTerminalColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TPackageTerminalDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TPackageTerminalDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TPackageTerminalDao) Columns() TPackageTerminalColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TPackageTerminalDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TPackageTerminalDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TPackageTerminalDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TProductDao is the data access object for the table t_product.
|
||||
type TProductDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TProductColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TProductColumns defines and stores column names for the table t_product.
|
||||
type TProductColumns struct {
|
||||
ProductId string // 商品id
|
||||
ProductName string // 商品的名称
|
||||
ProductSn string // 商品的唯一货号
|
||||
ProductTsn string // 条形编码
|
||||
ProductStock string // 商品库存数量
|
||||
ProductPrice string // 本店售价
|
||||
MarketPrice string // 市场售价
|
||||
ProductStatus string // 该商品状态 枚举
|
||||
ProductType string // 商品类型 枚举
|
||||
CategoryId string // 商品所属商品分类id
|
||||
BrandId string // 品牌id
|
||||
Keywords string // 商品关键字,放在商品页的关键字中,为搜索引擎收录用
|
||||
CheckStatus string // 审核状态 枚举
|
||||
CheckReason string // 审核失败原因
|
||||
ClickCount string // 商品点击数
|
||||
ProductWeight string // 商品的重量,以千克为单位
|
||||
IsPromote string // 是否特价促销 枚举yesno_enum
|
||||
PromotePrice string // 促销价格
|
||||
PromoteStartDate string // 促销价格开始日期
|
||||
PromoteEndDate string // 促销价格结束日期
|
||||
SeckillMaxNum string // 最大秒杀库存
|
||||
ProductBrief string // 商品的简短描述
|
||||
ProductDesc string // 商品的详细描述
|
||||
PicUrl string // 商品的实际大小图片,如进入该商品页时介绍商品属性所显示的大图片
|
||||
PicThumb string // 商品在前台显示的微缩图片,如在分类筛选时显示的小图片
|
||||
PicOriginal string // 应该是上传的商品的原始图片
|
||||
CommentTag string // 标签
|
||||
FreeShipping string // 是否包邮 枚举yesno_enum
|
||||
SortOrder string // 商品的显示顺序
|
||||
StoreSortOrder string // 排序
|
||||
IsBest string // 是否是精品 枚举yesno_enum
|
||||
IsNew string // 是否是新品 枚举yesno_enum
|
||||
IsHot string // 是否热销 枚举yesno_enum
|
||||
LastUpdate string // 最近一次更新商品配置的时间
|
||||
Remark string // 商品的商家备注,仅商家可见
|
||||
VirtualSales string // 虚拟销量
|
||||
LimitNumber string // 限购数量
|
||||
ProductCare string // 温馨提示
|
||||
ProductRelated string // [JSON]关联的推荐商品Id
|
||||
ProductServiceIds string // [JSON]服务项ids
|
||||
IsSupportReturn string // 是否支持无理由退货 枚举yesno_enum
|
||||
IsSupportCod string // 是否支持货到付款 枚举yesno_enum
|
||||
ProductVideo string // 商品视频
|
||||
PrepayPrice string // 预付金额
|
||||
VirtualSample string // 虚拟商品
|
||||
PaidContent string // 付费内容
|
||||
NoShipping string // 是否无需配送 枚举yesno_enum
|
||||
FixedShippingType string // 运费类型 枚举
|
||||
FixedShippingFee string // 固定运费金额
|
||||
DeptId string // 机构id
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tProductColumns holds the columns for the table t_product.
|
||||
var tProductColumns = TProductColumns{
|
||||
ProductId: "product_id",
|
||||
ProductName: "product_name",
|
||||
ProductSn: "product_sn",
|
||||
ProductTsn: "product_tsn",
|
||||
ProductStock: "product_stock",
|
||||
ProductPrice: "product_price",
|
||||
MarketPrice: "market_price",
|
||||
ProductStatus: "product_status",
|
||||
ProductType: "product_type",
|
||||
CategoryId: "category_id",
|
||||
BrandId: "brand_id",
|
||||
Keywords: "keywords",
|
||||
CheckStatus: "check_status",
|
||||
CheckReason: "check_reason",
|
||||
ClickCount: "click_count",
|
||||
ProductWeight: "product_weight",
|
||||
IsPromote: "is_promote",
|
||||
PromotePrice: "promote_price",
|
||||
PromoteStartDate: "promote_start_date",
|
||||
PromoteEndDate: "promote_end_date",
|
||||
SeckillMaxNum: "seckill_max_num",
|
||||
ProductBrief: "product_brief",
|
||||
ProductDesc: "product_desc",
|
||||
PicUrl: "pic_url",
|
||||
PicThumb: "pic_thumb",
|
||||
PicOriginal: "pic_original",
|
||||
CommentTag: "comment_tag",
|
||||
FreeShipping: "free_shipping",
|
||||
SortOrder: "sort_order",
|
||||
StoreSortOrder: "store_sort_order",
|
||||
IsBest: "is_best",
|
||||
IsNew: "is_new",
|
||||
IsHot: "is_hot",
|
||||
LastUpdate: "last_update",
|
||||
Remark: "remark",
|
||||
VirtualSales: "virtual_sales",
|
||||
LimitNumber: "limit_number",
|
||||
ProductCare: "product_care",
|
||||
ProductRelated: "product_related",
|
||||
ProductServiceIds: "product_service_ids",
|
||||
IsSupportReturn: "is_support_return",
|
||||
IsSupportCod: "is_support_cod",
|
||||
ProductVideo: "product_video",
|
||||
PrepayPrice: "prepay_price",
|
||||
VirtualSample: "virtual_sample",
|
||||
PaidContent: "paid_content",
|
||||
NoShipping: "no_shipping",
|
||||
FixedShippingType: "fixed_shipping_type",
|
||||
FixedShippingFee: "fixed_shipping_fee",
|
||||
DeptId: "dept_id",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTProductDao creates and returns a new DAO object for table data access.
|
||||
func NewTProductDao(handlers ...gdb.ModelHandler) *TProductDao {
|
||||
return &TProductDao{
|
||||
group: "default",
|
||||
table: "t_product",
|
||||
columns: tProductColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TProductDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TProductDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TProductDao) Columns() TProductColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TProductDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TProductDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TProductDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TProfitAccountMonthBillDao is the data access object for the table t_profit_account_month_bill.
|
||||
type TProfitAccountMonthBillDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TProfitAccountMonthBillColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TProfitAccountMonthBillColumns defines and stores column names for the table t_profit_account_month_bill.
|
||||
type TProfitAccountMonthBillColumns struct {
|
||||
Id string // 账单ID
|
||||
DeptId string // 机构ID
|
||||
AccountPeriod string // 账期YYYY-MM
|
||||
OpeningBalance string // 月初余额
|
||||
CommissionIncome string // 分润收入
|
||||
BalanceTransferInIncome string // 余额转提现收入
|
||||
WithdrawalExpense string // 提现支出
|
||||
WithdrawableTransferOutExpense string // 可提现转余额支出
|
||||
ProfitCreditRepayExpense string // 盈利账户还款支出
|
||||
TotalIncome string // 本月收入总额
|
||||
TotalExpense string // 本月支出总额
|
||||
ClosingBalance string // 月末余额(月初余额+本月收入-本月支出)
|
||||
IncomeCount string // 收入笔数
|
||||
ExpenseCount string // 支出笔数
|
||||
BillStatus string // 账单状态:1正常,2已调整,3已作废
|
||||
SettleTime string // 结算时间
|
||||
SettleBy string // 结算人ID
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tProfitAccountMonthBillColumns holds the columns for the table t_profit_account_month_bill.
|
||||
var tProfitAccountMonthBillColumns = TProfitAccountMonthBillColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
AccountPeriod: "account_period",
|
||||
OpeningBalance: "opening_balance",
|
||||
CommissionIncome: "commission_income",
|
||||
BalanceTransferInIncome: "balance_transfer_in_income",
|
||||
WithdrawalExpense: "withdrawal_expense",
|
||||
WithdrawableTransferOutExpense: "withdrawable_transfer_out_expense",
|
||||
ProfitCreditRepayExpense: "profit_credit_repay_expense",
|
||||
TotalIncome: "total_income",
|
||||
TotalExpense: "total_expense",
|
||||
ClosingBalance: "closing_balance",
|
||||
IncomeCount: "income_count",
|
||||
ExpenseCount: "expense_count",
|
||||
BillStatus: "bill_status",
|
||||
SettleTime: "settle_time",
|
||||
SettleBy: "settle_by",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTProfitAccountMonthBillDao creates and returns a new DAO object for table data access.
|
||||
func NewTProfitAccountMonthBillDao(handlers ...gdb.ModelHandler) *TProfitAccountMonthBillDao {
|
||||
return &TProfitAccountMonthBillDao{
|
||||
group: "default",
|
||||
table: "t_profit_account_month_bill",
|
||||
columns: tProfitAccountMonthBillColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TProfitAccountMonthBillDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TProfitAccountMonthBillDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TProfitAccountMonthBillDao) Columns() TProfitAccountMonthBillColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TProfitAccountMonthBillDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TProfitAccountMonthBillDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TProfitAccountMonthBillDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TResourceBatchDownloadDao is the data access object for the table t_resource_batch_download.
|
||||
type TResourceBatchDownloadDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TResourceBatchDownloadColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TResourceBatchDownloadColumns defines and stores column names for the table t_resource_batch_download.
|
||||
type TResourceBatchDownloadColumns struct {
|
||||
Id string // 主键ID
|
||||
BatchNo string // 批次编号(全局唯一)
|
||||
TaskName string // 任务名称
|
||||
ResourceType string // 资源类型 枚举
|
||||
ExportScene string // 导出场景 枚举
|
||||
QueryParams string // 导出查询条件快照
|
||||
TotalCount string // 预计导出总条数
|
||||
SuccessCount string // 已成功导出条数
|
||||
FailCount string // 失败条数
|
||||
DownloadStatus string // 下载状态 枚举
|
||||
OssId string // OSS文件ID
|
||||
FileName string // 导出文件名
|
||||
FileExt string // 文件扩展名
|
||||
FileUrl string // 文件访问地址
|
||||
FilePath string // 服务器本地路径
|
||||
FileSize string // 文件大小(字节)
|
||||
FileMd5 string // 文件MD5
|
||||
DownloadCount string // 下载次数
|
||||
LastDownloadTime string // 最后下载时间
|
||||
MaxDownloadCount string // 最大下载次数限制
|
||||
ErrorMessage string // 失败原因
|
||||
DeptId string // 所属机构ID
|
||||
StartTime string // 任务开始时间
|
||||
FinishTime string // 任务完成时间
|
||||
ExpireTime string // 文件过期时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tResourceBatchDownloadColumns holds the columns for the table t_resource_batch_download.
|
||||
var tResourceBatchDownloadColumns = TResourceBatchDownloadColumns{
|
||||
Id: "id",
|
||||
BatchNo: "batch_no",
|
||||
TaskName: "task_name",
|
||||
ResourceType: "resource_type",
|
||||
ExportScene: "export_scene",
|
||||
QueryParams: "query_params",
|
||||
TotalCount: "total_count",
|
||||
SuccessCount: "success_count",
|
||||
FailCount: "fail_count",
|
||||
DownloadStatus: "download_status",
|
||||
OssId: "oss_id",
|
||||
FileName: "file_name",
|
||||
FileExt: "file_ext",
|
||||
FileUrl: "file_url",
|
||||
FilePath: "file_path",
|
||||
FileSize: "file_size",
|
||||
FileMd5: "file_md5",
|
||||
DownloadCount: "download_count",
|
||||
LastDownloadTime: "last_download_time",
|
||||
MaxDownloadCount: "max_download_count",
|
||||
ErrorMessage: "error_message",
|
||||
DeptId: "dept_id",
|
||||
StartTime: "start_time",
|
||||
FinishTime: "finish_time",
|
||||
ExpireTime: "expire_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTResourceBatchDownloadDao creates and returns a new DAO object for table data access.
|
||||
func NewTResourceBatchDownloadDao(handlers ...gdb.ModelHandler) *TResourceBatchDownloadDao {
|
||||
return &TResourceBatchDownloadDao{
|
||||
group: "default",
|
||||
table: "t_resource_batch_download",
|
||||
columns: tResourceBatchDownloadColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TResourceBatchDownloadDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TResourceBatchDownloadDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TResourceBatchDownloadDao) Columns() TResourceBatchDownloadColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TResourceBatchDownloadDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TResourceBatchDownloadDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TResourceBatchDownloadDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimBindPackageLogsDao is the data access object for the table t_sim_bind_package_logs.
|
||||
type TSimBindPackageLogsDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimBindPackageLogsColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimBindPackageLogsColumns defines and stores column names for the table t_sim_bind_package_logs.
|
||||
type TSimBindPackageLogsColumns struct {
|
||||
Id string // 主键ID
|
||||
SubscriptionNo string // 订购记录编号
|
||||
BatchNo string // 批次编号
|
||||
Iccid string // ICCID
|
||||
Msisdn string // MSISDN/卡号
|
||||
DeptId string // 部门机构编号
|
||||
PackageType string // 套餐类型
|
||||
PackageCode string // 套餐编号
|
||||
PreviousPackageCode string // 变更前套餐编号
|
||||
BusinessType string // 类型 枚举
|
||||
EffectiveStatus string // 订购状态 枚举
|
||||
HandleTime string // 办理时间
|
||||
EffectiveTime string // 生效时间
|
||||
ExpectedExpireTime string // 预计到期时间
|
||||
ActualExpireTime string // 实际到期时间
|
||||
DurationMonths string // 套餐时长(月)
|
||||
GiftDurationMonths string // 赠送时长(月)
|
||||
OrderCode string // 订单编号
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimBindPackageLogsColumns holds the columns for the table t_sim_bind_package_logs.
|
||||
var tSimBindPackageLogsColumns = TSimBindPackageLogsColumns{
|
||||
Id: "id",
|
||||
SubscriptionNo: "subscription_no",
|
||||
BatchNo: "batch_no",
|
||||
Iccid: "iccid",
|
||||
Msisdn: "msisdn",
|
||||
DeptId: "dept_id",
|
||||
PackageType: "package_type",
|
||||
PackageCode: "package_code",
|
||||
PreviousPackageCode: "previous_package_code",
|
||||
BusinessType: "business_type",
|
||||
EffectiveStatus: "effective_status",
|
||||
HandleTime: "handle_time",
|
||||
EffectiveTime: "effective_time",
|
||||
ExpectedExpireTime: "expected_expire_time",
|
||||
ActualExpireTime: "actual_expire_time",
|
||||
DurationMonths: "duration_months",
|
||||
GiftDurationMonths: "gift_duration_months",
|
||||
OrderCode: "order_code",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimBindPackageLogsDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimBindPackageLogsDao(handlers ...gdb.ModelHandler) *TSimBindPackageLogsDao {
|
||||
return &TSimBindPackageLogsDao{
|
||||
group: "default",
|
||||
table: "t_sim_bind_package_logs",
|
||||
columns: tSimBindPackageLogsColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimBindPackageLogsDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimBindPackageLogsDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimBindPackageLogsDao) Columns() TSimBindPackageLogsColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimBindPackageLogsDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimBindPackageLogsDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimBindPackageLogsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimCardBindPkgDao is the data access object for the table t_sim_card_bind_pkg.
|
||||
type TSimCardBindPkgDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimCardBindPkgColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimCardBindPkgColumns defines and stores column names for the table t_sim_card_bind_pkg.
|
||||
type TSimCardBindPkgColumns struct {
|
||||
Id string // 主键ID
|
||||
SubscriptionNo string // 订购记录编号
|
||||
BatchNo string // 批次编号
|
||||
Iccid string // ICCID
|
||||
Msisdn string // MSISDN/卡号
|
||||
DeptId string // 部门机构编号
|
||||
PackageType string // 套餐类型
|
||||
PackageCode string // 套餐编号
|
||||
PreviousPackageCode string // 变更前套餐编号
|
||||
BusinessType string // 类型 枚举
|
||||
EffectiveStatus string // 订购状态 枚举
|
||||
HandleTime string // 办理时间
|
||||
EffectiveTime string // 生效时间
|
||||
ExpectedExpireTime string // 预计到期时间
|
||||
ActualExpireTime string // 实际到期时间
|
||||
DurationMonths string // 套餐时长(月)
|
||||
GiftDurationMonths string // 赠送时长(月)
|
||||
OrderCode string // 订单编号
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimCardBindPkgColumns holds the columns for the table t_sim_card_bind_pkg.
|
||||
var tSimCardBindPkgColumns = TSimCardBindPkgColumns{
|
||||
Id: "id",
|
||||
SubscriptionNo: "subscription_no",
|
||||
BatchNo: "batch_no",
|
||||
Iccid: "iccid",
|
||||
Msisdn: "msisdn",
|
||||
DeptId: "dept_id",
|
||||
PackageType: "package_type",
|
||||
PackageCode: "package_code",
|
||||
PreviousPackageCode: "previous_package_code",
|
||||
BusinessType: "business_type",
|
||||
EffectiveStatus: "effective_status",
|
||||
HandleTime: "handle_time",
|
||||
EffectiveTime: "effective_time",
|
||||
ExpectedExpireTime: "expected_expire_time",
|
||||
ActualExpireTime: "actual_expire_time",
|
||||
DurationMonths: "duration_months",
|
||||
GiftDurationMonths: "gift_duration_months",
|
||||
OrderCode: "order_code",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimCardBindPkgDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimCardBindPkgDao(handlers ...gdb.ModelHandler) *TSimCardBindPkgDao {
|
||||
return &TSimCardBindPkgDao{
|
||||
group: "default",
|
||||
table: "t_sim_card_bind_pkg",
|
||||
columns: tSimCardBindPkgColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimCardBindPkgDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimCardBindPkgDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimCardBindPkgDao) Columns() TSimCardBindPkgColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimCardBindPkgDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimCardBindPkgDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimCardBindPkgDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimCardCancellationDao is the data access object for the table t_sim_card_cancellation.
|
||||
type TSimCardCancellationDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimCardCancellationColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimCardCancellationColumns defines and stores column names for the table t_sim_card_cancellation.
|
||||
type TSimCardCancellationColumns struct {
|
||||
Id string // 主键ID
|
||||
Iccid string // ICCID
|
||||
Msisdn string // MSISDN/卡号
|
||||
Imsi string // IMSI
|
||||
Imei string // IMEI
|
||||
RegionCode string // 归属地
|
||||
DeptId string // 渠道客户ID
|
||||
CurrentPackageCode string // 当前套餐编号
|
||||
PackageStatus string // 套餐状态:0 无套餐,1待生效,2生效中,3已过期
|
||||
AccessType string // 接入方式:ipv4、ipv6、ipv4_ipv6
|
||||
BossCardStatus string // 运营商卡状态 枚举
|
||||
CancelBatchNo string // 系统销户批次号
|
||||
CancelledAt string // 系统销户完成时间
|
||||
CardType string // 卡类型 枚举
|
||||
BossOpenAt string // 运营商开户日期
|
||||
BossActivateAt string // 运营商激活日期
|
||||
IsBossActivateEnabled string // 是否按运营商激活减去赠送时长方:1是,0否
|
||||
InboundBatchNo string // 入库批次
|
||||
OutboundBatchNo string // 出库批次
|
||||
AllocationBatchNo string // 划拨批次
|
||||
IsFlowPool string // 是否为池卡:1是,0否
|
||||
FlowPoolCode string // 流量池编号
|
||||
FlowPkgBeginAt string // 当前套餐生效时间
|
||||
FlowPkgPresentAt string // 套餐赠送结束时间
|
||||
FlowPkgRealPresentAt string // 实际赠送结束时间
|
||||
FlowPkgEndAt string // 当前套餐预计到期时间
|
||||
DataServiceStatus string // 数据服务状态:0启用,1停用
|
||||
PackageTotalFlowMb string // 套餐总流量MB
|
||||
UsedFlowMb string // 已用流量MB
|
||||
TrafficCutoffStatus string // 达量断网配置状态:0未配置,1已开启,2已关闭
|
||||
TrafficCutoffThreshold string // 达量断网阈值
|
||||
SmsServiceStatus string // 短信服务状态:0启用,1停用
|
||||
PackageTotalSms string // 套餐短信总条数
|
||||
UsedSms string // 已用短信条数
|
||||
VoiceServiceStatus string // 语音服务状态:0启用,1停用
|
||||
PackageTotalVoice string // 套餐语音总分钟数
|
||||
UsedVoice string // 已用语音分钟数
|
||||
RoamServiceStatus string // 国漫服务状态:0启用,1停用
|
||||
PackageTotalRoamFlowMb string // 套餐国际流量MB
|
||||
UsedRoamFlowMb string // 已用国际流量MB
|
||||
StatusSyncTime string // 状态最后一次同步时间
|
||||
FlowSyncTime string // 流量最后一次同步时间
|
||||
SmsSyncTime string // 短信最后一次同步时间
|
||||
VoiceSyncTime string // 语音最后一次同步时间
|
||||
RoamSyncTime string // 国漫最后一次同步时间
|
||||
ExtraFeeEnabled string // 是否收取附加费:0是,1否
|
||||
ExtraFeeMultiple string // 附加费用倍数
|
||||
ExtraFee string // 附加金额
|
||||
ChanKey string // 通道编号
|
||||
NetModel string // 网络类型 枚举
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimCardCancellationColumns holds the columns for the table t_sim_card_cancellation.
|
||||
var tSimCardCancellationColumns = TSimCardCancellationColumns{
|
||||
Id: "id",
|
||||
Iccid: "iccid",
|
||||
Msisdn: "msisdn",
|
||||
Imsi: "imsi",
|
||||
Imei: "imei",
|
||||
RegionCode: "region_code",
|
||||
DeptId: "dept_id",
|
||||
CurrentPackageCode: "current_package_code",
|
||||
PackageStatus: "package_status",
|
||||
AccessType: "access_type",
|
||||
BossCardStatus: "boss_card_status",
|
||||
CancelBatchNo: "cancel_batch_no",
|
||||
CancelledAt: "cancelled_at",
|
||||
CardType: "card_type",
|
||||
BossOpenAt: "boss_open_at",
|
||||
BossActivateAt: "boss_activate_at",
|
||||
IsBossActivateEnabled: "is_boss_activate_enabled",
|
||||
InboundBatchNo: "inbound_batch_no",
|
||||
OutboundBatchNo: "outbound_batch_no",
|
||||
AllocationBatchNo: "allocation_batch_no",
|
||||
IsFlowPool: "is_flow_pool",
|
||||
FlowPoolCode: "flow_pool_code",
|
||||
FlowPkgBeginAt: "flow_pkg_begin_at",
|
||||
FlowPkgPresentAt: "flow_pkg_present_at",
|
||||
FlowPkgRealPresentAt: "flow_pkg_real_present_at",
|
||||
FlowPkgEndAt: "flow_pkg_end_at",
|
||||
DataServiceStatus: "data_service_status",
|
||||
PackageTotalFlowMb: "package_total_flow_mb",
|
||||
UsedFlowMb: "used_flow_mb",
|
||||
TrafficCutoffStatus: "traffic_cutoff_status",
|
||||
TrafficCutoffThreshold: "traffic_cutoff_threshold",
|
||||
SmsServiceStatus: "sms_service_status",
|
||||
PackageTotalSms: "package_total_sms",
|
||||
UsedSms: "used_sms",
|
||||
VoiceServiceStatus: "voice_service_status",
|
||||
PackageTotalVoice: "package_total_voice",
|
||||
UsedVoice: "used_voice",
|
||||
RoamServiceStatus: "roam_service_status",
|
||||
PackageTotalRoamFlowMb: "package_total_roam_flow_mb",
|
||||
UsedRoamFlowMb: "used_roam_flow_mb",
|
||||
StatusSyncTime: "status_sync_time",
|
||||
FlowSyncTime: "flow_sync_time",
|
||||
SmsSyncTime: "sms_sync_time",
|
||||
VoiceSyncTime: "voice_sync_time",
|
||||
RoamSyncTime: "roam_sync_time",
|
||||
ExtraFeeEnabled: "extra_fee_enabled",
|
||||
ExtraFeeMultiple: "extra_fee_multiple",
|
||||
ExtraFee: "extra_fee",
|
||||
ChanKey: "chan_key",
|
||||
NetModel: "net_model",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimCardCancellationDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimCardCancellationDao(handlers ...gdb.ModelHandler) *TSimCardCancellationDao {
|
||||
return &TSimCardCancellationDao{
|
||||
group: "default",
|
||||
table: "t_sim_card_cancellation",
|
||||
columns: tSimCardCancellationColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimCardCancellationDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimCardCancellationDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimCardCancellationDao) Columns() TSimCardCancellationColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimCardCancellationDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimCardCancellationDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimCardCancellationDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimCardInfoDao is the data access object for the table t_sim_card_info.
|
||||
type TSimCardInfoDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimCardInfoColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimCardInfoColumns defines and stores column names for the table t_sim_card_info.
|
||||
type TSimCardInfoColumns struct {
|
||||
Id string // 主键ID
|
||||
Iccid string // ICCID
|
||||
Msisdn string // MSISDN/卡号
|
||||
Imsi string // IMSI
|
||||
Imei string // IMEI
|
||||
RegionCode string // 归属地
|
||||
DeptId string // 渠道客户ID
|
||||
CurrentPackageCode string // 当前套餐编号
|
||||
PackageStatus string // 套餐状态:0 无套餐,1待生效,2生效中,3已过期
|
||||
AccessType string // 接入方式:ipv4、ipv6、ipv4_ipv6
|
||||
BossCardStatus string // 运营商卡状态 枚举
|
||||
CardType string // 卡类型 枚举
|
||||
BossOpenAt string // 运营商开户日期
|
||||
BossActivateAt string // 运营商激活日期
|
||||
IsBossActivateEnabled string // 是否按运营商激活减去赠送时长方:1是,0否
|
||||
InboundBatchNo string // 入库批次
|
||||
OutboundBatchNo string // 出库批次
|
||||
AllocationBatchNo string // 划拨批次
|
||||
IsFlowPool string // 是否为池卡:1是,0否
|
||||
FlowPoolCode string // 流量池编号
|
||||
OutStockTime string // 出库时间
|
||||
FlowPkgBeginAt string // 当前套餐生效时间
|
||||
FlowPkgPresentAt string // 套餐赠送结束时间
|
||||
FlowPkgRealPresentAt string // 实际赠送结束时间
|
||||
FlowPkgEndAt string // 当前套餐预计到期时间
|
||||
DataServiceStatus string // 数据服务状态:1启用、0禁用
|
||||
PackageTotalFlowMb string // 套餐总流量MB
|
||||
UsedFlowMb string // 已用流量MB
|
||||
TrafficCutoffStatus string // 达量断网配置状态:0未配置,1已开启,2已关闭
|
||||
TrafficCutoffThreshold string // 达量断网阈值
|
||||
SmsServiceStatus string // 短信服务状态:1启用、0禁用
|
||||
PackageTotalSms string // 套餐短信总条数
|
||||
UsedSms string // 已用短信条数
|
||||
VoiceServiceStatus string // 语音服务状态:1启用、0禁用
|
||||
PackageTotalVoice string // 套餐语音总分钟数
|
||||
UsedVoice string // 已用语音分钟数
|
||||
RoamServiceStatus string // 国漫服务状态:1启用、0禁用
|
||||
PackageTotalRoamFlowMb string // 套餐国际流量MB
|
||||
UsedRoamFlowMb string // 已用国际流量MB
|
||||
StatusSyncTime string // 状态最后一次同步时间
|
||||
FlowSyncTime string // 流量最后一次同步时间
|
||||
SmsSyncTime string // 短信最后一次同步时间
|
||||
VoiceSyncTime string // 语音最后一次同步时间
|
||||
RoamSyncTime string // 国漫最后一次同步时间
|
||||
ExtraFeeEnabled string // 是否收取附加费:1是,0否
|
||||
ExtraFeeMultiple string // 附加费用倍数
|
||||
ExtraFee string // 附加金额
|
||||
ChanKey string // 通道编号
|
||||
NetModel string // 网络类型:4G、5G、NB-IoT
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimCardInfoColumns holds the columns for the table t_sim_card_info.
|
||||
var tSimCardInfoColumns = TSimCardInfoColumns{
|
||||
Id: "id",
|
||||
Iccid: "iccid",
|
||||
Msisdn: "msisdn",
|
||||
Imsi: "imsi",
|
||||
Imei: "imei",
|
||||
RegionCode: "region_code",
|
||||
DeptId: "dept_id",
|
||||
CurrentPackageCode: "current_package_code",
|
||||
PackageStatus: "package_status",
|
||||
AccessType: "access_type",
|
||||
BossCardStatus: "boss_card_status",
|
||||
CardType: "card_type",
|
||||
BossOpenAt: "boss_open_at",
|
||||
BossActivateAt: "boss_activate_at",
|
||||
IsBossActivateEnabled: "is_boss_activate_enabled",
|
||||
InboundBatchNo: "inbound_batch_no",
|
||||
OutboundBatchNo: "outbound_batch_no",
|
||||
AllocationBatchNo: "allocation_batch_no",
|
||||
IsFlowPool: "is_flow_pool",
|
||||
FlowPoolCode: "flow_pool_code",
|
||||
OutStockTime: "out_stock_time",
|
||||
FlowPkgBeginAt: "flow_pkg_begin_at",
|
||||
FlowPkgPresentAt: "flow_pkg_present_at",
|
||||
FlowPkgRealPresentAt: "flow_pkg_real_present_at",
|
||||
FlowPkgEndAt: "flow_pkg_end_at",
|
||||
DataServiceStatus: "data_service_status",
|
||||
PackageTotalFlowMb: "package_total_flow_mb",
|
||||
UsedFlowMb: "used_flow_mb",
|
||||
TrafficCutoffStatus: "traffic_cutoff_status",
|
||||
TrafficCutoffThreshold: "traffic_cutoff_threshold",
|
||||
SmsServiceStatus: "sms_service_status",
|
||||
PackageTotalSms: "package_total_sms",
|
||||
UsedSms: "used_sms",
|
||||
VoiceServiceStatus: "voice_service_status",
|
||||
PackageTotalVoice: "package_total_voice",
|
||||
UsedVoice: "used_voice",
|
||||
RoamServiceStatus: "roam_service_status",
|
||||
PackageTotalRoamFlowMb: "package_total_roam_flow_mb",
|
||||
UsedRoamFlowMb: "used_roam_flow_mb",
|
||||
StatusSyncTime: "status_sync_time",
|
||||
FlowSyncTime: "flow_sync_time",
|
||||
SmsSyncTime: "sms_sync_time",
|
||||
VoiceSyncTime: "voice_sync_time",
|
||||
RoamSyncTime: "roam_sync_time",
|
||||
ExtraFeeEnabled: "extra_fee_enabled",
|
||||
ExtraFeeMultiple: "extra_fee_multiple",
|
||||
ExtraFee: "extra_fee",
|
||||
ChanKey: "chan_key",
|
||||
NetModel: "net_model",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimCardInfoDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimCardInfoDao(handlers ...gdb.ModelHandler) *TSimCardInfoDao {
|
||||
return &TSimCardInfoDao{
|
||||
group: "default",
|
||||
table: "t_sim_card_info",
|
||||
columns: tSimCardInfoColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimCardInfoDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimCardInfoDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimCardInfoDao) Columns() TSimCardInfoColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimCardInfoDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimCardInfoDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimCardInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimCardStockDao is the data access object for the table t_sim_card_stock.
|
||||
type TSimCardStockDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimCardStockColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimCardStockColumns defines and stores column names for the table t_sim_card_stock.
|
||||
type TSimCardStockColumns struct {
|
||||
Id string // 主键ID
|
||||
BatchNo string //
|
||||
Iccid string // ICCID
|
||||
Msisdn string // MSISDN
|
||||
Imsi string // IMSI
|
||||
Imei string // IMEI
|
||||
ChanKey string // 通道编号
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimCardStockColumns holds the columns for the table t_sim_card_stock.
|
||||
var tSimCardStockColumns = TSimCardStockColumns{
|
||||
Id: "id",
|
||||
BatchNo: "batch_no",
|
||||
Iccid: "iccid",
|
||||
Msisdn: "msisdn",
|
||||
Imsi: "imsi",
|
||||
Imei: "imei",
|
||||
ChanKey: "chan_key",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimCardStockDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimCardStockDao(handlers ...gdb.ModelHandler) *TSimCardStockDao {
|
||||
return &TSimCardStockDao{
|
||||
group: "default",
|
||||
table: "t_sim_card_stock",
|
||||
columns: tSimCardStockColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimCardStockDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimCardStockDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimCardStockDao) Columns() TSimCardStockColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimCardStockDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimCardStockDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimCardStockDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimChannelTemplateDao is the data access object for the table t_sim_channel_template.
|
||||
type TSimChannelTemplateDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimChannelTemplateColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimChannelTemplateColumns defines and stores column names for the table t_sim_channel_template.
|
||||
type TSimChannelTemplateColumns struct {
|
||||
Id string // ID
|
||||
TempKey string // 模板标识
|
||||
TempName string // 模板名称
|
||||
TempModel string // 模板模型
|
||||
TempConfig string // 模板配置
|
||||
TempStatus string // 模板状态(0未启用,1启用)
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimChannelTemplateColumns holds the columns for the table t_sim_channel_template.
|
||||
var tSimChannelTemplateColumns = TSimChannelTemplateColumns{
|
||||
Id: "id",
|
||||
TempKey: "temp_key",
|
||||
TempName: "temp_name",
|
||||
TempModel: "temp_model",
|
||||
TempConfig: "temp_config",
|
||||
TempStatus: "temp_status",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimChannelTemplateDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimChannelTemplateDao(handlers ...gdb.ModelHandler) *TSimChannelTemplateDao {
|
||||
return &TSimChannelTemplateDao{
|
||||
group: "default",
|
||||
table: "t_sim_channel_template",
|
||||
columns: tSimChannelTemplateColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimChannelTemplateDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimChannelTemplateDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimChannelTemplateDao) Columns() TSimChannelTemplateColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimChannelTemplateDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimChannelTemplateDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimChannelTemplateDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimChannelsDao is the data access object for the table t_sim_channels.
|
||||
type TSimChannelsDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimChannelsColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimChannelsColumns defines and stores column names for the table t_sim_channels.
|
||||
type TSimChannelsColumns struct {
|
||||
Id string // ID
|
||||
TempKey string // 模板标识
|
||||
ChanKey string // 通道编号
|
||||
ChanName string // 通道名称
|
||||
ChanConfig string // 通道配置
|
||||
ChanStatus string // 通道状态(0启用,1停用, 2未申请, 3申请中, 4接口信息不全)
|
||||
ShareEnabled string // 是否开放共享Token(0否,1是)
|
||||
ChanAlias string // 通道别名
|
||||
RegionCode string // 通道行政区域代码(省市)
|
||||
AppKey string // 应用标识
|
||||
AppSecret string // 应用密钥
|
||||
AccessToken string // 接口调用凭证
|
||||
AccessTokenCreated string // 凭证申请时间
|
||||
AccessTokenExpire string // 凭证过期时间
|
||||
RefreshToken string // 刷新凭证
|
||||
LoginUser string // 登录账号
|
||||
LoginPassword string // 登录密码
|
||||
LoginUrl string // 登录地址
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimChannelsColumns holds the columns for the table t_sim_channels.
|
||||
var tSimChannelsColumns = TSimChannelsColumns{
|
||||
Id: "id",
|
||||
TempKey: "temp_key",
|
||||
ChanKey: "chan_key",
|
||||
ChanName: "chan_name",
|
||||
ChanConfig: "chan_config",
|
||||
ChanStatus: "chan_status",
|
||||
ShareEnabled: "share_enabled",
|
||||
ChanAlias: "chan_alias",
|
||||
RegionCode: "region_code",
|
||||
AppKey: "app_key",
|
||||
AppSecret: "app_secret",
|
||||
AccessToken: "access_token",
|
||||
AccessTokenCreated: "access_token_created",
|
||||
AccessTokenExpire: "access_token_expire",
|
||||
RefreshToken: "refresh_token",
|
||||
LoginUser: "login_user",
|
||||
LoginPassword: "login_password",
|
||||
LoginUrl: "login_url",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimChannelsDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimChannelsDao(handlers ...gdb.ModelHandler) *TSimChannelsDao {
|
||||
return &TSimChannelsDao{
|
||||
group: "default",
|
||||
table: "t_sim_channels",
|
||||
columns: tSimChannelsColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimChannelsDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimChannelsDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimChannelsDao) Columns() TSimChannelsColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimChannelsDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimChannelsDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimChannelsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimFlowPackageInfoDao is the data access object for the table t_sim_flow_package_info.
|
||||
type TSimFlowPackageInfoDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimFlowPackageInfoColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimFlowPackageInfoColumns defines and stores column names for the table t_sim_flow_package_info.
|
||||
type TSimFlowPackageInfoColumns struct {
|
||||
Id string // 主键ID
|
||||
PackageCode string // 套餐编码
|
||||
CategoryCode string // 套餐分类编码
|
||||
PoolPackageCode string // 池套餐
|
||||
PackageName string // 套餐名称
|
||||
PackageType string // 套餐类型:101-卡套餐 102-池套餐 103-单卡加油包 104-池卡加油包
|
||||
BillingMethod string // 计费方式
|
||||
SortNo string // 排序号
|
||||
FlowMb string // 套餐流量(MB)
|
||||
FlowGb string // 套餐流量(GB)
|
||||
Enabled string // 是否启用:0-否 1-是(yesno_enum)
|
||||
ListPrice string // 目录售价
|
||||
CostPrice string // 成本价
|
||||
SysDefaultProfit string // 系统默认利润
|
||||
SysDefaultRatio string // 系统默认系数
|
||||
TerminalCost string // 终端成本
|
||||
SysDefaultTerminalProfit string // 系统默认终端利润
|
||||
SysDefaultTerminalRatio string // 系统默认终端系数
|
||||
RenewableDurationConfig string // 可续费时长配置:[1,2,3]
|
||||
DiscountRateConfig string // 折扣率配置:{"duration":1,"rate":100}
|
||||
RenewablePackageCodes string // 可续费套餐编码列表
|
||||
ChangeablePackageCodes string // 可变更套餐编码列表
|
||||
TopupPackageCodes string // 可订购加油包套餐编码列表
|
||||
IsAutoRenew string // 是否自动续费:0-否 1-是
|
||||
AutoRenewPackageId string // 自动续费套餐ID
|
||||
AutoRenewYears string // 自动续费年限
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimFlowPackageInfoColumns holds the columns for the table t_sim_flow_package_info.
|
||||
var tSimFlowPackageInfoColumns = TSimFlowPackageInfoColumns{
|
||||
Id: "id",
|
||||
PackageCode: "package_code",
|
||||
CategoryCode: "category_code",
|
||||
PoolPackageCode: "pool_package_code",
|
||||
PackageName: "package_name",
|
||||
PackageType: "package_type",
|
||||
BillingMethod: "billing_method",
|
||||
SortNo: "sort_no",
|
||||
FlowMb: "flow_mb",
|
||||
FlowGb: "flow_gb",
|
||||
Enabled: "enabled",
|
||||
ListPrice: "list_price",
|
||||
CostPrice: "cost_price",
|
||||
SysDefaultProfit: "sys_default_profit",
|
||||
SysDefaultRatio: "sys_default_ratio",
|
||||
TerminalCost: "terminal_cost",
|
||||
SysDefaultTerminalProfit: "sys_default_terminal_profit",
|
||||
SysDefaultTerminalRatio: "sys_default_terminal_ratio",
|
||||
RenewableDurationConfig: "renewable_duration_config",
|
||||
DiscountRateConfig: "discount_rate_config",
|
||||
RenewablePackageCodes: "renewable_package_codes",
|
||||
ChangeablePackageCodes: "changeable_package_codes",
|
||||
TopupPackageCodes: "topup_package_codes",
|
||||
IsAutoRenew: "is_auto_renew",
|
||||
AutoRenewPackageId: "auto_renew_package_id",
|
||||
AutoRenewYears: "auto_renew_years",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimFlowPackageInfoDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimFlowPackageInfoDao(handlers ...gdb.ModelHandler) *TSimFlowPackageInfoDao {
|
||||
return &TSimFlowPackageInfoDao{
|
||||
group: "default",
|
||||
table: "t_sim_flow_package_info",
|
||||
columns: tSimFlowPackageInfoColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimFlowPackageInfoDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimFlowPackageInfoDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimFlowPackageInfoDao) Columns() TSimFlowPackageInfoColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimFlowPackageInfoDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimFlowPackageInfoDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimFlowPackageInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimFlowPackagePriceDao is the data access object for the table t_sim_flow_package_price.
|
||||
type TSimFlowPackagePriceDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimFlowPackagePriceColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimFlowPackagePriceColumns defines and stores column names for the table t_sim_flow_package_price.
|
||||
type TSimFlowPackagePriceColumns struct {
|
||||
Id string // 主键ID
|
||||
PackageCode string // 套餐编码
|
||||
AgentScopeType string // 渠道适用类型:0-所有客户 1-指定客户
|
||||
TargetAgentId string // 指定渠道客户ID
|
||||
DeptId string // 机构编号
|
||||
AgentCostRatio string // 渠道成本系数
|
||||
AgentCostProfit string // 渠道成本利润
|
||||
UserCostRatio string // 终端用户成本系数
|
||||
UserCostProfit string // 终端用户成本利润
|
||||
Enabled string // 是否启用:0-否 1-是(yesno_enum)
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimFlowPackagePriceColumns holds the columns for the table t_sim_flow_package_price.
|
||||
var tSimFlowPackagePriceColumns = TSimFlowPackagePriceColumns{
|
||||
Id: "id",
|
||||
PackageCode: "package_code",
|
||||
AgentScopeType: "agent_scope_type",
|
||||
TargetAgentId: "target_agent_id",
|
||||
DeptId: "dept_id",
|
||||
AgentCostRatio: "agent_cost_ratio",
|
||||
AgentCostProfit: "agent_cost_profit",
|
||||
UserCostRatio: "user_cost_ratio",
|
||||
UserCostProfit: "user_cost_profit",
|
||||
Enabled: "enabled",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimFlowPackagePriceDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimFlowPackagePriceDao(handlers ...gdb.ModelHandler) *TSimFlowPackagePriceDao {
|
||||
return &TSimFlowPackagePriceDao{
|
||||
group: "default",
|
||||
table: "t_sim_flow_package_price",
|
||||
columns: tSimFlowPackagePriceColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimFlowPackagePriceDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimFlowPackagePriceDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimFlowPackagePriceDao) Columns() TSimFlowPackagePriceColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimFlowPackagePriceDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimFlowPackagePriceDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimFlowPackagePriceDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimFlowPoolDao is the data access object for the table t_sim_flow_pool.
|
||||
type TSimFlowPoolDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimFlowPoolColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimFlowPoolColumns defines and stores column names for the table t_sim_flow_pool.
|
||||
type TSimFlowPoolColumns struct {
|
||||
Id string // 主键ID
|
||||
FlowPoolCode string // 流量池编号
|
||||
DeptId string // 客户编号
|
||||
PackageCodes string // 套餐编号列表(冗余)
|
||||
PoolPackageCode string // 池套餐编码
|
||||
CardCount string // 关联卡数量
|
||||
CardFlowMb string // 套餐卡流量MB
|
||||
PoolPackageFlowMb string // 套内总流量MB
|
||||
AddOnFlowMb string // 加油包总流量MB
|
||||
TotalFlowMb string // 总流量MB(套内+加油包)
|
||||
UsedFlowMb string // 已使用流量MB
|
||||
RemainFlowMb string // 剩余流量MB
|
||||
LastStatTime string // 最后流量统计时间
|
||||
PoolStatus string // 状态:0 正常、1 停用、2 锁定
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimFlowPoolColumns holds the columns for the table t_sim_flow_pool.
|
||||
var tSimFlowPoolColumns = TSimFlowPoolColumns{
|
||||
Id: "id",
|
||||
FlowPoolCode: "flow_pool_code",
|
||||
DeptId: "dept_id",
|
||||
PackageCodes: "package_codes",
|
||||
PoolPackageCode: "pool_package_code",
|
||||
CardCount: "card_count",
|
||||
CardFlowMb: "card_flow_mb",
|
||||
PoolPackageFlowMb: "pool_package_flow_mb",
|
||||
AddOnFlowMb: "add_on_flow_mb",
|
||||
TotalFlowMb: "total_flow_mb",
|
||||
UsedFlowMb: "used_flow_mb",
|
||||
RemainFlowMb: "remain_flow_mb",
|
||||
LastStatTime: "last_stat_time",
|
||||
PoolStatus: "pool_status",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimFlowPoolDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimFlowPoolDao(handlers ...gdb.ModelHandler) *TSimFlowPoolDao {
|
||||
return &TSimFlowPoolDao{
|
||||
group: "default",
|
||||
table: "t_sim_flow_pool",
|
||||
columns: tSimFlowPoolColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimFlowPoolDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimFlowPoolDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimFlowPoolDao) Columns() TSimFlowPoolColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimFlowPoolDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimFlowPoolDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimFlowPoolDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimPackageCategoryDao is the data access object for the table t_sim_package_category.
|
||||
type TSimPackageCategoryDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimPackageCategoryColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimPackageCategoryColumns defines and stores column names for the table t_sim_package_category.
|
||||
type TSimPackageCategoryColumns struct {
|
||||
Id string // 主键ID
|
||||
CategoryCode string // 套餐分类编号
|
||||
CategoryName string // 套餐分类名称
|
||||
SortNo string // 排序
|
||||
Enabled string // 是否启用:1启用,0停用
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimPackageCategoryColumns holds the columns for the table t_sim_package_category.
|
||||
var tSimPackageCategoryColumns = TSimPackageCategoryColumns{
|
||||
Id: "id",
|
||||
CategoryCode: "category_code",
|
||||
CategoryName: "category_name",
|
||||
SortNo: "sort_no",
|
||||
Enabled: "enabled",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimPackageCategoryDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimPackageCategoryDao(handlers ...gdb.ModelHandler) *TSimPackageCategoryDao {
|
||||
return &TSimPackageCategoryDao{
|
||||
group: "default",
|
||||
table: "t_sim_package_category",
|
||||
columns: tSimPackageCategoryColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimPackageCategoryDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimPackageCategoryDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimPackageCategoryDao) Columns() TSimPackageCategoryColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimPackageCategoryDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimPackageCategoryDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimPackageCategoryDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimPoolDao is the data access object for the table t_sim_pool.
|
||||
type TSimPoolDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimPoolColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimPoolColumns defines and stores column names for the table t_sim_pool.
|
||||
type TSimPoolColumns struct {
|
||||
Id string // 主键ID
|
||||
FlowPoolCode string // 流量池编号
|
||||
DeptId string // 客户编号
|
||||
PackageCodes string // 套餐编号列表(冗余)
|
||||
PoolPackageCode string // 池套餐编码
|
||||
CardCount string // 关联卡数量
|
||||
CardFlowMb string // 套餐卡流量MB
|
||||
PoolPackageFlowMb string // 套内总流量MB
|
||||
AddOnFlowMb string // 加油包总流量MB
|
||||
TotalFlowMb string // 总流量MB(套内+加油包)
|
||||
UsedFlowMb string // 已使用流量MB
|
||||
RemainFlowMb string // 剩余流量MB
|
||||
Status string // 状态:0 正常、1 停用、2 锁定
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimPoolColumns holds the columns for the table t_sim_pool.
|
||||
var tSimPoolColumns = TSimPoolColumns{
|
||||
Id: "id",
|
||||
FlowPoolCode: "flow_pool_code",
|
||||
DeptId: "dept_id",
|
||||
PackageCodes: "package_codes",
|
||||
PoolPackageCode: "pool_package_code",
|
||||
CardCount: "card_count",
|
||||
CardFlowMb: "card_flow_mb",
|
||||
PoolPackageFlowMb: "pool_package_flow_mb",
|
||||
AddOnFlowMb: "add_on_flow_mb",
|
||||
TotalFlowMb: "total_flow_mb",
|
||||
UsedFlowMb: "used_flow_mb",
|
||||
RemainFlowMb: "remain_flow_mb",
|
||||
Status: "status",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimPoolDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimPoolDao(handlers ...gdb.ModelHandler) *TSimPoolDao {
|
||||
return &TSimPoolDao{
|
||||
group: "default",
|
||||
table: "t_sim_pool",
|
||||
columns: tSimPoolColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimPoolDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimPoolDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimPoolDao) Columns() TSimPoolColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimPoolDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimPoolDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimPoolDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimPoolBindPackageDao is the data access object for the table t_sim_pool_bind_package.
|
||||
type TSimPoolBindPackageDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimPoolBindPackageColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimPoolBindPackageColumns defines and stores column names for the table t_sim_pool_bind_package.
|
||||
type TSimPoolBindPackageColumns struct {
|
||||
Id string // 主键ID
|
||||
SubscriptionNo string // 订购记录编号
|
||||
PoolNo string // 流量池编号
|
||||
DeptId string // 部门机构编号
|
||||
PackageType string // 套餐类型
|
||||
PackageCode string // 套餐编号
|
||||
PreviousPackageCode string // 变更前套餐编号
|
||||
BusinessType string // 类型 枚举
|
||||
EffectiveStatus string // 订购状态 枚举
|
||||
HandleTime string // 办理时间
|
||||
EffectiveTime string // 生效时间
|
||||
ExpectedExpireTime string // 预计到期时间
|
||||
ActualExpireTime string // 实际到期时间
|
||||
DurationMonths string // 套餐时长(月)
|
||||
GiftDurationMonths string // 赠送时长(月)
|
||||
OrderCode string // 订单编号
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimPoolBindPackageColumns holds the columns for the table t_sim_pool_bind_package.
|
||||
var tSimPoolBindPackageColumns = TSimPoolBindPackageColumns{
|
||||
Id: "id",
|
||||
SubscriptionNo: "subscription_no",
|
||||
PoolNo: "pool_no",
|
||||
DeptId: "dept_id",
|
||||
PackageType: "package_type",
|
||||
PackageCode: "package_code",
|
||||
PreviousPackageCode: "previous_package_code",
|
||||
BusinessType: "business_type",
|
||||
EffectiveStatus: "effective_status",
|
||||
HandleTime: "handle_time",
|
||||
EffectiveTime: "effective_time",
|
||||
ExpectedExpireTime: "expected_expire_time",
|
||||
ActualExpireTime: "actual_expire_time",
|
||||
DurationMonths: "duration_months",
|
||||
GiftDurationMonths: "gift_duration_months",
|
||||
OrderCode: "order_code",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimPoolBindPackageDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimPoolBindPackageDao(handlers ...gdb.ModelHandler) *TSimPoolBindPackageDao {
|
||||
return &TSimPoolBindPackageDao{
|
||||
group: "default",
|
||||
table: "t_sim_pool_bind_package",
|
||||
columns: tSimPoolBindPackageColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimPoolBindPackageDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimPoolBindPackageDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimPoolBindPackageDao) Columns() TSimPoolBindPackageColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimPoolBindPackageDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimPoolBindPackageDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimPoolBindPackageDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimPoolBindPkgLogsDao is the data access object for the table t_sim_pool_bind_pkg_logs.
|
||||
type TSimPoolBindPkgLogsDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimPoolBindPkgLogsColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimPoolBindPkgLogsColumns defines and stores column names for the table t_sim_pool_bind_pkg_logs.
|
||||
type TSimPoolBindPkgLogsColumns struct {
|
||||
Id string // 主键ID
|
||||
SubscriptionNo string // 订购记录编号
|
||||
PoolNo string // 流量池编号
|
||||
DeptId string // 部门机构编号
|
||||
PackageType string // 套餐类型
|
||||
PackageCode string // 套餐编号
|
||||
PreviousPackageCode string // 变更前套餐编号
|
||||
BusinessType string // 类型 枚举
|
||||
EffectiveStatus string // 订购状态 枚举
|
||||
HandleTime string // 办理时间
|
||||
EffectiveTime string // 生效时间
|
||||
ExpectedExpireTime string // 预计到期时间
|
||||
ActualExpireTime string // 实际到期时间
|
||||
DurationMonths string // 套餐时长(月)
|
||||
GiftDurationMonths string // 赠送时长(月)
|
||||
OrderCode string // 订单编号
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimPoolBindPkgLogsColumns holds the columns for the table t_sim_pool_bind_pkg_logs.
|
||||
var tSimPoolBindPkgLogsColumns = TSimPoolBindPkgLogsColumns{
|
||||
Id: "id",
|
||||
SubscriptionNo: "subscription_no",
|
||||
PoolNo: "pool_no",
|
||||
DeptId: "dept_id",
|
||||
PackageType: "package_type",
|
||||
PackageCode: "package_code",
|
||||
PreviousPackageCode: "previous_package_code",
|
||||
BusinessType: "business_type",
|
||||
EffectiveStatus: "effective_status",
|
||||
HandleTime: "handle_time",
|
||||
EffectiveTime: "effective_time",
|
||||
ExpectedExpireTime: "expected_expire_time",
|
||||
ActualExpireTime: "actual_expire_time",
|
||||
DurationMonths: "duration_months",
|
||||
GiftDurationMonths: "gift_duration_months",
|
||||
OrderCode: "order_code",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimPoolBindPkgLogsDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimPoolBindPkgLogsDao(handlers ...gdb.ModelHandler) *TSimPoolBindPkgLogsDao {
|
||||
return &TSimPoolBindPkgLogsDao{
|
||||
group: "default",
|
||||
table: "t_sim_pool_bind_pkg_logs",
|
||||
columns: tSimPoolBindPkgLogsColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimPoolBindPkgLogsDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimPoolBindPkgLogsDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimPoolBindPkgLogsDao) Columns() TSimPoolBindPkgLogsColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimPoolBindPkgLogsDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimPoolBindPkgLogsDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimPoolBindPkgLogsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimPoolWarnConfigDao is the data access object for the table t_sim_pool_warn_config.
|
||||
type TSimPoolWarnConfigDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimPoolWarnConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimPoolWarnConfigColumns defines and stores column names for the table t_sim_pool_warn_config.
|
||||
type TSimPoolWarnConfigColumns struct {
|
||||
Id string // 主键ID
|
||||
PoolId string // 流量池ID
|
||||
WarnLevel string // 预警等级:1提示,2注意,3警告,4危险,5紧急
|
||||
ThresholdPercent string // 阈值(例如0.7)
|
||||
WarnMethods string // 预警方式:0短信,1邮箱,2电话,3平台消息 多选逗号分隔
|
||||
WarnPhones string // 预警手机号 多个逗号分隔
|
||||
WarnEmails string // 预警邮箱 多个逗号分隔
|
||||
AutoAction string // 自动动作:0无,1限速,2断网
|
||||
IsEnabled string // 是否启用:1启用,0停用
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimPoolWarnConfigColumns holds the columns for the table t_sim_pool_warn_config.
|
||||
var tSimPoolWarnConfigColumns = TSimPoolWarnConfigColumns{
|
||||
Id: "id",
|
||||
PoolId: "pool_id",
|
||||
WarnLevel: "warn_level",
|
||||
ThresholdPercent: "threshold_percent",
|
||||
WarnMethods: "warn_methods",
|
||||
WarnPhones: "warn_phones",
|
||||
WarnEmails: "warn_emails",
|
||||
AutoAction: "auto_action",
|
||||
IsEnabled: "is_enabled",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimPoolWarnConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimPoolWarnConfigDao(handlers ...gdb.ModelHandler) *TSimPoolWarnConfigDao {
|
||||
return &TSimPoolWarnConfigDao{
|
||||
group: "default",
|
||||
table: "t_sim_pool_warn_config",
|
||||
columns: tSimPoolWarnConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimPoolWarnConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimPoolWarnConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimPoolWarnConfigDao) Columns() TSimPoolWarnConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimPoolWarnConfigDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimPoolWarnConfigDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimPoolWarnConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimPoolWarnLogDao is the data access object for the table t_sim_pool_warn_log.
|
||||
type TSimPoolWarnLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimPoolWarnLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimPoolWarnLogColumns defines and stores column names for the table t_sim_pool_warn_log.
|
||||
type TSimPoolWarnLogColumns struct {
|
||||
Id string // 主键ID
|
||||
PoolId string // 流量池ID
|
||||
WarnLevel string // 预警级别
|
||||
ThresholdPercent string // 触发阈值百分比(例如0.7)
|
||||
UsedPercent string // 实际使用百分比
|
||||
UsedFlowMb string // 触发时已用流量MB
|
||||
TotalFlowMb string // 触发时总流量MB
|
||||
WarnMethods string // 预警方式:0短信,1邮箱,2电话,3平台消息
|
||||
WarnPhones string // 预警手机号
|
||||
WarnEmails string // 预警邮箱
|
||||
WarnStatus string // 预警状态:0成功,1失败
|
||||
WarnTime string // 预警时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimPoolWarnLogColumns holds the columns for the table t_sim_pool_warn_log.
|
||||
var tSimPoolWarnLogColumns = TSimPoolWarnLogColumns{
|
||||
Id: "id",
|
||||
PoolId: "pool_id",
|
||||
WarnLevel: "warn_level",
|
||||
ThresholdPercent: "threshold_percent",
|
||||
UsedPercent: "used_percent",
|
||||
UsedFlowMb: "used_flow_mb",
|
||||
TotalFlowMb: "total_flow_mb",
|
||||
WarnMethods: "warn_methods",
|
||||
WarnPhones: "warn_phones",
|
||||
WarnEmails: "warn_emails",
|
||||
WarnStatus: "warn_status",
|
||||
WarnTime: "warn_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimPoolWarnLogDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimPoolWarnLogDao(handlers ...gdb.ModelHandler) *TSimPoolWarnLogDao {
|
||||
return &TSimPoolWarnLogDao{
|
||||
group: "default",
|
||||
table: "t_sim_pool_warn_log",
|
||||
columns: tSimPoolWarnLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimPoolWarnLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimPoolWarnLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimPoolWarnLogDao) Columns() TSimPoolWarnLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimPoolWarnLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimPoolWarnLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimPoolWarnLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimTerminalDao is the data access object for the table t_sim_terminal.
|
||||
type TSimTerminalDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimTerminalColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimTerminalColumns defines and stores column names for the table t_sim_terminal.
|
||||
type TSimTerminalColumns struct {
|
||||
Id string // 主键ID
|
||||
Iccid string // ICCID
|
||||
Msisdn string // MSISDN/卡号
|
||||
Imsi string // IMSI
|
||||
TerminalId string // 终端客户ID
|
||||
TerminalName string // 终端客户名称
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门ID
|
||||
CreatedBy string // 创建者ID
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者ID
|
||||
UpdatedAt string // 更新时间
|
||||
DeptId string // 渠道客户ID
|
||||
CurrentPackageCode string // 当前套餐编号
|
||||
}
|
||||
|
||||
// tSimTerminalColumns holds the columns for the table t_sim_terminal.
|
||||
var tSimTerminalColumns = TSimTerminalColumns{
|
||||
Id: "id",
|
||||
Iccid: "iccid",
|
||||
Msisdn: "msisdn",
|
||||
Imsi: "imsi",
|
||||
TerminalId: "terminal_id",
|
||||
TerminalName: "terminal_name",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeptId: "dept_id",
|
||||
CurrentPackageCode: "current_package_code",
|
||||
}
|
||||
|
||||
// NewTSimTerminalDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimTerminalDao(handlers ...gdb.ModelHandler) *TSimTerminalDao {
|
||||
return &TSimTerminalDao{
|
||||
group: "default",
|
||||
table: "t_sim_terminal",
|
||||
columns: tSimTerminalColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimTerminalDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimTerminalDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimTerminalDao) Columns() TSimTerminalColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimTerminalDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimTerminalDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimTerminalDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TSimUpstreamPackageDao is the data access object for the table t_sim_upstream_package.
|
||||
type TSimUpstreamPackageDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TSimUpstreamPackageColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimUpstreamPackageColumns defines and stores column names for the table t_sim_upstream_package.
|
||||
type TSimUpstreamPackageColumns struct {
|
||||
Id string // 主键
|
||||
UpPkgCode string // 上游套餐编码
|
||||
UpPkgName string // 上游套餐名称
|
||||
Operator string // 运营商:1移动,2联通,3电信
|
||||
ApnName string // APN名称
|
||||
Remark string // 备注
|
||||
TenantId string // 租户编号
|
||||
CreatedDept string // 创建部门
|
||||
CreatedAt string // 创建时间
|
||||
CreatedBy string // 创建者
|
||||
UpdatedAt string // 更新时间
|
||||
UpdatedBy string // 更新者
|
||||
}
|
||||
|
||||
// tSimUpstreamPackageColumns holds the columns for the table t_sim_upstream_package.
|
||||
var tSimUpstreamPackageColumns = TSimUpstreamPackageColumns{
|
||||
Id: "id",
|
||||
UpPkgCode: "up_pkg_code",
|
||||
UpPkgName: "up_pkg_name",
|
||||
Operator: "operator",
|
||||
ApnName: "apn_name",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedAt: "created_at",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedAt: "updated_at",
|
||||
UpdatedBy: "updated_by",
|
||||
}
|
||||
|
||||
// NewTSimUpstreamPackageDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimUpstreamPackageDao(handlers ...gdb.ModelHandler) *TSimUpstreamPackageDao {
|
||||
return &TSimUpstreamPackageDao{
|
||||
group: "default",
|
||||
table: "t_sim_upstream_package",
|
||||
columns: tSimUpstreamPackageColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimUpstreamPackageDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimUpstreamPackageDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimUpstreamPackageDao) Columns() TSimUpstreamPackageColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimUpstreamPackageDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TSimUpstreamPackageDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TSimUpstreamPackageDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TTerminalDao is the data access object for the table t_terminal.
|
||||
type TTerminalDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TTerminalColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TTerminalColumns defines and stores column names for the table t_terminal.
|
||||
type TTerminalColumns struct {
|
||||
TerminalId string // 终端客户id
|
||||
TerminalName string // 客户名称
|
||||
Leader string // 负责人
|
||||
Phone string // 联系电话
|
||||
Email string // 邮箱
|
||||
Status string // 客户状态(0正常 1停用)
|
||||
CreditCode string // 统一社会信用代码
|
||||
AreaCode string // 行政区域代码
|
||||
Address string // 地址
|
||||
FullName string // 单位全称
|
||||
Industry string // 行业
|
||||
LegalPersonName string // 法人名称
|
||||
LegalPersonIdCard string // 法人身份证号
|
||||
CompanyType string // 单位类型
|
||||
EstablishTime string // 单位成立时间
|
||||
BankName string // 开户行名称
|
||||
BankAccount string // 开户行账号
|
||||
Balance string // 账户余额
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// tTerminalColumns holds the columns for the table t_terminal.
|
||||
var tTerminalColumns = TTerminalColumns{
|
||||
TerminalId: "terminal_id",
|
||||
TerminalName: "terminal_name",
|
||||
Leader: "leader",
|
||||
Phone: "phone",
|
||||
Email: "email",
|
||||
Status: "status",
|
||||
CreditCode: "credit_code",
|
||||
AreaCode: "area_code",
|
||||
Address: "address",
|
||||
FullName: "full_name",
|
||||
Industry: "industry",
|
||||
LegalPersonName: "legal_person_name",
|
||||
LegalPersonIdCard: "legal_person_id_card",
|
||||
CompanyType: "company_type",
|
||||
EstablishTime: "establish_time",
|
||||
BankName: "bank_name",
|
||||
BankAccount: "bank_account",
|
||||
Balance: "balance",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewTTerminalDao creates and returns a new DAO object for table data access.
|
||||
func NewTTerminalDao(handlers ...gdb.ModelHandler) *TTerminalDao {
|
||||
return &TTerminalDao{
|
||||
group: "default",
|
||||
table: "t_terminal",
|
||||
columns: tTerminalColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TTerminalDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TTerminalDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TTerminalDao) Columns() TTerminalColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TTerminalDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TTerminalDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TTerminalDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TTplatformSettingDao is the data access object for the table t_tplatform_setting.
|
||||
type TTplatformSettingDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TTplatformSettingColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TTplatformSettingColumns defines and stores column names for the table t_tplatform_setting.
|
||||
type TTplatformSettingColumns struct {
|
||||
Id string // 主键ID
|
||||
SubDomain string // 二级域名前缀
|
||||
FullDomain string // 完整域名
|
||||
AppTitle string // 平台标题
|
||||
AppIcon string // 图标地址
|
||||
LoginPageTitle string // 登录页大标题
|
||||
LoginPageDescription string // 登录页描述文案
|
||||
LoginSloganImage string // 登录标语图地址
|
||||
Sort string // 排序
|
||||
Status string // 状态 0启用 1禁用
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tTplatformSettingColumns holds the columns for the table t_tplatform_setting.
|
||||
var tTplatformSettingColumns = TTplatformSettingColumns{
|
||||
Id: "id",
|
||||
SubDomain: "sub_domain",
|
||||
FullDomain: "full_domain",
|
||||
AppTitle: "app_title",
|
||||
AppIcon: "app_icon",
|
||||
LoginPageTitle: "login_page_title",
|
||||
LoginPageDescription: "login_page_description",
|
||||
LoginSloganImage: "login_slogan_image",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTTplatformSettingDao creates and returns a new DAO object for table data access.
|
||||
func NewTTplatformSettingDao(handlers ...gdb.ModelHandler) *TTplatformSettingDao {
|
||||
return &TTplatformSettingDao{
|
||||
group: "default",
|
||||
table: "t_tplatform_setting",
|
||||
columns: tTplatformSettingColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TTplatformSettingDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TTplatformSettingDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TTplatformSettingDao) Columns() TTplatformSettingColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TTplatformSettingDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TTplatformSettingDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TTplatformSettingDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TUserMessageDao is the data access object for the table t_user_message.
|
||||
type TUserMessageDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TUserMessageColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TUserMessageColumns defines and stores column names for the table t_user_message.
|
||||
type TUserMessageColumns struct {
|
||||
MessageId string // 主键ID
|
||||
MessageLogId string // 消息日志ID
|
||||
UserId string // 用户ID
|
||||
IsRead string // 是否已读 0未读 1已读
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tUserMessageColumns holds the columns for the table t_user_message.
|
||||
var tUserMessageColumns = TUserMessageColumns{
|
||||
MessageId: "message_id",
|
||||
MessageLogId: "message_log_id",
|
||||
UserId: "user_id",
|
||||
IsRead: "is_read",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTUserMessageDao creates and returns a new DAO object for table data access.
|
||||
func NewTUserMessageDao(handlers ...gdb.ModelHandler) *TUserMessageDao {
|
||||
return &TUserMessageDao{
|
||||
group: "default",
|
||||
table: "t_user_message",
|
||||
columns: tUserMessageColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TUserMessageDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TUserMessageDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TUserMessageDao) Columns() TUserMessageColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TUserMessageDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TUserMessageDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TUserMessageDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TWarnConfigDao is the data access object for the table t_warn_config.
|
||||
type TWarnConfigDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TWarnConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TWarnConfigColumns defines and stores column names for the table t_warn_config.
|
||||
type TWarnConfigColumns struct {
|
||||
Id string // 主键ID
|
||||
TenantId string // 租户ID
|
||||
BatchNo string // 批次编号
|
||||
ItemType string // 对象类型:1卡,2流量池
|
||||
ItemId string // 对象ID:单卡为t_sim_card_info.id,流量池为t_sim_flow_pool.id
|
||||
ItemCode string // 对象编码快照:ICCID/MSISDN/流量池编码
|
||||
WarnUnit string // 预警单位:1MB,2百分比,3天数,4月数
|
||||
FirstWarn string // 第一档预警阈值,单位由warn_unit决定
|
||||
SecondWarn string // 第二档预警阈值,单位由warn_unit决定
|
||||
ThirdWarn string // 第三档预警阈值,单位由warn_unit决定
|
||||
WarnMethods string // 预警方式:0短信,1邮箱,2电话,3平台消息;多选逗号分隔
|
||||
WarnPhones string // 预警手机号,多个逗号分隔
|
||||
WarnEmails string // 预警邮箱,多个逗号分隔
|
||||
AutoAction string // 自动动作:0无,2断网;第一期只保存配置不自动执行
|
||||
IsEnabled string // 是否启用:1启用,0停用
|
||||
WxTemplateId string // 微信订阅消息模板ID
|
||||
Remark string // 备注
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
AppNotifyEnabled string // 是否开启小程序预警通知:0关闭,1开启
|
||||
}
|
||||
|
||||
// tWarnConfigColumns holds the columns for the table t_warn_config.
|
||||
var tWarnConfigColumns = TWarnConfigColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
BatchNo: "batch_no",
|
||||
ItemType: "item_type",
|
||||
ItemId: "item_id",
|
||||
ItemCode: "item_code",
|
||||
WarnUnit: "warn_unit",
|
||||
FirstWarn: "first_warn",
|
||||
SecondWarn: "second_warn",
|
||||
ThirdWarn: "third_warn",
|
||||
WarnMethods: "warn_methods",
|
||||
WarnPhones: "warn_phones",
|
||||
WarnEmails: "warn_emails",
|
||||
AutoAction: "auto_action",
|
||||
IsEnabled: "is_enabled",
|
||||
WxTemplateId: "wx_template_id",
|
||||
Remark: "remark",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
AppNotifyEnabled: "app_notify_enabled",
|
||||
}
|
||||
|
||||
// NewTWarnConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewTWarnConfigDao(handlers ...gdb.ModelHandler) *TWarnConfigDao {
|
||||
return &TWarnConfigDao{
|
||||
group: "default",
|
||||
table: "t_warn_config",
|
||||
columns: tWarnConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TWarnConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TWarnConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TWarnConfigDao) Columns() TWarnConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TWarnConfigDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TWarnConfigDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TWarnConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TWarnLogDao is the data access object for the table t_warn_log.
|
||||
type TWarnLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TWarnLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TWarnLogColumns defines and stores column names for the table t_warn_log.
|
||||
type TWarnLogColumns struct {
|
||||
Id string // 主键ID
|
||||
TenantId string // 租户ID
|
||||
ConfigId string // 预警配置ID
|
||||
ItemType string // 对象类型:1单卡,2流量池
|
||||
ItemId string // 对象ID:单卡为t_sim_card_info.id,流量池为t_sim_flow_pool.id
|
||||
ItemCode string // 对象编码快照:ICCID/MSISDN/流量池编码
|
||||
WarnStage string // 触发档位:1第一档,2第二档,3第三档
|
||||
WarnLevel string // 预警级别:1提示,2注意,3警告,4危险,5紧急
|
||||
WarnUnit string // 预警单位/维度:1MB,2百分比,3天数,4月数
|
||||
ThresholdValue string // 触发阈值,单位由warn_unit决定
|
||||
ActualValue string // 触发时实际值,单位由warn_unit决定
|
||||
TotalFlowMb string // 触发时总流量MB;流量类预警使用
|
||||
RemainFlowMb string // 触发时剩余流量MB;流量类预警使用
|
||||
WarnMethods string // 实际预警方式快照
|
||||
WarnPhones string // 实际预警手机号快照
|
||||
WarnEmails string // 实际预警邮箱快照
|
||||
MessageLogId string // 平台消息ID;聚合通知时可能为空
|
||||
WarnTime string // 预警时间
|
||||
Remark string // 备注
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tWarnLogColumns holds the columns for the table t_warn_log.
|
||||
var tWarnLogColumns = TWarnLogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ConfigId: "config_id",
|
||||
ItemType: "item_type",
|
||||
ItemId: "item_id",
|
||||
ItemCode: "item_code",
|
||||
WarnStage: "warn_stage",
|
||||
WarnLevel: "warn_level",
|
||||
WarnUnit: "warn_unit",
|
||||
ThresholdValue: "threshold_value",
|
||||
ActualValue: "actual_value",
|
||||
TotalFlowMb: "total_flow_mb",
|
||||
RemainFlowMb: "remain_flow_mb",
|
||||
WarnMethods: "warn_methods",
|
||||
WarnPhones: "warn_phones",
|
||||
WarnEmails: "warn_emails",
|
||||
MessageLogId: "message_log_id",
|
||||
WarnTime: "warn_time",
|
||||
Remark: "remark",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTWarnLogDao creates and returns a new DAO object for table data access.
|
||||
func NewTWarnLogDao(handlers ...gdb.ModelHandler) *TWarnLogDao {
|
||||
return &TWarnLogDao{
|
||||
group: "default",
|
||||
table: "t_warn_log",
|
||||
columns: tWarnLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TWarnLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TWarnLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TWarnLogDao) Columns() TWarnLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TWarnLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TWarnLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TWarnLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TWoCommunicationDao is the data access object for the table t_wo_communication.
|
||||
type TWoCommunicationDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TWoCommunicationColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TWoCommunicationColumns defines and stores column names for the table t_wo_communication.
|
||||
type TWoCommunicationColumns struct {
|
||||
Id string // 主键ID
|
||||
WoNo string // 工单编号
|
||||
CommType string // 沟通类型:0回复,1反馈
|
||||
SenderDeptId string // 发送人机构ID
|
||||
SenderUserId string // 发送人用户ID
|
||||
SenderName string // 发送人姓名
|
||||
Content string // 内容
|
||||
AttachmentUrls string // 附件URL列表
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tWoCommunicationColumns holds the columns for the table t_wo_communication.
|
||||
var tWoCommunicationColumns = TWoCommunicationColumns{
|
||||
Id: "id",
|
||||
WoNo: "wo_no",
|
||||
CommType: "comm_type",
|
||||
SenderDeptId: "sender_dept_id",
|
||||
SenderUserId: "sender_user_id",
|
||||
SenderName: "sender_name",
|
||||
Content: "content",
|
||||
AttachmentUrls: "attachment_urls",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTWoCommunicationDao creates and returns a new DAO object for table data access.
|
||||
func NewTWoCommunicationDao(handlers ...gdb.ModelHandler) *TWoCommunicationDao {
|
||||
return &TWoCommunicationDao{
|
||||
group: "default",
|
||||
table: "t_wo_communication",
|
||||
columns: tWoCommunicationColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TWoCommunicationDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TWoCommunicationDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TWoCommunicationDao) Columns() TWoCommunicationColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TWoCommunicationDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TWoCommunicationDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TWoCommunicationDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TWoMainDao is the data access object for the table t_wo_main.
|
||||
type TWoMainDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TWoMainColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TWoMainColumns defines and stores column names for the table t_wo_main.
|
||||
type TWoMainColumns struct {
|
||||
Id string // 主键ID
|
||||
WoNo string // 工单编号
|
||||
WoType string // 工单类型 0卡,1模组,2设备,3订单,4余额,5提现
|
||||
RelatedId string // 关联业务ID
|
||||
Title string // 工单标题
|
||||
Content string // 问题描述
|
||||
Attachment string // 附件
|
||||
CreatorType string // 创建人类型:1终端用户,2代理商
|
||||
CreatorDeptId string // 创建机构ID
|
||||
CreatorUserId string // 创建用户ID
|
||||
CreatorName string // 创建人姓名
|
||||
CreatorPhone string // 创建人手机号
|
||||
AssignDeptId string // 分派方机构ID
|
||||
AssignUserId string // 分派人用户ID
|
||||
CurrentStatus string // 当前处理状态:1已分派,2处理中,3已解决,4已完结_关单,5已取消
|
||||
HandlerDeptId string // 处理方机构ID
|
||||
HandlerUserId string // 处理人用户ID
|
||||
FirstResponseTime string // 首次响应时间
|
||||
ResolveTime string // 确认时间
|
||||
CloseTime string // 关闭时间
|
||||
SatisfactionLevel string // 满意度:1-5分
|
||||
EvalContent string // 评价内容
|
||||
EvalTime string // 评价时间
|
||||
Remark string // 备注
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tWoMainColumns holds the columns for the table t_wo_main.
|
||||
var tWoMainColumns = TWoMainColumns{
|
||||
Id: "id",
|
||||
WoNo: "wo_no",
|
||||
WoType: "wo_type",
|
||||
RelatedId: "related_id",
|
||||
Title: "title",
|
||||
Content: "content",
|
||||
Attachment: "attachment",
|
||||
CreatorType: "creator_type",
|
||||
CreatorDeptId: "creator_dept_id",
|
||||
CreatorUserId: "creator_user_id",
|
||||
CreatorName: "creator_name",
|
||||
CreatorPhone: "creator_phone",
|
||||
AssignDeptId: "assign_dept_id",
|
||||
AssignUserId: "assign_user_id",
|
||||
CurrentStatus: "current_status",
|
||||
HandlerDeptId: "handler_dept_id",
|
||||
HandlerUserId: "handler_user_id",
|
||||
FirstResponseTime: "first_response_time",
|
||||
ResolveTime: "resolve_time",
|
||||
CloseTime: "close_time",
|
||||
SatisfactionLevel: "satisfaction_level",
|
||||
EvalContent: "eval_content",
|
||||
EvalTime: "eval_time",
|
||||
Remark: "remark",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTWoMainDao creates and returns a new DAO object for table data access.
|
||||
func NewTWoMainDao(handlers ...gdb.ModelHandler) *TWoMainDao {
|
||||
return &TWoMainDao{
|
||||
group: "default",
|
||||
table: "t_wo_main",
|
||||
columns: tWoMainColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TWoMainDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TWoMainDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TWoMainDao) Columns() TWoMainColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TWoMainDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TWoMainDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TWoMainDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TWoRecordDao is the data access object for the table t_wo_record.
|
||||
type TWoRecordDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TWoRecordColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TWoRecordColumns defines and stores column names for the table t_wo_record.
|
||||
type TWoRecordColumns struct {
|
||||
Id string // 主键ID
|
||||
WoNo string // 工单编号
|
||||
OperationType string // 操作类型:0创建,1分派,2处理,3完成,4关单,5取消
|
||||
OperationDeptId string // 操作机构ID
|
||||
OperationUserId string // 操作用户ID
|
||||
TargetDeptId string // 目标部门ID
|
||||
TargetUserId string // 目标用户ID
|
||||
BeforeStatus string // 变更前状态
|
||||
AfterStatus string // 变更后状态
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tWoRecordColumns holds the columns for the table t_wo_record.
|
||||
var tWoRecordColumns = TWoRecordColumns{
|
||||
Id: "id",
|
||||
WoNo: "wo_no",
|
||||
OperationType: "operation_type",
|
||||
OperationDeptId: "operation_dept_id",
|
||||
OperationUserId: "operation_user_id",
|
||||
TargetDeptId: "target_dept_id",
|
||||
TargetUserId: "target_user_id",
|
||||
BeforeStatus: "before_status",
|
||||
AfterStatus: "after_status",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTWoRecordDao creates and returns a new DAO object for table data access.
|
||||
func NewTWoRecordDao(handlers ...gdb.ModelHandler) *TWoRecordDao {
|
||||
return &TWoRecordDao{
|
||||
group: "default",
|
||||
table: "t_wo_record",
|
||||
columns: tWoRecordColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TWoRecordDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TWoRecordDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TWoRecordDao) Columns() TWoRecordColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TWoRecordDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TWoRecordDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TWoRecordDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TestDemoDao is the data access object for the table test_demo.
|
||||
type TestDemoDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TestDemoColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TestDemoColumns defines and stores column names for the table test_demo.
|
||||
type TestDemoColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户编号
|
||||
DeptId string // 部门id
|
||||
UserId string // 用户id
|
||||
OrderNum string // 排序号
|
||||
TestKey string // key键
|
||||
Value string // 值
|
||||
Version string // 版本
|
||||
CreatedDept string // 创建部门
|
||||
CreatedAt string // 创建时间
|
||||
CreatedBy string // 创建者
|
||||
UpdatedAt string // 更新时间
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// testDemoColumns holds the columns for the table test_demo.
|
||||
var testDemoColumns = TestDemoColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
DeptId: "dept_id",
|
||||
UserId: "user_id",
|
||||
OrderNum: "order_num",
|
||||
TestKey: "test_key",
|
||||
Value: "value",
|
||||
Version: "version",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedAt: "created_at",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedAt: "updated_at",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewTestDemoDao creates and returns a new DAO object for table data access.
|
||||
func NewTestDemoDao(handlers ...gdb.ModelHandler) *TestDemoDao {
|
||||
return &TestDemoDao{
|
||||
group: "default",
|
||||
table: "test_demo",
|
||||
columns: testDemoColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TestDemoDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TestDemoDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TestDemoDao) Columns() TestDemoColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TestDemoDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TestDemoDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TestDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// TestTreeDao is the data access object for the table test_tree.
|
||||
type TestTreeDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns TestTreeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TestTreeColumns defines and stores column names for the table test_tree.
|
||||
type TestTreeColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户编号
|
||||
ParentId string // 父id
|
||||
DeptId string // 部门id
|
||||
UserId string // 用户id
|
||||
TreeName string // 值
|
||||
Version string // 版本
|
||||
CreatedDept string // 创建部门
|
||||
CreatedAt string // 创建时间
|
||||
CreatedBy string // 创建者
|
||||
UpdatedAt string // 更新时间
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除人
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// testTreeColumns holds the columns for the table test_tree.
|
||||
var testTreeColumns = TestTreeColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ParentId: "parent_id",
|
||||
DeptId: "dept_id",
|
||||
UserId: "user_id",
|
||||
TreeName: "tree_name",
|
||||
Version: "version",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedAt: "created_at",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedAt: "updated_at",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewTestTreeDao creates and returns a new DAO object for table data access.
|
||||
func NewTestTreeDao(handlers ...gdb.ModelHandler) *TestTreeDao {
|
||||
return &TestTreeDao{
|
||||
group: "default",
|
||||
table: "test_tree",
|
||||
columns: testTreeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TestTreeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TestTreeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TestTreeDao) Columns() TestTreeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TestTreeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *TestTreeDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *TestTreeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// sysClientDao is the data access object for the table sys_client.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysClientDao struct {
|
||||
*internal.SysClientDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysClient is a globally accessible object for table sys_client operations.
|
||||
SysClient = sysClientDao{internal.NewSysClientDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// sysConfigDao is the data access object for the table sys_config.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysConfigDao struct {
|
||||
*internal.SysConfigDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysConfig is a globally accessible object for table sys_config operations.
|
||||
SysConfig = sysConfigDao{internal.NewSysConfigDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// sysDeptDao is the data access object for the table sys_dept.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysDeptDao struct {
|
||||
*internal.SysDeptDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDept is a globally accessible object for table sys_dept operations.
|
||||
SysDept = sysDeptDao{internal.NewSysDeptDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// sysDictDataDao is the data access object for the table sys_dict_data.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysDictDataDao struct {
|
||||
*internal.SysDictDataDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDictData is a globally accessible object for table sys_dict_data operations.
|
||||
SysDictData = sysDictDataDao{internal.NewSysDictDataDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// sysDictTypeDao is the data access object for the table sys_dict_type.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysDictTypeDao struct {
|
||||
*internal.SysDictTypeDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDictType is a globally accessible object for table sys_dict_type operations.
|
||||
SysDictType = sysDictTypeDao{internal.NewSysDictTypeDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao/internal"
|
||||
)
|
||||
|
||||
// sysGenTableDao is the data access object for the table sys_gen_table.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysGenTableDao struct {
|
||||
*internal.SysGenTableDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysGenTable is a globally accessible object for table sys_gen_table operations.
|
||||
SysGenTable = sysGenTableDao{internal.NewSysGenTableDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user