co_model

package
v0.1.99 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Company

type Company struct {
	Id            int64  `json:"id"             description:"ID"`
	Name          string `` /* 126-byte string literal not displayed */
	ContactName   string `` /* 154-byte string literal not displayed */
	ContactMobile string `` /* 205-byte string literal not displayed */
	Remark        string `json:"remark"         description:"备注"`
}

type CompanyListRes

type CompanyListRes sys_model.CollectRes[*CompanyRes]

type CompanyRes

type CompanyRes struct {
	co_entity.Company
	AdminUser *EmployeeRes `json:"adminUser"`
}

type Config

type Config struct {
	DB                             gdb.DB            `p:"-" dc:"数据库连接"`
	AllowEmptyNo                   bool              `p:"allowEmptyNo" dc:"允许员工工号为空" default:"false"`
	IsCreateDefaultEmployeeAndRole bool              `p:"isCreateDefaultEmployeeAndRole" dc:"是否创建默认员工和角色"`
	HardDeleteWaitAt               int64             `p:"hardDeleteWaitAt" dc:"硬删除等待时限,单位/小时" default:"12"`
	KeyIndex                       string            `p:"keyIndex" dc:"配置索引"`
	RoutePrefix                    string            `p:"routePrefix" dc:"路由前缀"`
	StoragePath                    string            `p:"storagePath" dc:"资源存储路径"`
	UserType                       sys_enum.UserType `p:"userType" dc:"用户类型"`
	Identifier                     Identifier        `p:"identifier" dc:"标识符"`
	TableName                      TableName         `p:"tableName" dc:"模块表名"`
}

type Employee

type Employee struct {
	Id          int64       `json:"id"           description:"ID,保持与USERID一致"`
	No          string      `json:"no"           v:"max-length:16#工号长度超出限定16字符" description:"工号"`
	Avatar      string      `json:"avatar"       description:"头像"`
	Name        string      `json:"name"         v:"required|max-length:16#名称不能为空|工号长度超出限定16字符" description:"姓名"`
	Mobile      string      `json:"mobile"       v:"phone#手机号校验失败" description:"手机号"`
	State       int         `` /* 134-byte string literal not displayed */
	UnionMainId int64       `json:"unionMainId"  v:"required|请选择员工归属主体" description:"所属主体"`
	HiredAt     *gtime.Time `json:"hiredAt"      v:"date-format:Y-m-d#入职日期" description:"入职日期"`
}

type EmployeeListRes

type EmployeeListRes sys_model.CollectRes[*EmployeeRes]

type EmployeeRes

type EmployeeRes struct {
	co_entity.CompanyEmployee
	User   EmployeeUser             `orm:"with:id" json:"user"`
	Detail sys_entity.SysUserDetail `orm:"with:id" json:"detail"`
}

type EmployeeUser

type EmployeeUser struct {
	g.Meta   `orm:"table:sys_user"`
	Id       int64  `json:"id"           description:"ID,保持与USERID一致"`
	Username string `json:"username"  description:"账号"`
	State    int    `json:"state"     description:"状态:0未激活、1正常、-1封号、-2异常、-3已注销"`
}

type Identifier

type Identifier struct {
	Company    string `p:"company" dc:"公司标识符"`
	Employee   string `p:"employee" dc:"员工标识符"`
	Team       string `p:"team" dc:"团队标识符"`
	TeamMember string `p:"teamMember" dc:"团队成员标识符"`
}

type MyCompanyRes

type MyCompanyRes co_entity.Company

type MyProfileRes

type MyProfileRes struct {
	User     *sys_model.SysUser `json:"user" description:"员工信息"`
	Employee *EmployeeRes       `json:"employee" description:"员工信息"`
}

type MyTeamListRes

type MyTeamListRes []MyTeamRes

type MyTeamRes

type MyTeamRes struct {
	TeamRes
	EmployeeListRes `json:"memberItems" description:"团队或小组成员"`
}

type TableName

type TableName struct {
	Company    string `p:"company" dc:"公司表名"`
	Employee   string `p:"employee" dc:"员工表名"`
	Team       string `p:"team" dc:"团队表名"`
	TeamMember string `p:"teamMember" dc:"团队成员表名"`
}

type Team

type Team struct {
	Id                int64  `json:"id"                description:"ID"`
	Name              string `` /* 162-byte string literal not displayed */
	OwnerEmployeeId   int64  `json:"ownerEmployeeId"   description:"团队所有者/业务总监/业务经理/团队队长"`
	CaptainEmployeeId int64  `json:"captainEmployeeId" description:"团队队长编号/小组组长"`
	ParentId          int64  `json:"parentId" description:"团队或小组父级ID"`
	Remark            string `json:"remark"            description:"备注"`
}

type TeamListRes

type TeamListRes sys_model.CollectRes[*TeamRes]

type TeamMemberListRes

type TeamMemberListRes sys_model.CollectRes[*TeamMemberRes]

type TeamMemberRes added in v0.1.99

type TeamMemberRes struct {
	co_entity.CompanyTeamMember
	Employee   *EmployeeRes `json:"employee"   description:"成员"`
	InviteUser *EmployeeRes `json:"inviteUser" description:"邀约人"`
	UnionMain  *CompanyRes  `json:"unionMain"  description:"关联主体"`
}

type TeamRes

type TeamRes struct {
	co_entity.CompanyTeam
	Owner     *EmployeeRes `json:"owner" dc:"团队所有者/业务总监/业务经理/团队队长"`
	Captain   *EmployeeRes `json:"captain" dc:"团队队长编号/小组组长"`
	UnionMain *CompanyRes  `json:"unionMain" dc:"关联主体"`
	Parent    *TeamRes     `json:"parent" dc:"团队或小组父级ID"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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