company_approval_message.go 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package company_approval_message
  2. import (
  3. "time"
  4. )
  5. // CompanyApprovalMessage [...]
  6. type CompanyApprovalMessage struct {
  7. ID int `gorm:"primaryKey;column:id;type:int(11);not null" json:"-"`
  8. CreateUserID int `gorm:"column:create_user_id;type:int(11);default:0" json:"createUserId"` // 消息创建者id
  9. ReceiveUserID int `gorm:"index:idx_receive_user_id;column:receive_user_id;type:int(11);default:0" json:"receiveUserId"` // 消息接收者id
  10. MessageStatus int `gorm:"column:message_status;type:int(11);default:0" json:"messageStatus"` // 消息状态:0未读,1:已读,2:作废
  11. Remark string `gorm:"column:remark;type:varchar(500);default:''" json:"remark"` // 备注信息
  12. Content string `gorm:"column:content;type:varchar(500);default:''" json:"content"` // 消息内容
  13. CompanyID int `gorm:"column:company_id;type:int(11)" json:"companyId"` // 客户id
  14. CompanyName string `gorm:"column:company_name;type:varchar(500)" json:"companyName"` // 客户名称
  15. CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"` // 创建时间
  16. ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"` // 修改时间
  17. CompanyApprovalID int `gorm:"column:company_approval_id;type:int(11);default:0" json:"companyApprovalId"` // 审批单id
  18. ApprovalStatus int8 `gorm:"column:approval_status;type:tinyint(4);default:0" json:"approvalStatus"` // 审批状态:1:待审批,2:已审批,3:已驳回
  19. OperationStatus int8 `gorm:"column:operation_status;type:tinyint(4);default:0" json:"operationStatus"` // 1:待审批,2:已审批
  20. MessageType int8 `gorm:"column:message_type;type:tinyint(4);default:0" json:"messageType"` // 1:申请消息,2:审批结果,3:文字消息
  21. SourceType int8 `gorm:"index:idx_source_typ;column:source_type;type:tinyint(4);default:1" json:"sourceType"` // 消息来源类型,1:客户,2:合同,3:用印,4:指标替换,5:问答社区,6:问答评论
  22. MessageInfo string `gorm:"column:message_info;type:text" json:"messageInfo"` // 消息主要内容,json数据
  23. }
  24. // TableName get sql table name.获取数据库表名
  25. func (m *CompanyApprovalMessage) TableName() string {
  26. return "company_approval_message"
  27. }
  28. // CompanyApprovalMessageColumns get sql column name.获取数据库列名
  29. var CompanyApprovalMessageColumns = struct {
  30. ID string
  31. CreateUserID string
  32. ReceiveUserID string
  33. MessageStatus string
  34. Remark string
  35. Content string
  36. CompanyID string
  37. CompanyName string
  38. CreateTime string
  39. ModifyTime string
  40. CompanyApprovalID string
  41. ApprovalStatus string
  42. OperationStatus string
  43. MessageType string
  44. SourceType string
  45. MessageInfo string
  46. }{
  47. ID: "id",
  48. CreateUserID: "create_user_id",
  49. ReceiveUserID: "receive_user_id",
  50. MessageStatus: "message_status",
  51. Remark: "remark",
  52. Content: "content",
  53. CompanyID: "company_id",
  54. CompanyName: "company_name",
  55. CreateTime: "create_time",
  56. ModifyTime: "modify_time",
  57. CompanyApprovalID: "company_approval_id",
  58. ApprovalStatus: "approval_status",
  59. OperationStatus: "operation_status",
  60. MessageType: "message_type",
  61. SourceType: "source_type",
  62. MessageInfo: "message_info",
  63. }