liujie
2026-08-21 77649c76ec1c3afcb93e9963243d637665b3a307
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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; }
}