sysdept

package
v0.0.0-...-2921901 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDept

func AddDept(c *gin.Context)

func DelDept

func DelDept(c *gin.Context)

func GetList

func GetList(c *gin.Context)

func PatDept

func PatDept(c *gin.Context)

Types

type ExistErr

type ExistErr struct{}

func (*ExistErr) Error

func (e *ExistErr) Error() string

type Model

type Model struct {
	DeptId    int            `json:"deptId" gorm:"primaryKey;autoIncrement;"`     //部门编码
	ParentId  int            `json:"parentId" gorm:""`                            //上级部门
	DeptName  string         `json:"deptName" form:"dept_name"  gorm:"size:128;"` //部门名称
	Sort      int            `json:"sort" gorm:"size:4;"`                         //排序
	Leader    string         `json:"leader" gorm:"size:128;"`                     //负责人
	Phone     string         `json:"phone" gorm:"size:11;"`                       //手机
	Email     string         `json:"email" gorm:"size:64;"`                       //邮箱
	Status    int            `json:"status" gorm:"size:4;"`                       //状态
	DataScope string         `json:"dataScope" gorm:"-"`
	Params    string         `json:"params" gorm:"-"`
	Children  []Model        `json:"children" gorm:"-"`
	CreatedAt time.Time      `json:"createdAt" gorm:"comment:创建时间"`
	UpdatedAt time.Time      `json:"updatedAt" gorm:"comment:最后更新时间"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index;comment:删除时间"`
	CreateBy  int            `json:"createBy" gorm:"index;comment:创建者"`
	UpdateBy  int            `json:"updateBy" gorm:"index;comment:更新者"`
}

func (*Model) TableName

func (*Model) TableName() string

type Service

type Service struct{}
var SC *Service

func (*Service) AddDept

func (s *Service) AddDept(dept *Model) error

func (*Service) DelDept

func (s *Service) DelDept(ids *dto.DelIdsDto) error

func (*Service) GetList

func (s *Service) GetList(c *dto.GetListDto, list *[]Model, count *int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL