// Code generated by db2go. DO NOT EDIT.
// https://github.com/civet148/sqlca

package models

const TableNamePrivilege = "privilege" //角色-菜单关系表

const (
	PRIVILEGE_COLUMN_ID           = "id"
	PRIVILEGE_COLUMN_CATEGORY     = "category"
	PRIVILEGE_COLUMN_NAME         = "name"
	PRIVILEGE_COLUMN_LABEL        = "label"
	PRIVILEGE_COLUMN_PATH         = "path"
	PRIVILEGE_COLUMN_CHILDREN     = "children"
	PRIVILEGE_COLUMN_IS_INHERENT  = "is_inherent"
	PRIVILEGE_COLUMN_REMARK       = "remark"
	PRIVILEGE_COLUMN_DELETED      = "deleted"
	PRIVILEGE_COLUMN_CREATED_TIME = "created_time"
	PRIVILEGE_COLUMN_UPDATED_TIME = "updated_time"
)

type PrivilegeDO struct {
	Id          int32         `json:"id" db:"id" bson:"_id"`                                               //自增ID
	Category    int8          `json:"category" db:"category" bson:"category"`                              //权限分类(保留字段)
	Name        string        `json:"name" db:"name" bson:"name"`                                          //权限名称
	Label       string        `json:"label" db:"label" bson:"label"`                                       //权限标签
	Path        string        `json:"path" db:"path" bson:"path"`                                          //权限访问路径
	Children    TreePrivilege `json:"children" db:"children" sqlca:"isnull" bson:"children"`               //子权限树
	IsInherent  bool          `json:"is_inherent" db:"is_inherent" bson:"is_inherent"`                     //是否固有权限(0=否 1=是)
	Remark      string        `json:"remark" db:"remark" bson:"remark"`                                    //权限备注
	Deleted     bool          `json:"deleted" db:"deleted" bson:"deleted"`                                 //是否已删除(0=未删除 1=已删除)
	CreatedTime string        `json:"created_time" db:"created_time" sqlca:"readonly" bson:"created_time"` //创建时间
	UpdatedTime string        `json:"updated_time" db:"updated_time" sqlca:"readonly" bson:"updated_time"` //更新时间
}

func (do *PrivilegeDO) GetId() int32                { return do.Id }
func (do *PrivilegeDO) SetId(v int32)               { do.Id = v }
func (do *PrivilegeDO) GetCategory() int8           { return do.Category }
func (do *PrivilegeDO) SetCategory(v int8)          { do.Category = v }
func (do *PrivilegeDO) GetName() string             { return do.Name }
func (do *PrivilegeDO) SetName(v string)            { do.Name = v }
func (do *PrivilegeDO) GetLabel() string            { return do.Label }
func (do *PrivilegeDO) SetLabel(v string)           { do.Label = v }
func (do *PrivilegeDO) GetPath() string             { return do.Path }
func (do *PrivilegeDO) SetPath(v string)            { do.Path = v }
func (do *PrivilegeDO) GetChildren() TreePrivilege  { return do.Children }
func (do *PrivilegeDO) SetChildren(v TreePrivilege) { do.Children = v }
func (do *PrivilegeDO) GetIsInherent() bool         { return do.IsInherent }
func (do *PrivilegeDO) SetIsInherent(v bool)        { do.IsInherent = v }
func (do *PrivilegeDO) GetRemark() string           { return do.Remark }
func (do *PrivilegeDO) SetRemark(v string)          { do.Remark = v }
func (do *PrivilegeDO) GetDeleted() bool            { return do.Deleted }
func (do *PrivilegeDO) SetDeleted(v bool)           { do.Deleted = v }
func (do *PrivilegeDO) GetCreatedTime() string      { return do.CreatedTime }
func (do *PrivilegeDO) SetCreatedTime(v string)     { do.CreatedTime = v }
func (do *PrivilegeDO) GetUpdatedTime() string      { return do.UpdatedTime }
func (do *PrivilegeDO) SetUpdatedTime(v string)     { do.UpdatedTime = v }

/*
CREATE TABLE `privilege` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `category` tinyint(1) NOT NULL DEFAULT '0' COMMENT '权限分类(保留字段)',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '权限名称',
  `label` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '权限标签',
  `path` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '权限访问路径',
  `children` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '子权限树',
  `is_inherent` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否固有权限(0=否 1=是)',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '权限备注',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已删除(0=未删除 1=已删除)',
  `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='角色-菜单关系表';
*/
