123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- // ==========================================================================
- // Code generated by GoFrame CLI tool. DO NOT EDIT.
- // ==========================================================================
- package internal
- import (
- "context"
- "github.com/gogf/gf/database/gdb"
- "github.com/gogf/gf/frame/g"
- )
- // YounggeeTalentBankDao is the manager for logic model data accessing and custom defined data operations functions management.
- type YounggeeTalentBankDao struct {
- Table string // Table is the underlying table name of the DAO.
- Group string // Group is the database configuration group name of current DAO.
- Columns YounggeeTalentBankColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // YounggeeTalentBankColumns defines and stores column names for table younggee_talent_bank.
- type YounggeeTalentBankColumns struct {
- Id string // id
- TalentId string // 达人id,取younggee_talent_info表中的id字段值
- Name string // 户主姓名
- Phone string // 手机号
- Bank string // 银行
- BankCardNumber string // 银行卡号
- BankOpenAddress string // 开户地址区域码,取info_region表中的self_code字段值
- AlipayNumber string // 支付宝账号
- AlipayRealName string // 支付宝真实姓名
- AlipayCardId string // 支付宝身份证号
- BankCardId string // 银行卡身份证号
- CreateAt string //
- UpdateAt string //
- }
- // younggeeTalentBankColumns holds the columns for table younggee_talent_bank.
- var younggeeTalentBankColumns = YounggeeTalentBankColumns{
- Id: "id",
- TalentId: "talent_id",
- Name: "name",
- Phone: "phone",
- Bank: "bank",
- BankCardNumber: "bank_card_number",
- BankOpenAddress: "bank_open_address",
- AlipayNumber: "alipay_number",
- AlipayRealName: "alipay_real_name",
- AlipayCardId: "alipay_card_id",
- BankCardId: "bank_card_id",
- CreateAt: "create_at",
- UpdateAt: "update_at",
- }
- // NewYounggeeTalentBankDao creates and returns a new DAO object for table data access.
- func NewYounggeeTalentBankDao() *YounggeeTalentBankDao {
- return &YounggeeTalentBankDao{
- Group: "default",
- Table: "younggee_talent_bank",
- Columns: younggeeTalentBankColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *YounggeeTalentBankDao) DB() gdb.DB {
- return g.DB(dao.Group)
- }
- // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
- func (dao *YounggeeTalentBankDao) Ctx(ctx context.Context) *gdb.Model {
- return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
- }
- // Transaction wraps the transaction logic using function f.
- // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
- // It commits the transaction and returns nil if function f returns nil.
- //
- // Note that, you should not Commit or Rollback the transaction in function f
- // as it is automatically handled by this function.
- func (dao *YounggeeTalentBankDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|