manual_user.go 711 B

1234567891011121314151617181920212223242526272829303132
  1. package eta_trial
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. // ManualUser 手工数据关联用户
  7. type ManualUser struct {
  8. ManualUserId int `orm:"column(manual_user_id);pk"`
  9. AdminId int
  10. AdminRealName string
  11. SysUserId int
  12. SysUserRealName string
  13. CreateTime time.Time
  14. }
  15. func (m *ManualUser) TableName() string {
  16. return "manual_user"
  17. }
  18. func (m *ManualUser) Create() (err error) {
  19. o := orm.NewOrmUsingDB("hz_data_trial")
  20. _, err = o.Insert(m)
  21. return
  22. }
  23. // CreateManualAuthReq 新增手工数据权限
  24. type CreateManualAuthReq struct {
  25. AdminId int `json:"admin_id" description:"用户ID"`
  26. AdminName string `json:"admin_name" description:"用户姓名"`
  27. }