manual_user.go 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package eta_trial
  2. import (
  3. "hongze/hz_crm_eta/global"
  4. "time"
  5. )
  6. // ManualUser 手工数据关联用户
  7. type ManualUser struct {
  8. ManualUserId int `gorm:"primaryKey;column:manual_user_id;type:int(11);not null" json:"manual_user_id"`
  9. AdminId int `gorm:"column:admin_id;type:int(11);default:0" json:"admin_id"`
  10. AdminRealName string `gorm:"column:admin_real_name;type:varchar(100);default:''" json:"admin_real_name"`
  11. SysUserId int `gorm:"column:sys_user_id;type:int(11);default:0" json:"sys_user_id"`
  12. SysUserRealName string `gorm:"column:sys_user_real_name;type:varchar(100);default:''" json:"sys_user_real_name"`
  13. CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"create_time"`
  14. }
  15. func (m *ManualUser) TableName() string {
  16. return "manual_user"
  17. }
  18. func (m *ManualUser) Create() (err error) {
  19. err = global.MYSQL["hz_data_trial"].Create(m).Error
  20. return
  21. }
  22. // CreateManualAuthReq 新增手工数据权限
  23. type CreateManualAuthReq struct {
  24. AdminId int `json:"admin_id" description:"用户ID"`
  25. AdminName string `json:"admin_name" description:"用户姓名"`
  26. }