package org.springblade.common.auth.support;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wn.common.datamodel.Long2StringSerializer;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author caiyihua
 */
@Data
@NoArgsConstructor
public class Menu implements Serializable {
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = Long2StringSerializer.class)
    private Long id;

    private String code;

    private String name;

    private Integer type;

    private Integer sequenceNumber;

    private Long permissionId;

    private List<Menu> children;

    private String[] buttons;

    public Menu(Long id, String code, String name, Integer type, Integer sequenceNumber, Long permissionId) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.type = type;
        this.sequenceNumber = sequenceNumber;
        this.permissionId = permissionId;
    }
}
