All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rexsheng.springboot.faster.system.role.domain.SysRole Maven / Gradle / Ivy

The newest version!
package com.github.rexsheng.springboot.faster.system.role.domain;

import com.github.rexsheng.springboot.faster.system.utils.AuthenticationUtil;
import com.github.rexsheng.springboot.faster.util.DateUtil;

import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;

public class SysRole {

    private Integer roleId;

    private String roleCode;

    private String roleName;

    private Integer roleOrder;

    private String remark;

    private Integer status;

    private Boolean isDel;

    private LocalDateTime createTime;

    private Long createUserId;

    private LocalDateTime updateTime;

    private Long updateUserId;

    private List authList;

    public static SysRole of(Integer roleId){
        SysRole sysRole=new SysRole();
        sysRole.setRoleId(roleId);
        return sysRole;
    }

    public static List of(List ids, Boolean isDel){
        return ids.stream().map(a->{
            SysRole sysRole=new SysRole();
            sysRole.setRoleId(a);
            sysRole.setDel(isDel);
            sysRole.setUpdateTime(DateUtil.currentDateTime());
            sysRole.setUpdateUserId(AuthenticationUtil.currentUserId());
            return sysRole;
        }).collect(Collectors.toList());
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Integer getRoleOrder() {
        return roleOrder;
    }

    public void setRoleOrder(Integer roleOrder) {
        this.roleOrder = roleOrder;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Boolean getDel() {
        return isDel;
    }

    public void setDel(Boolean del) {
        isDel = del;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public List getAuthList() {
        return authList;
    }

    public void setAuthList(List authList) {
        this.authList = authList;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy