package user import ( "SciencesServer/app/basic/config" "SciencesServer/app/service" ) type Instance struct{ *service.SessionEnterprise } type InstanceHandle func(enterprise *service.SessionEnterprise) *Instance type InstanceBasic struct { Avatar string `json:"avatar"` // 头像 Name string `json:"name"` // 名称 Email string `json:"email"` // 邮箱 } type ( // InstancePerfectParams 完善信息参数 InstancePerfectParams struct { *InstanceBasic *config.Area } ) func (c *Instance) User() { } // Perfect 完善信息 func (c *Instance) Perfect(params *InstancePerfectParams) { } func NewInstance() InstanceHandle { return func(enterprise *service.SessionEnterprise) *Instance { return &Instance{enterprise} } }