| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- // ==========================================================================
- // 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"
- )
- // SysPostDao is the manager for logic model data accessing and custom defined data operations functions management.
- type SysPostDao struct {
- gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
- C sysPostColumns // 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.
- }
- // SysPostColumns defines and stores column names for table sys_post.
- type sysPostColumns struct {
- PostId string // 岗位ID
- PostCode string // 岗位编码
- PostName string // 岗位名称
- PostSort string // 显示顺序
- Status string // 状态(0正常 1停用)
- Remark string // 备注
- CreatedBy string // 创建人
- UpdatedBy string // 修改人
- CreatedAt string // 创建时间
- UpdatedAt string // 修改时间
- DeletedAt string // 删除时间
- }
- // NewSysPostDao creates and returns a new DAO object for table data access.
- func NewSysPostDao() *SysPostDao {
- columns := sysPostColumns{
- PostId: "post_id",
- PostCode: "post_code",
- PostName: "post_name",
- PostSort: "post_sort",
- Status: "status",
- Remark: "remark",
- CreatedBy: "created_by",
- UpdatedBy: "updated_by",
- CreatedAt: "created_at",
- UpdatedAt: "updated_at",
- DeletedAt: "deleted_at",
- }
- return &SysPostDao{
- C: columns,
- M: g.DB("default").Model("sys_post").Safe(),
- DB: g.DB("default"),
- Table: "sys_post",
- }
- }
|