SendMail.go 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. package gm
  2. import (
  3. "github.com/gogf/gf/frame/g"
  4. dao "gmanager/library/mongo"
  5. "go.mongodb.org/mongo-driver/bson/primitive"
  6. )
  7. type SendMailLog struct {
  8. Id primitive.ObjectID `bson:"_id" json:"id"`
  9. UserId string `bson:"user_id" json:"userid"` //用户id
  10. ServerId string `bson:"server_id" json:"serverid"` //服务器id
  11. ServerName string `bson:"server_name" json:"servername"` //服务器id
  12. Param string `bson:"param" json:"param"` //参数
  13. Title string `bson:"title" json:"title"` //标题
  14. Content string `bson:"content" json:"content"` //内容
  15. Cmd string `bson:"cmd" json:"cmd"` //cmd = sendmail
  16. GMIp string `bson:"gm_ip" json:"gmip"`
  17. GMPort string `bson:"gm_port" json:"gmport"`
  18. UpdateUser string `bson:"update_user" json:"updateuser"` //操作人
  19. UpdateTime int64 `bson:"update_time" json:"updatetime"` //操作时间
  20. State int `bson:"state" json:"state"` // 邮件状态:0:未发送 1:已发送 2:发送中 3:发送失败
  21. }
  22. var (
  23. // Table is the table name of account.
  24. TableSendMailLog = "send_mail_log"
  25. SendMailLogTablbeName = g.Config().GetString("db.core")
  26. // Model is the model object of account.
  27. ModelSendMailLog = dao.NewMgo(SendMailLogTablbeName, TableSendMailLog)
  28. )