chore: 初始开源发布
iotlcm-upstream-chan:运营商上游通道适配服务(统一 /sim/* 协议)。 - 内联原私有依赖:yunze-public → internal/pub/(10 包 18 文件), yunze-pb/pb → internal/pb/(9 文件);Consul 注册改用官方 gogf/gf/contrib/registry/consul/v2(API 兼容) - Go module:yz-svr → git.5iot.com/iotlcm-public/iotlcm-upstream-chan - 修复 mingqian 包测试:实现重构后 `adapter.operations` 字段已移除, 测试断言按当前实现语义重写(不改产品行为) - 凭据与内部标识脱敏:MySQL/Redis/Consul 凭据、私网与生产 IP、 内网域名、真实手机号、注释里的真实 token/transid - 移除内部资产:CI 触发器、生产通道种子 SQL、真实凭据测试资源文档 - Dockerfile 改用公共基础镜像,移除写死的 registry 凭据 - 补 Apache-2.0 LICENSE,重写 README,LF 行尾 + .gitattributes
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
// 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 // 所属机构
|
||||
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",
|
||||
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,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"
|
||||
)
|
||||
|
||||
// TCustomerDao is the data access object for the table t_customer.
|
||||
type TCustomerDao 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 TCustomerColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TCustomerColumns defines and stores column names for the table t_customer.
|
||||
type TCustomerColumns struct {
|
||||
Id string // ID
|
||||
CKey string // 客户编号
|
||||
CType string // 客户类型(0:企业,1:个人)
|
||||
CName string // 客户名称
|
||||
CShortName string // 客户简称
|
||||
ContactUserName string // 联系人
|
||||
ContactPhone string // 联系电话
|
||||
LicenseNumber string // 统一社会信用代码
|
||||
RegionCode string // 行政区域代码
|
||||
Address string // 地址
|
||||
DepositAmount string // 预存金额
|
||||
CreditAmountTotal string // 已授信额度
|
||||
CreditAmountUsed string // 已使用授信额度
|
||||
DeptId string // 所属机构
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tCustomerColumns holds the columns for the table t_customer.
|
||||
var tCustomerColumns = TCustomerColumns{
|
||||
Id: "id",
|
||||
CKey: "c_key",
|
||||
CType: "c_type",
|
||||
CName: "c_name",
|
||||
CShortName: "c_short_name",
|
||||
ContactUserName: "contact_user_name",
|
||||
ContactPhone: "contact_phone",
|
||||
LicenseNumber: "license_number",
|
||||
RegionCode: "region_code",
|
||||
Address: "address",
|
||||
DepositAmount: "deposit_amount",
|
||||
CreditAmountTotal: "credit_amount_total",
|
||||
CreditAmountUsed: "credit_amount_used",
|
||||
DeptId: "dept_id",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTCustomerDao creates and returns a new DAO object for table data access.
|
||||
func NewTCustomerDao(handlers ...gdb.ModelHandler) *TCustomerDao {
|
||||
return &TCustomerDao{
|
||||
group: "default",
|
||||
table: "t_customer",
|
||||
columns: tCustomerColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TCustomerDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TCustomerDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TCustomerDao) Columns() TCustomerColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TCustomerDao) 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 *TCustomerDao) 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 *TCustomerDao) 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"
|
||||
)
|
||||
|
||||
// TSimAgentPackageDao is the data access object for the table t_sim_agent_package.
|
||||
type TSimAgentPackageDao 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 TSimAgentPackageColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimAgentPackageColumns defines and stores column names for the table t_sim_agent_package.
|
||||
type TSimAgentPackageColumns struct {
|
||||
Id string // ID
|
||||
PackageKey string // 套餐分类编码
|
||||
PackageName string // 套餐分类名称
|
||||
ParentPackageKey string // 上级套餐分类编码
|
||||
PackageStatus string // 是否启用(0:未启用,1启用)
|
||||
BillingMethod string // 计费方式(0:月,1:季,2:年)
|
||||
ChannelPrice string // 渠道价格
|
||||
MonthlyFee string // 月租费
|
||||
PackageDataMb string // 套餐流量(MB)
|
||||
PackageDataGb string // 套餐流量(GB)
|
||||
ValidityPeriod string // 有效期
|
||||
Description string // 描述信息
|
||||
OrderNum string // 排序
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimAgentPackageColumns holds the columns for the table t_sim_agent_package.
|
||||
var tSimAgentPackageColumns = TSimAgentPackageColumns{
|
||||
Id: "id",
|
||||
PackageKey: "package_key",
|
||||
PackageName: "package_name",
|
||||
ParentPackageKey: "parent_package_key",
|
||||
PackageStatus: "package_status",
|
||||
BillingMethod: "billing_method",
|
||||
ChannelPrice: "channel_price",
|
||||
MonthlyFee: "monthly_fee",
|
||||
PackageDataMb: "package_data_mb",
|
||||
PackageDataGb: "package_data_gb",
|
||||
ValidityPeriod: "validity_period",
|
||||
Description: "description",
|
||||
OrderNum: "order_num",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimAgentPackageDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimAgentPackageDao(handlers ...gdb.ModelHandler) *TSimAgentPackageDao {
|
||||
return &TSimAgentPackageDao{
|
||||
group: "default",
|
||||
table: "t_sim_agent_package",
|
||||
columns: tSimAgentPackageColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimAgentPackageDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimAgentPackageDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimAgentPackageDao) Columns() TSimAgentPackageColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimAgentPackageDao) 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 *TSimAgentPackageDao) 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 *TSimAgentPackageDao) 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"
|
||||
)
|
||||
|
||||
// TSimAgentPacketDao is the data access object for the table t_sim_agent_packet.
|
||||
type TSimAgentPacketDao 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 TSimAgentPacketColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TSimAgentPacketColumns defines and stores column names for the table t_sim_agent_packet.
|
||||
type TSimAgentPacketColumns struct {
|
||||
Id string // ID
|
||||
PackageKey string // 套餐分类编码
|
||||
PacketKey string // 套餐编码
|
||||
PacketName string // 套餐名称
|
||||
ValidityPeriod string // 套餐有效期(月份)
|
||||
PacketStatus string // 是否启用(0:未启用,1启用)
|
||||
DiscountPercent string // 折扣率(百分比)
|
||||
Description string // 描述信息
|
||||
TenantId string // 租户ID
|
||||
CreatedDept string // 创建部门
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedBy string // 更新者
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// tSimAgentPacketColumns holds the columns for the table t_sim_agent_packet.
|
||||
var tSimAgentPacketColumns = TSimAgentPacketColumns{
|
||||
Id: "id",
|
||||
PackageKey: "package_key",
|
||||
PacketKey: "packet_key",
|
||||
PacketName: "packet_name",
|
||||
ValidityPeriod: "validity_period",
|
||||
PacketStatus: "packet_status",
|
||||
DiscountPercent: "discount_percent",
|
||||
Description: "description",
|
||||
TenantId: "tenant_id",
|
||||
CreatedDept: "created_dept",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedBy: "updated_by",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewTSimAgentPacketDao creates and returns a new DAO object for table data access.
|
||||
func NewTSimAgentPacketDao(handlers ...gdb.ModelHandler) *TSimAgentPacketDao {
|
||||
return &TSimAgentPacketDao{
|
||||
group: "default",
|
||||
table: "t_sim_agent_packet",
|
||||
columns: tSimAgentPacketColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TSimAgentPacketDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TSimAgentPacketDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TSimAgentPacketDao) Columns() TSimAgentPacketColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TSimAgentPacketDao) 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 *TSimAgentPacketDao) 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 *TSimAgentPacketDao) 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,193 @@
|
||||
// ==========================================================================
|
||||
// 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
|
||||
Msisdn string // SIM号码
|
||||
Iccid string // SIM卡号
|
||||
Imsi string // SIM识别码
|
||||
Imei string // IMEI
|
||||
OpenDate string // 开卡日期(运营商)
|
||||
ActivateDate string // 激活时间(运营商)
|
||||
AllocationBatch string // 划拨批次
|
||||
AllocationDate string // 划拨日期
|
||||
ChanKey string // 通道编号
|
||||
IsPool string // 是否流量池(0:否,1:是)
|
||||
PoolKey string // 流量池编号
|
||||
BatchKey string // 入库批次
|
||||
BatchDate string // 入库日期
|
||||
PackageKey string // 套餐分类编码
|
||||
CurrPacketKey string // 当前套餐编码
|
||||
AllowPacketChange string // 是否允许更改套餐(0:否 1:是)
|
||||
CardStatus string // 卡状态
|
||||
ValidityPeriod string // 有效期(月份)
|
||||
ExpiryDate string // 套餐到期日期
|
||||
UpstreamExpiryDate string // 上游到期时间(运营商)
|
||||
IpType string // IP版本(人工录入)
|
||||
NetModel string // 网络模式(人工录入)
|
||||
RegionCode string // 行政区域代码(省市)
|
||||
HasOffNet string // 是否开启达量断网
|
||||
OffNetQuota string // 达量断网阈值(MB)
|
||||
OffNetExpiryDate string // 达量断网过期时间
|
||||
AgentShowField string // 客户展示字段设置
|
||||
AgentShowValue string // 客户展示字段数据
|
||||
HasTestPeriod string // 是否有测试期(0:无,1:有)
|
||||
TestPeriod string // 测试期(天)
|
||||
TestPeriodExpiryDate string // 测试期过期日期
|
||||
HasSilentPeriod string // 是否有沉默期(0:无,1:有)
|
||||
SilentPeriod string // 沉默期(月)
|
||||
SilentPeriodExpiryDate string // 沉默期过期日期
|
||||
HasAdditional string // 是否有附加费用(0:无 1:有)
|
||||
AdditionalMultiplier string // 附加费用倍数
|
||||
AdditionalAmount string // 附加金额
|
||||
DataService string // 数据服务(0:关闭 1:开启)
|
||||
DataTotalAmount string // 套餐流量(MB)
|
||||
DataUseAmount string // 已用流量(MB)
|
||||
SmsService string // 短信服务(0:关闭 1:开启)
|
||||
SmsTotalAmount string // 套餐短信数量
|
||||
SmsUseAmount string // 已用短信数量
|
||||
VoiceService string // 语音服务(0:关闭 1:开启)
|
||||
VoiceTotalAmount string // 套餐通话分钟数
|
||||
VoiceUseAmount string // 已用通话分钟数
|
||||
IntlRoamingService string // 国际漫游服务(0:关闭 1:开启)
|
||||
IntlRoamingTotalAmount string // 套餐国际漫游流量(MB)
|
||||
IntlRoamingUseAmount string // 已用国际漫游流量(MB)
|
||||
Description string // 描述信息
|
||||
DeptId 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",
|
||||
Msisdn: "msisdn",
|
||||
Iccid: "iccid",
|
||||
Imsi: "imsi",
|
||||
Imei: "imei",
|
||||
OpenDate: "open_date",
|
||||
ActivateDate: "activate_date",
|
||||
AllocationBatch: "allocation_batch",
|
||||
AllocationDate: "allocation_date",
|
||||
ChanKey: "chan_key",
|
||||
IsPool: "is_pool",
|
||||
PoolKey: "pool_key",
|
||||
BatchKey: "batch_key",
|
||||
BatchDate: "batch_date",
|
||||
PackageKey: "package_key",
|
||||
CurrPacketKey: "curr_packet_key",
|
||||
AllowPacketChange: "allow_packet_change",
|
||||
CardStatus: "card_status",
|
||||
ValidityPeriod: "validity_period",
|
||||
ExpiryDate: "expiry_date",
|
||||
UpstreamExpiryDate: "upstream_expiry_date",
|
||||
IpType: "ip_type",
|
||||
NetModel: "net_model",
|
||||
RegionCode: "region_code",
|
||||
HasOffNet: "has_off_net",
|
||||
OffNetQuota: "off_net_quota",
|
||||
OffNetExpiryDate: "off_net_expiry_date",
|
||||
AgentShowField: "agent_show_field",
|
||||
AgentShowValue: "agent_show_value",
|
||||
HasTestPeriod: "has_test_period",
|
||||
TestPeriod: "test_period",
|
||||
TestPeriodExpiryDate: "test_period_expiry_date",
|
||||
HasSilentPeriod: "has_silent_period",
|
||||
SilentPeriod: "silent_period",
|
||||
SilentPeriodExpiryDate: "silent_period_expiry_date",
|
||||
HasAdditional: "has_additional",
|
||||
AdditionalMultiplier: "additional_multiplier",
|
||||
AdditionalAmount: "additional_amount",
|
||||
DataService: "data_service",
|
||||
DataTotalAmount: "data_total_amount",
|
||||
DataUseAmount: "data_use_amount",
|
||||
SmsService: "sms_service",
|
||||
SmsTotalAmount: "sms_total_amount",
|
||||
SmsUseAmount: "sms_use_amount",
|
||||
VoiceService: "voice_service",
|
||||
VoiceTotalAmount: "voice_total_amount",
|
||||
VoiceUseAmount: "voice_use_amount",
|
||||
IntlRoamingService: "intl_roaming_service",
|
||||
IntlRoamingTotalAmount: "intl_roaming_total_amount",
|
||||
IntlRoamingUseAmount: "intl_roaming_use_amount",
|
||||
Description: "description",
|
||||
DeptId: "dept_id",
|
||||
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,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"
|
||||
)
|
||||
|
||||
// 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启用)
|
||||
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",
|
||||
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,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"
|
||||
)
|
||||
|
||||
// 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启用)
|
||||
ChanAlias string // 通道别名
|
||||
RegionCode string // 通道行政区域代码(省市)
|
||||
AppKey string // 应用标识
|
||||
AppSecret string // 应用密钥
|
||||
AccessToken string // 接口调用凭证
|
||||
AccessTokenCreated string // 凭证申请时间
|
||||
AccessTokenExpire string // 凭证过期时间
|
||||
RefreshToken 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",
|
||||
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",
|
||||
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,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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tApiDao is the data access object for the table t_api.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tApiDao struct {
|
||||
*internal.TApiDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TApi is a globally accessible object for table t_api operations.
|
||||
TApi = tApiDao{internal.NewTApiDao()}
|
||||
)
|
||||
|
||||
// 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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tCustomerDao is the data access object for the table t_customer.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tCustomerDao struct {
|
||||
*internal.TCustomerDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TCustomer is a globally accessible object for table t_customer operations.
|
||||
TCustomer = tCustomerDao{internal.NewTCustomerDao()}
|
||||
)
|
||||
|
||||
// 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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tSimAgentPackageDao is the data access object for the table t_sim_agent_package.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tSimAgentPackageDao struct {
|
||||
*internal.TSimAgentPackageDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TSimAgentPackage is a globally accessible object for table t_sim_agent_package operations.
|
||||
TSimAgentPackage = tSimAgentPackageDao{internal.NewTSimAgentPackageDao()}
|
||||
)
|
||||
|
||||
// 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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tSimAgentPacketDao is the data access object for the table t_sim_agent_packet.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tSimAgentPacketDao struct {
|
||||
*internal.TSimAgentPacketDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TSimAgentPacket is a globally accessible object for table t_sim_agent_packet operations.
|
||||
TSimAgentPacket = tSimAgentPacketDao{internal.NewTSimAgentPacketDao()}
|
||||
)
|
||||
|
||||
// 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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tSimCardInfoDao is the data access object for the table t_sim_card_info.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tSimCardInfoDao struct {
|
||||
*internal.TSimCardInfoDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TSimCardInfo is a globally accessible object for table t_sim_card_info operations.
|
||||
TSimCardInfo = tSimCardInfoDao{internal.NewTSimCardInfoDao()}
|
||||
)
|
||||
|
||||
// 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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tSimChannelTemplateDao is the data access object for the table t_sim_channel_template.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tSimChannelTemplateDao struct {
|
||||
*internal.TSimChannelTemplateDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TSimChannelTemplate is a globally accessible object for table t_sim_channel_template operations.
|
||||
TSimChannelTemplate = tSimChannelTemplateDao{internal.NewTSimChannelTemplateDao()}
|
||||
)
|
||||
|
||||
// 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-upstream-chan/internal/dao/internal"
|
||||
)
|
||||
|
||||
// tSimChannelsDao is the data access object for the table t_sim_channels.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type tSimChannelsDao struct {
|
||||
*internal.TSimChannelsDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TSimChannels is a globally accessible object for table t_sim_channels operations.
|
||||
TSimChannels = tSimChannelsDao{internal.NewTSimChannelsDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Reference in New Issue
Block a user