1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- // ==========================================================================
- // 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"
- )
- // YounggeeInvoiceInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
- type YounggeeInvoiceInfoDao 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 YounggeeInvoiceInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // YounggeeInvoiceInfoColumns defines and stores column names for table younggee_invoice_info.
- type YounggeeInvoiceInfoColumns struct {
- InvoiceId string // 发票信息id
- EnterpriseId string // 企业id
- HeadType string // 抬头类型
- InvoiceHeader string // 发票抬头
- InvoiceType string // 发票类型
- TaxCode string // 税务登记证号/统一社会信用代码
- Bank string // 基本户开户银行
- BankCardNumber string // 基本户开户银行账号
- RegisteredAddress string // 企业注册地址
- RegisteredPhone string // 企业注册电话
- UpdateAt string // 更新时间
- }
- // younggeeInvoiceInfoColumns holds the columns for table younggee_invoice_info.
- var younggeeInvoiceInfoColumns = YounggeeInvoiceInfoColumns{
- InvoiceId: "invoice_id",
- EnterpriseId: "enterprise_id",
- HeadType: "head_type",
- InvoiceHeader: "invoice_header",
- InvoiceType: "invoice_type",
- TaxCode: "tax_code",
- Bank: "bank",
- BankCardNumber: "bank_card_number",
- RegisteredAddress: "registered_address",
- RegisteredPhone: "registered_phone",
- UpdateAt: "update_at",
- }
- // NewYounggeeInvoiceInfoDao creates and returns a new DAO object for table data access.
- func NewYounggeeInvoiceInfoDao() *YounggeeInvoiceInfoDao {
- return &YounggeeInvoiceInfoDao{
- Group: "default",
- Table: "younggee_invoice_info",
- Columns: younggeeInvoiceInfoColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *YounggeeInvoiceInfoDao) 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 *YounggeeInvoiceInfoDao) 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 *YounggeeInvoiceInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|