package com.crm.rely.backend.model.entity.user.role;

import com.crm.rely.backend.core.constant.ManagerConstant;
import com.crm.rely.backend.core.entity.base.BaseAddEntity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

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

@Data
public class UserRoleAddEntity extends BaseAddEntity {

    @NotNull(message = ManagerConstant.ROLE_NAME_NOT_NULL_ERROR)
    @NotBlank(message = ManagerConstant.ROLE_NAME_NOT_NULL_ERROR)
    @Size(min = 2, max = 20, message = ManagerConstant.ROLE_NAME_FORMAT_2_20_ERROR)
    private String name;

    private String code;

    private Long departmentId;

    private String content;

    private List<UserRoleOperateEntity> data;
}
