models

package
v0.0.0-...-c9b56a8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCompetitionReq

type AddCompetitionReq struct {
	Name        string
	Description string
}

添加比赛 返回的json中的信息仅需包含在首屏中展示的简略信息 请求,包括比赛信息

type AddCompetitionRes

type AddCompetitionRes struct {
	Result string
}

响应,返回一个字符串,说明成功或失败

type AddCompetitionTypeReq

type AddCompetitionTypeReq struct {
	Name        string
	Description string
}

添加比赛类型 请求,包括比赛类型名称和介绍

type AddCompetitionTypeRes

type AddCompetitionTypeRes struct {
	Result string
}

响应,返回一个字符串,说明成功或失败

type AddProjectReq

type AddProjectReq struct {
	TypeName         string
	Name             string
	DescribeSimple   string
	DescribeDetail   string
	LinkURL          string
	EndTime          time.Time
	CompetitionNames []string //传入比赛名称数组
	PositionNames    []string
}

添加项目 请求包括:创建者ID,类别ID,

type AddProjectRes

type AddProjectRes struct {
	IsFailed  bool
	ProjectID uint
}

type Award

type Award struct {
	CompetitionID int64
	//比赛名称
	CompetitionName string
	//奖项名次, 如一等奖/二等奖/特等奖等,内容前端固定,仅可选择
	AwardRanking string
	//奖项证明链接
	ProveImgURL string
}

type CommentService

type CommentService struct {
	// contains filtered or unexported fields
}

func NewCommentService

func NewCommentService(db *gorm.DB) *CommentService

返回一个带有保存了数据的数据库实例的服务对象而所有值为默认值的服务实例; 由于RegisterService函数的参数需要是指针,所以本函数返回指针类型

func (*CommentService) CreateComment

func (c *CommentService) CreateComment(ctx *rpc.Context, req *CreateCommentReq, res *CreateCommentRes) (err error)

type CommentSimple

type CommentSimple struct {
	CreatorName string
	Content     string
}

type CompetitionService

type CompetitionService struct {
	// contains filtered or unexported fields
}

func NewCompetitionService

func NewCompetitionService(db *gorm.DB) *CompetitionService

返回一个带有保存了数据的数据库实例的服务对象而所有值为默认值的服务实例; 由于RegisterService函数的参数需要是指针,所以本函数返回指针类型

func (*CompetitionService) AddCompetition

func (c *CompetitionService) AddCompetition(ctx *rpc.Context, req *AddCompetitionReq, res *AddCompetitionRes) error

添加比赛

func (*CompetitionService) AddCompetitionType

func (c *CompetitionService) AddCompetitionType(ctx *rpc.Context,
	req *AddCompetitionTypeReq, res *AddCompetitionTypeRes) error

添加比赛类型

func (*CompetitionService) GetCompetition

func (c *CompetitionService) GetCompetition(ctx *rpc.Context, req *GetCompetitionReq, res *GetCompetitionRes) error

获取所有比赛的信息

func (*CompetitionService) GetCompetitionNames

func (c *CompetitionService) GetCompetitionNames(ctx *rpc.Context,
	req *GetCompetitionNamesReq, res *GetCompetitionNamesRes) error

获取所有比赛的名称

func (*CompetitionService) GetCompetitionTypes

func (c *CompetitionService) GetCompetitionTypes(ctx *rpc.Context,
	req *GetCompetitionTypesReq, res *GetCompetitionTypesRes) error

获取所有比赛的类型

type ConversationService

type ConversationService struct {
	// contains filtered or unexported fields
}

func NewConversationService

func NewConversationService(db *gorm.DB) *ConversationService

返回一个带有保存了数据的数据库实例的服务对象而所有值为默认值的服务实例; 由于RegisterService函数的参数需要是指针,所以本函数返回指针类型

type CreateCommentReq

type CreateCommentReq struct {
	//项目ID
	ProjectID int64
	//评论内容
	Content string
}

创建评论

type CreateCommentRes

type CreateCommentRes struct {
	IsFailed bool
}

type CreatePositionTemplateReq

type CreatePositionTemplateReq struct {
	Name            string
	DefaultDescribe string
}

type CreatePositionTemplateRes

type CreatePositionTemplateRes struct {
	IsFailed bool
}

type EditAwardReq

type EditAwardReq struct {
	ProjectID      uint
	CompetitionIDs []uint
	AwardRanks     []string
	AwardProves    []string
	NewAward       NewAward
}

type EditAwardRes

type EditAwardRes struct {
	IsFailed bool
}

type EditPositionReq

type EditPositionReq struct {
	ProjectID            uint
	PositionIDs          []uint
	PositionNames        []string
	PositionNeedNums     []int64
	PositionRequirements []string
	NewPosition          NewPosition
}

type EditPositionRes

type EditPositionRes struct {
	IsFailed bool
}

type EditProjectDetailReq

type EditProjectDetailReq struct {
	ProjectID uint
	Content   string
}

编辑项目详情

type EditProjectDetailRes

type EditProjectDetailRes struct {
	IsFailed bool
}

type EditResumeReq

type EditResumeReq struct {
	ProjectID   int64
	PositionIDs []int64
	Contents    []string
	NewResume   NewResume
}

type EditResumeRes

type EditResumeRes struct {
	IsFailed bool
}

type FileService

type FileService struct {
	// contains filtered or unexported fields
}

func NewFileService

func NewFileService(db *gorm.DB) *FileService

返回一个带有保存了数据的数据库实例的服务对象而所有值为默认值的服务实例; 由于RegisterService函数的参数需要是指针,所以本函数返回指针类型

type GetCompetitionNamesReq

type GetCompetitionNamesReq struct {
}

仅获取比赛名称,用于首屏中filter中比赛列表的获取; 请求

type GetCompetitionNamesRes

type GetCompetitionNamesRes struct {
	CompetitionNames []string
}

响应

type GetCompetitionReq

type GetCompetitionReq struct {
	ID int
}

获取所有比赛信息,经过一定规则的排序后,以json的形式传回前端,GetCompetitionRes中包含排序规则 返回的json中的信息仅需包含在首屏中展示的简略信息 请求

type GetCompetitionRes

type GetCompetitionRes struct {
	Token       string
	Competition models.Competition
}

响应

type GetCompetitionTypesReq

type GetCompetitionTypesReq struct {
}

仅获取比赛类型,用于首屏中filter中比赛类型列表的获取; 请求

type GetCompetitionTypesRes

type GetCompetitionTypesRes struct {
	CompetitionTypes []string
}

响应

type GetPositionNamesReq

type GetPositionNamesReq struct{}

获取岗位的名称

type GetPositionNamesRes

type GetPositionNamesRes struct {
	PositionNames []string
}

type GetProjectDetailReq

type GetProjectDetailReq struct {
	ProjectID int64
}

获取项目详情,请求项目ID,返回项目详情页所需各项信息

type GetProjectDetailRes

type GetProjectDetailRes struct {
	//1.Project本身信息
	DescribeDetail string
	LinkURL        string
	EndTime        string
	//2. 创建者相关信息
	CreatorName      string
	CreatorAvatarURI string
	CreatorSchool    string  //学院
	CreatorGrade     string  //年级
	CreatorAward     []Award //获奖情况
	//3. 招募相关信息
	Positions []PositionSimple //岗位
	//4. 评论相关信息
	Comments []CommentSimple //评论
}

type GetProjectIDReq

type GetProjectIDReq struct{}

获取数据库中project的ID

type GetProjectIDRes

type GetProjectIDRes struct {
	ProjectID []int64
}

type GetProjectNumReq

type GetProjectNumReq struct{}

获取数据库中project的个数

type GetProjectNumRes

type GetProjectNumRes struct {
	ProjectNum int64
}

type GetProjectSimpleReq

type GetProjectSimpleReq struct {
	ProjectID uint
}

获取项目的简略信息,用于首屏中以卡片的形式展示 信息包括:项目名称、项目介绍、岗位标签、(创建者头像、创建者姓名)、star数、评论数 请求,包括比赛名称、比赛类别、岗位名称

type GetProjectSimpleRes

type GetProjectSimpleRes struct {
	IsFound       bool
	ProjectSimple ProjectSimple
}

响应,包括一个项目对象的数组

type GetProjectSimplesReq

type GetProjectSimplesReq struct {
	ProjectID []int64
}

通过请求中项目ID数组获取项目简介数组

type GetProjectSimplesRes

type GetProjectSimplesRes struct {
	IsFound        bool
	ProjectSimples []ProjectSimple
}

响应,包括一个项目对象的数组

type GetResumesReq

type GetResumesReq struct {
	ProjectID int64
}

type GetResumesRes

type GetResumesRes struct {
	IsFailed      bool
	ResumeSimples []ResumeSimple
}

type NewAward

type NewAward struct {
	CompetitionNames []string
	AwardRanks       []string
	AwardProves      []string
}

编辑获奖情况

type NewPosition

type NewPosition struct {
	Names        []string
	NeedNums     []int64
	Requirements []string
}

编辑项目岗位

type NewResume

type NewResume struct {
	PositionNames []string
	Contents      []string
}

编辑简历

type Position

type Position struct {
}

type PositionService

type PositionService struct {
	// contains filtered or unexported fields
}

func NewPositionService

func NewPositionService(db *gorm.DB) *PositionService

返回一个带有保存了数据的数据库实例的服务对象而所有值为默认值的服务实例; 由于RegisterService函数的参数需要是指针,所以本函数返回指针类型

func (*PositionService) CreatePositionTemplate

func (c *PositionService) CreatePositionTemplate(ctx *rpc.Context, req *CreatePositionTemplateReq, res *CreatePositionTemplateRes) error

func (*PositionService) EditPosition

func (c *PositionService) EditPosition(ctx *rpc.Context,
	req *EditPositionReq, res *EditPositionRes) (err error)

func (*PositionService) GetPositionNames

func (c *PositionService) GetPositionNames(ctx *rpc.Context, req *GetPositionNamesReq, res *GetPositionNamesRes) error

type PositionSimple

type PositionSimple struct {
	ID             uint
	Name           string
	NowPeople      int64
	NeedPeople     int64
	InterestPeople int64
	Describe       string
}

type ProjectService

type ProjectService struct {
	// contains filtered or unexported fields
}

func NewProjectService

func NewProjectService(db *gorm.DB) *ProjectService

返回一个带有保存了数据的数据库实例的服务对象而所有值为默认值的服务实例; 由于RegisterService函数的参数需要是指针,所以本函数返回指针类型

func (*ProjectService) AddProject

func (c *ProjectService) AddProject(ctx *rpc.Context, req *AddProjectReq, res *AddProjectRes) error

func (*ProjectService) EditAward

func (c *ProjectService) EditAward(ctx *rpc.Context,
	req *EditAwardReq, res *EditAwardRes) (err error)

func (*ProjectService) EditProjectDetail

func (c *ProjectService) EditProjectDetail(ctx *rpc.Context,
	req *EditProjectDetailReq, res *EditProjectDetailRes) (err error)

func (*ProjectService) GetOwnProject

func (c *ProjectService) GetOwnProject()

func (*ProjectService) GetProjectDetail

func (c *ProjectService) GetProjectDetail(ctx *rpc.Context, req *GetProjectDetailReq, res *GetProjectDetailRes) error

func (*ProjectService) GetProjectID

func (c *ProjectService) GetProjectID(ctx *rpc.Context, req *GetProjectIDReq, res *GetProjectIDRes) error

func (*ProjectService) GetProjectNum

func (c *ProjectService) GetProjectNum(ctx *rpc.Context, req *GetProjectNumReq, res *GetProjectNumRes) error

func (*ProjectService) GetProjectSimple

func (c *ProjectService) GetProjectSimple(ctx *rpc.Context, req *GetProjectSimpleReq, res *GetProjectSimpleRes) error

func (*ProjectService) GetProjectSimples

func (c *ProjectService) GetProjectSimples(ctx *rpc.Context,
	req *GetProjectSimplesReq, res *GetProjectSimplesRes) error

type ProjectSimple

type ProjectSimple struct {
	ProjectID          uint
	CreateTime         time.Time
	UpdateTime         time.Time
	ProjectName        string
	ProjectDescription string
	StarNum            int64
	CommentNum         int64
	PositionNames      []string
	CompetitionNames   []string
	TypeName           string
}

type ResumeService

type ResumeService struct {
	// contains filtered or unexported fields
}

func NewResumeService

func NewResumeService(db *gorm.DB) *ResumeService

func (*ResumeService) EditResume

func (c *ResumeService) EditResume(ctx *rpc.Context,
	req *EditResumeReq, res *EditResumeRes) (err error)

func (*ResumeService) GetResumes

func (c *ResumeService) GetResumes(ctx *rpc.Context, req *GetResumesReq, res *GetResumesRes) (err error)

type ResumeSimple

type ResumeSimple struct {
	PositionID   int64
	PositionName string
	Content      string
}

获取简历信息,通过userID和projectID

Jump to

Keyboard shortcuts

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