package com.ruoyi.ss.storeStaff.domain;

import java.math.BigDecimal;
import java.util.List;

import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 店铺员工对象 ss_store_staff
 *
 * @author ruoyi
 * @date 2024-11-13
 */
@Data
public class StoreStaff extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long employId;

    @Excel(name = "店铺ID")
    @ApiModelProperty("店铺ID")
    @NotNull(message = "店铺不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
    private Long storeId;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "角色", readConverterExp = "1=合伙人")
    @ApiModelProperty("角色")
    @NotNull(message = "角色不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
    private String role;

    @Excel(name = "分成比例")
    @ApiModelProperty("分成比例")
    @NotNull(message = "分成比例不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
    @Min(value = 0, message = "分成比例不允许小于0")
    @Max(value = 100, message = "分成比例不允许大于100")
    private BigDecimal point;

    @Excel(name = "是否启用")
    @ApiModelProperty("是否启用")
    @NotNull(message = "是否启用不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
    private Boolean enabled;

    @Excel(name = "权限列表", readConverterExp = "1=查看店铺,2=操作店铺,3=查看设备,4=操作设备,5=查看订单,6=操作订单")
    @ApiModelProperty("权限列表")
    private List<String> permissions;

    @Excel(name = "创建人ID")
    @ApiModelProperty("创建人ID")
    private Long createId;

}
