task_conf.go 519 B

1234567891011121314151617181920212223
  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. SimulatorType int `json:"simulator_type"`
  11. }
  12. func (TaskConf) TableName() string {
  13. return "task_conf"
  14. }
  15. func (m *TaskConf) GetTaskConfByTaskId(taskId int) (taskConf TaskConf, err error) {
  16. err = global.GVA_DB.Table("task_conf").Where("task_id = ?", taskId).Find(&taskConf).Error
  17. return
  18. }