| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- // ==========================================================================
- // Code generated by GoFrame CLI tool. DO NOT EDIT.
- // ==========================================================================
- package internal
- import (
- "github.com/gogf/gf/database/gdb"
- "github.com/gogf/gf/frame/g"
- "github.com/gogf/gf/frame/gmvc"
- )
- // SysDeptDao is the manager for logic model data accessing and custom defined data operations functions management.
- type SysDeptDao struct {
- gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
- C sysDeptColumns // C is the short type for Columns, which contains all the column names of Table for convenient usage.
- DB gdb.DB // DB is the raw underlying database management object.
- Table string // Table is the underlying table name of the DAO.
- }
- // SysDeptColumns defines and stores column names for table sys_dept.
- type sysDeptColumns struct {
- DeptId string // 部门id
- ParentId string // 父部门id
- Ancestors string // 祖级列表
- DeptName string // 部门名称
- OrderNum string // 显示顺序
- Leader string // 负责人
- Phone string // 联系电话
- Email string // 邮箱
- Status string // 部门状态(0正常 1停用)
- DelFlag string // 删除标志(0代表存在 2代表删除)
- CreatedBy string // 创建人
- UpdatedBy string // 修改人
- CreatedAt string // 创建时间
- UpdatedAt string // 修改时间
- DeletedAt string // 删除时间
- }
- // NewSysDeptDao creates and returns a new DAO object for table data access.
- func NewSysDeptDao() *SysDeptDao {
- columns := sysDeptColumns{
- DeptId: "dept_id",
- ParentId: "parent_id",
- Ancestors: "ancestors",
- DeptName: "dept_name",
- OrderNum: "order_num",
- Leader: "leader",
- Phone: "phone",
- Email: "email",
- Status: "status",
- DelFlag: "del_flag",
- CreatedBy: "created_by",
- UpdatedBy: "updated_by",
- CreatedAt: "created_at",
- UpdatedAt: "updated_at",
- DeletedAt: "deleted_at",
- }
- return &SysDeptDao{
- C: columns,
- M: g.DB("default").Model("sys_dept").Safe(),
- DB: g.DB("default"),
- Table: "sys_dept",
- }
- }
|