user_read_permission.go 903 B

1234567891011121314151617181920212223242526
  1. package models
  2. import "github.com/beego/beego/v2/client/orm"
  3. type UserReadPermission1 struct {
  4. UserReadPermissionId int `orm:"pk" description:"用户阅读记录品种映射id"`
  5. UserReadRecordId int `description:"用户阅读记录id"`
  6. ChartPermissionId int `description:"品种id"`
  7. PermissionName string `description:"品种名称"`
  8. }
  9. type UserReadPermission2 struct {
  10. UserReadPermissionId int `orm:"pk" description:"用户阅读记录品种映射id"`
  11. UserReadRecordId int `description:"用户阅读记录id"`
  12. ChartPermissionId int `description:"品种id"`
  13. }
  14. func UserReadPermission1MultiInsert(items []*UserReadPermission1) (err error) {
  15. o := orm.NewOrm()
  16. _, err = o.InsertMulti(len(items), items)
  17. return
  18. }
  19. func UserReadPermission2MultiInsert(items []*UserReadPermission2) (err error) {
  20. o := orm.NewOrm()
  21. _, err = o.InsertMulti(len(items), items)
  22. return
  23. }