package com.engine.salary.entity.auth.param;

import com.engine.salary.util.valid.DataCheck;
import com.engine.salary.util.valid.RuntimeTypeEnum;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthRoleSaveParam {

    @JsonSerialize(using = ToStringSerializer.class)
    @DataCheck(require = true, runtime = {RuntimeTypeEnum.UPDATE}, message = "id不允许为空")
    private Long id;


    @DataCheck(require = true, max = 40, message = "名称不允许为空,名称不能超过40个字符")
    private String name;

    @DataCheck(require = false, max = 400, message = "描述不能超过400个字符")
    private String description;

    /**
     * 扣缴义务人资源
     */
    private List<TaxAgentPO> taxAgentIds;


    /**
     * 账套资源
     */
    private List<SalarySobPO> sobIds;

}