34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
package model
|
|
|
|
// ServiceMessage 留言数据模型
|
|
type ServiceMessage struct {
|
|
Model
|
|
ModelTenant
|
|
Name string `gorm:"column:name;type:varchar(20);default:'';comment:联系人" json:"name"`
|
|
Mobile string `gorm:"column:mobile;type:varchar(15);default:'';comment:联系方式" json:"mobile"`
|
|
Email string `gorm:"column:email;type:varchar(50);default:'';comment:邮箱" json:"email"`
|
|
Company string `gorm:"column:company;type:varchar(100);default:'';comment:公司名称" json:"company"`
|
|
Content string `gorm:"column:content;type:varchar(255);default:'';comment:联系内容" json:"content"`
|
|
Status ServiceMessageStatus `gorm:"column:status;type:tinyint(1);default:0;comment:状态" json:"status"`
|
|
ModelDeleted
|
|
ModelAt
|
|
}
|
|
|
|
// ServiceMessageStatus 留言数据状态
|
|
type ServiceMessageStatus int
|
|
|
|
const (
|
|
// ServiceMessageStatusForProcessing 处理中
|
|
ServiceMessageStatusForProcessing ServiceMessageStatus = iota + 1
|
|
// ServiceMessageStatusForProcessed 已处理
|
|
ServiceMessageStatusForProcessed
|
|
)
|
|
|
|
func (m *ServiceMessage) TableName() string {
|
|
return "service_message"
|
|
}
|
|
|
|
func NewServiceMessage() *ServiceMessage {
|
|
return &ServiceMessage{}
|
|
}
|