package com.tourguide.modules.system.dto;
|
|
import com.tourguide.modules.system.entity.SystemRole;
|
import java.time.LocalDateTime;
|
|
public class RoleResponse {
|
private final Long id;
|
private final String roleName;
|
private final long accountCount;
|
private final LocalDateTime createdAt;
|
private final String remark;
|
private final boolean builtIn;
|
|
public RoleResponse(SystemRole role, long accountCount) {
|
this.id = role.getId();
|
this.roleName = role.getRoleName();
|
this.accountCount = accountCount;
|
this.createdAt = role.getCreatedAt();
|
this.remark = role.getRemark();
|
this.builtIn = "ADMIN".equals(role.getRoleCode());
|
}
|
|
public Long getId() { return id; }
|
public String getRoleName() { return roleName; }
|
public long getAccountCount() { return accountCount; }
|
public LocalDateTime getCreatedAt() { return createdAt; }
|
public String getRemark() { return remark; }
|
public boolean isBuiltIn() { return builtIn; }
|
}
|