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

package models

const TableNameRole = "role" //角色信息表

const (
	ROLE_COLUMN_ID           = "id"
	ROLE_COLUMN_ROLE_NAME    = "role_name"
	ROLE_COLUMN_ROLE_ALIAS   = "role_alias"
	ROLE_COLUMN_CREATE_USER  = "create_user"
	ROLE_COLUMN_EDIT_USER    = "edit_user"
	ROLE_COLUMN_REMARK       = "remark"
	ROLE_COLUMN_IS_INHERENT  = "is_inherent"
	ROLE_COLUMN_DELETED      = "deleted"
	ROLE_COLUMN_CREATED_TIME = "created_time"
	ROLE_COLUMN_UPDATED_TIME = "updated_time"
)

type RoleDO struct {
	Id          int32  `json:"id" db:"id" bson:"_id"`                                               //角色ID(自增)
	RoleName    string `json:"role_name" db:"role_name" bson:"role_name"`                           //角色名称
	RoleAlias   string `json:"role_alias" db:"role_alias" bson:"role_alias"`                        //角色别名
	CreateUser  string `json:"create_user" db:"create_user" bson:"create_user"`                     //创建人
	EditUser    string `json:"edit_user" db:"edit_user" bson:"edit_user"`                           //最近编辑人
	Remark      string `json:"remark" db:"remark" bson:"remark"`                                    //备注
	IsInherent  bool   `json:"is_inherent" db:"is_inherent" bson:"is_inherent"`                     //是否固有角色(0=自定义角色 1=平台固有角色)
	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 *RoleDO) GetId() int32            { return do.Id }
func (do *RoleDO) SetId(v int32)           { do.Id = v }
func (do *RoleDO) GetRoleName() string     { return do.RoleName }
func (do *RoleDO) SetRoleName(v string)    { do.RoleName = v }
func (do *RoleDO) GetRoleAlias() string    { return do.RoleAlias }
func (do *RoleDO) SetRoleAlias(v string)   { do.RoleAlias = v }
func (do *RoleDO) GetCreateUser() string   { return do.CreateUser }
func (do *RoleDO) SetCreateUser(v string)  { do.CreateUser = v }
func (do *RoleDO) GetEditUser() string     { return do.EditUser }
func (do *RoleDO) SetEditUser(v string)    { do.EditUser = v }
func (do *RoleDO) GetRemark() string       { return do.Remark }
func (do *RoleDO) SetRemark(v string)      { do.Remark = v }
func (do *RoleDO) GetIsInherent() bool     { return do.IsInherent }
func (do *RoleDO) SetIsInherent(v bool)    { do.IsInherent = v }
func (do *RoleDO) GetDeleted() bool        { return do.Deleted }
func (do *RoleDO) SetDeleted(v bool)       { do.Deleted = v }
func (do *RoleDO) GetCreatedTime() string  { return do.CreatedTime }
func (do *RoleDO) SetCreatedTime(v string) { do.CreatedTime = v }
func (do *RoleDO) GetUpdatedTime() string  { return do.UpdatedTime }
func (do *RoleDO) SetUpdatedTime(v string) { do.UpdatedTime = v }

/*
CREATE TABLE `role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '角色ID(自增)',
  `role_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '角色名称',
  `role_alias` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色别名',
  `create_user` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建人',
  `edit_user` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '最近编辑人',
  `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `is_inherent` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否固有角色(0=自定义角色 1=平台固有角色)',
  `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,
  UNIQUE KEY `UNIQ_ROLE_NAME` (`role_name`) COMMENT '角色名称唯一约束'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='角色信息表';
*/
