package com.brframework.commonwebadmin.json.admin.adminuser;

import com.brframework.commoncms.annatotion.column.CheckBoxColumn;
import com.brframework.commoncms.annatotion.column.SelectColumn;
import com.brframework.commonwebadmin.service.admin.AdminRoleService;
import com.brframework.commonwebadmin.service.admin.FunctionService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @author xu
 * @date 2018/3/13 0013 下午 5:34
 */
@Data
@ApiModel
public class AdminUserUpdateParam {

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称", example = "张三")
    @Length(min = 1, max = 18, message = "昵称长度在1-18之间")
    String nickname;

    /**
     * 用户拥有的角色权限
     */
    @ApiModelProperty(value = "用户角色", required = true, example = "ADMIN,USER")
    @CheckBoxColumn(optionsMappingContext = AdminRoleService.SELECT_ROLE)
    String roles;

}
