12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- // ==========================================================================
- // 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"
- )
- // YoungeeContractInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
- type YoungeeContractInfoDao 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 YoungeeContractInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // YoungeeContractInfoColumns defines and stores column names for table youngee_contract_info.
- type YoungeeContractInfoColumns struct {
- ContractId string // 合约id
- TaskId string // 任务id
- ProjectId string // 任务所属项目id
- BreakType string // 违约类型(4类严重违约):1(脚本)2(初稿)3(链接)4(数据)
- SettlementAmount string // 应结算金额
- BreakAt string // 违约时间
- HandleAt string // 处理时间
- TerminateAt string // 解约申请时间
- DefaultStatus string // 违约处理状态1-5分别表示为违约、已重新上传、解约待处理、解约已处理(驳回)、解约已处理(解约)
- }
- // youngeeContractInfoColumns holds the columns for table youngee_contract_info.
- var youngeeContractInfoColumns = YoungeeContractInfoColumns{
- ContractId: "contract_id",
- TaskId: "task_id",
- ProjectId: "project_id",
- BreakType: "break_type",
- SettlementAmount: "settlement_amount",
- BreakAt: "break_at",
- HandleAt: "handle_at",
- TerminateAt: "terminate_at",
- DefaultStatus: "default_status",
- }
- // NewYoungeeContractInfoDao creates and returns a new DAO object for table data access.
- func NewYoungeeContractInfoDao() *YoungeeContractInfoDao {
- return &YoungeeContractInfoDao{
- Group: "default",
- Table: "youngee_contract_info",
- Columns: youngeeContractInfoColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *YoungeeContractInfoDao) 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 *YoungeeContractInfoDao) 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 *YoungeeContractInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|