27 lines
673 B
Go
27 lines
673 B
Go
package dao
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
type EvaluateTask struct {
|
|
BaseModel
|
|
TaskID int64 `gorm:"column:task_id;type:int;not null;comment:任务ID"`
|
|
Satisfied int `gorm:"column:satisfied;type:int;not null;comment:满意"`
|
|
Feedback string `gorm:"column:feedback;type:text;not null;comment:反馈"`
|
|
Comment string `gorm:"column:comment;type:text;not null;comment:评论"`
|
|
}
|
|
|
|
func (EvaluateTask) TableName() string {
|
|
return "evaluate_tasks"
|
|
}
|
|
|
|
type EvaluateTaskDao struct {
|
|
}
|
|
|
|
func NewEvaluateTaskDao() *EvaluateTaskDao {
|
|
return &EvaluateTaskDao{}
|
|
}
|
|
|
|
func (dao *EvaluateTaskDao) Create(sess *gorm.DB, data *EvaluateTask) error {
|
|
return sess.Create(data).Error
|
|
}
|