init repo
This commit is contained in:
26
internal/storage/dao/evaluate.go
Normal file
26
internal/storage/dao/evaluate.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user