package com.zd.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 权限模板对象 sys_permit
 *
 * @author liubo
 * @date 2022-03-21
 */
@ApiModel("权限模板")
public class SysPermit extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 权限模板ID
     */
    private Long id;
    /**
     * 权限名称
     */
    @ApiModelProperty(value = "权限模板名称")
    @NotNull(message = "模板名称不能为空！")
    private String name;

    @ApiModelProperty(value = "类型（0  教职工，1 学生）")
    private Integer type = 0;

    /**
     * 权限模板说明
     */
    @ApiModelProperty(value = "权限模板说明")
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "模板菜单数据")
    private List<SysPermitMenu> permitMenus;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public String getRemark() {
        return remark;
    }

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

    public List<SysPermitMenu> getPermitMenus() {
        return permitMenus;
    }

    public void setPermitMenus(List<SysPermitMenu> permitMenus) {
        this.permitMenus = permitMenus;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
