package com.nokia.vo.flow;

import java.util.ArrayList;
import java.util.List;

import com.nokia.pojo.Area;
import com.nokia.pojo.Role;

import lombok.Data;

@Data
public class FlowRoleCityVo {
    // 角色id
    private Integer roleId;
    // 角色名
    private String roleName;
    // 赋权地市
    private List<Integer> cities;

    public FlowRoleCityVo(Role role) {
        this.roleId = role.getRoleId();
        this.roleName = role.getRoleName();
        this.cities = new ArrayList<>();
        for (Area city : role.getCities()) {
            this.cities.add(city.getAreaId());
        }
    }
}
