From 2d86b6a9282f2aaae766eaf28944658c79450da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 13 Oct 2020 11:56:52 +0800 Subject: [PATCH] job --- business/model/job.go | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/business/model/job.go b/business/model/job.go index 980a96dc8..688b37292 100644 --- a/business/model/job.go +++ b/business/model/job.go @@ -3,14 +3,16 @@ package model type Job struct { ModelIDCULD - ThingID string `orm:"column(thing_id)" json:"thingID"` - ThingType int `json:"thingType"` //发布人类型 + 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 { @@ -26,3 +28,24 @@ type JobCategory struct { 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"}, + } +}