package biapprove import ( "eta_gn/eta_api/global" "eta_gn/eta_api/utils" "time" ) type BiApproveMessage struct { Id int `gorm:"primaryKey;column:id"` SendUserId int `gorm:"column:send_user_id"` // 发送人Id ReceiveUserId int `gorm:"column:receive_user_id"` // 接收者Id Content string `gorm:"column:content"` // 消息内容 Remark string `gorm:"column:remark"` // 备注信息 BiApproveId int `gorm:"column:report_approve_id"` // 审批Id ApproveState int `gorm:"column:approve_state"` // 审批状态:1-待审批;2-已审批;3-已驳回;4-已撤回 IsRead int `gorm:"column:is_read"` // 是否已读:0-未读;1-已读 CreateTime time.Time `gorm:"column:create_time"` // 创建时间 ModifyTime time.Time `gorm:"column:modify_time"` // 修改时间 } func (r *BiApproveMessage) TableName() string { return "bi_approve_message" } func (r *BiApproveMessage) Create() (err error) { o := global.DmSQL["rddp"] err = o.Create(r).Error return err } func (r *BiApproveMessage) CreateMulti(items []*BiApproveMessage) (err error) { if len(items) == 0 { return } o := global.DmSQL["rddp"] err = o.CreateInBatches(items, utils.MultiAddNum).Error return }