package company_approval_message import ( "time" ) // CompanyApprovalMessage [...] type CompanyApprovalMessage struct { ID int `gorm:"primaryKey;column:id;type:int(11);not null" json:"-"` CreateUserID int `gorm:"column:create_user_id;type:int(11);default:0" json:"createUserId"` // 消息创建者id ReceiveUserID int `gorm:"index:idx_receive_user_id;column:receive_user_id;type:int(11);default:0" json:"receiveUserId"` // 消息接收者id MessageStatus int `gorm:"column:message_status;type:int(11);default:0" json:"messageStatus"` // 消息状态:0未读,1:已读,2:作废 Remark string `gorm:"column:remark;type:varchar(500);default:''" json:"remark"` // 备注信息 Content string `gorm:"column:content;type:varchar(500);default:''" json:"content"` // 消息内容 CompanyID int `gorm:"column:company_id;type:int(11)" json:"companyId"` // 客户id CompanyName string `gorm:"column:company_name;type:varchar(500)" json:"companyName"` // 客户名称 CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"` // 创建时间 ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"` // 修改时间 CompanyApprovalID int `gorm:"column:company_approval_id;type:int(11);default:0" json:"companyApprovalId"` // 审批单id ApprovalStatus int8 `gorm:"column:approval_status;type:tinyint(4);default:0" json:"approvalStatus"` // 审批状态:1:待审批,2:已审批,3:已驳回 OperationStatus int8 `gorm:"column:operation_status;type:tinyint(4);default:0" json:"operationStatus"` // 1:待审批,2:已审批 MessageType int8 `gorm:"column:message_type;type:tinyint(4);default:0" json:"messageType"` // 1:申请消息,2:审批结果,3:文字消息 SourceType int8 `gorm:"index:idx_source_typ;column:source_type;type:tinyint(4);default:1" json:"sourceType"` // 消息来源类型,1:客户,2:合同,3:用印,4:指标替换,5:问答社区,6:问答评论 MessageInfo string `gorm:"column:message_info;type:text" json:"messageInfo"` // 消息主要内容,json数据 } // TableName get sql table name.获取数据库表名 func (m *CompanyApprovalMessage) TableName() string { return "company_approval_message" } // CompanyApprovalMessageColumns get sql column name.获取数据库列名 var CompanyApprovalMessageColumns = struct { ID string CreateUserID string ReceiveUserID string MessageStatus string Remark string Content string CompanyID string CompanyName string CreateTime string ModifyTime string CompanyApprovalID string ApprovalStatus string OperationStatus string MessageType string SourceType string MessageInfo string }{ ID: "id", CreateUserID: "create_user_id", ReceiveUserID: "receive_user_id", MessageStatus: "message_status", Remark: "remark", Content: "content", CompanyID: "company_id", CompanyName: "company_name", CreateTime: "create_time", ModifyTime: "modify_time", CompanyApprovalID: "company_approval_id", ApprovalStatus: "approval_status", OperationStatus: "operation_status", MessageType: "message_type", SourceType: "source_type", MessageInfo: "message_info", }