12345678910111213141516171819202122232425262728293031323334 |
- package model
- import (
- "time"
- "gorm.io/gorm"
- )
- const TableNameMsg = "msg"
- type Msg struct {
- ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
- CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP;comment:Create Time | 创建日期" json:"created_at"`
- UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP;comment:Update Time | 修改日期" json:"updated_at"`
- DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"`
- Status int64 `gorm:"column:status;comment:Status 1: normal 2: ban | 状态 1 正常 2 禁用" json:"status"`
- Fromwxid string `gorm:"column:fromwxid;comment:发送方微信ID" json:"fromwxid"`
- Toid string `gorm:"column:toid;comment:接收人微信ID/群ID" json:"toid"`
- Msgtype int64 `gorm:"column:msgtype;comment:消息类型" json:"msgtype"`
- Msg string `gorm:"column:msg;comment:消息" json:"msg"`
- BatchNo string `gorm:"column:batch_no;comment:批次号" json:"batch_no"`
- Cc string `gorm:"column:cc;comment:国家区号" json:"cc"`
- Phone string `gorm:"column:phone;comment:手机号" json:"phone"`
- }
- func (*Msg) TableName() string {
- return TableNameMsg
- }
|