task_conf.go 469 B

12345678910111213141516171819202122
  1. package task
  2. import (
  3. "log-server/global"
  4. )
  5. type TaskConf struct {
  6. Id int `json:"id"`
  7. TaskId int `json:"task_id"`
  8. User string `json:"user"`
  9. AddFeeNotice int `json:"add_fee_notice"`
  10. }
  11. func (TaskConf) TableName() string {
  12. return "task_conf"
  13. }
  14. func (m *TaskConf) GetTaskConfByTaskId(taskId int) (taskConf TaskConf, err error) {
  15. err = global.GVA_DB.Table("task_conf").Where("task_id = ?", taskId).Find(&taskConf).Error
  16. return
  17. }