Files
jx-callback/business/model/job.go
苏尹岚 2d86b6a928 job
2020-10-13 11:56:52 +08:00

52 lines
1.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
type Job struct {
ModelIDCULD
ThingID string `orm:"column(thing_id)" json:"thingID"` //发布人ID
ThingType int `json:"thingType"` //发布人类型1是普通用户2是商户
JobCategoryID int `orm:"column(job_category_id)" json:"jobCategoryID"` //任务类型
JobSpan string `orm:"size(500)" json:"jobSpan"` //任务标签
Title string `orm:"size(255)" json:"title"` //任务标题
Content string `orm:"size(500)" json:"content"` //任务内容
Count int `json:"count"` //任务数量
AvgPrice int `json:"avgPrice"` //单个任务金额
TotalPrice int `json:"totalPrice"` //任务总金额
Status int `json:"status"` //任务状态
}
func (v *Job) TableIndex() [][]string {
return [][]string{
[]string{"ThingID"},
[]string{"CreatedAt"},
}
}
type JobCategory struct {
ModelIDCULD
Name string `orm:"size(48)" json:"name"` //类型名称
Img string `orm:"size(500)" json:"img"` //类型图片
}
func (v *JobCategory) TableUnique() [][]string {
return [][]string{
[]string{"Name"},
}
}
type JobStep struct {
ModelIDCULD
JobID int `orm:"column(job_id)" json:"jobID"` //任务ID
StepCount int `json:"stepCount"` //步骤数
Content string `orm:"size(500)" json:"content"` //步骤内容
Img string `orm:"size(500)" json:"img"` //步骤图片
}
func (v *JobStep) TableIndex() [][]string {
return [][]string{
[]string{"JobID"},
}
}