yb_activity_permission.go 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. package yb_activity_permission
  2. import "time"
  3. // YbActivityPermission 活动的关联权限表
  4. type YbActivityPermission struct {
  5. ActivityPermissionID uint32 `gorm:"primaryKey;column:activity_permission_id;type:int(9) unsigned;not null" json:"-"` // 自增id
  6. ActivityID uint32 `gorm:"index:idx_activity_id;column:activity_id;type:int(9) unsigned;default:0" json:"activityId"` // 活动id
  7. PermissionID uint32 `gorm:"column:permission_id;type:int(9) unsigned;default:0" json:"permissionId"` // 关联权限id
  8. PermissionName string `gorm:"column:permission_name;type:varchar(32);default:''" json:"permissionName"` // 关联权限名称
  9. CreateTime time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`
  10. }
  11. // TableName get sql table name.获取数据库表名
  12. func (m *YbActivityPermission) TableName() string {
  13. return "yb_activity_permission"
  14. }
  15. // YbActivityPermissionColumns get sql column name.获取数据库列名
  16. var YbActivityPermissionColumns = struct {
  17. ActivityPermissionID string
  18. ActivityID string
  19. PermissionID string
  20. PermissionName string
  21. CreateTime string
  22. }{
  23. ActivityPermissionID: "activity_permission_id",
  24. ActivityID: "activity_id",
  25. PermissionID: "permission_id",
  26. PermissionName: "permission_name",
  27. CreateTime: "create_time",
  28. }