194 lines
8.1 KiB
Go
194 lines
8.1 KiB
Go
// ==========================================================================
|
|
// 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)
|
|
}
|