implied_role.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package models
  15. import "yunion.io/x/onecloud/pkg/cloudcommon/db"
  16. // +onecloud:swagger-gen-ignore
  17. type SImpliedRoleManager struct {
  18. db.SModelBaseManager
  19. }
  20. var (
  21. ImpliedRoleManager *SImpliedRoleManager
  22. )
  23. func init() {
  24. ImpliedRoleManager = &SImpliedRoleManager{
  25. SModelBaseManager: db.NewModelBaseManager(
  26. SImpliedRole{},
  27. "implied_role",
  28. "implied_role",
  29. "implied_roles",
  30. ),
  31. }
  32. ImpliedRoleManager.SetVirtualObject(ImpliedRoleManager)
  33. }
  34. /*
  35. desc implied_role;
  36. +-----------------+-------------+------+-----+---------+-------+
  37. | Field | Type | Null | Key | Default | Extra |
  38. +-----------------+-------------+------+-----+---------+-------+
  39. | prior_role_id | varchar(64) | NO | PRI | NULL | |
  40. | implied_role_id | varchar(64) | NO | PRI | NULL | |
  41. +-----------------+-------------+------+-----+---------+-------+
  42. */
  43. type SImpliedRole struct {
  44. db.SModelBase
  45. PriorRoleId string `width:"64" charset:"ascii" nullable:"false" primary:"true"`
  46. ImpliedRoleId string `width:"64" charset:"ascii" nullable:"false" primary:"true"`
  47. }