package com.dsk.common.core.domain.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

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

@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class EnterpriseCreditExecutedPersonsPageBody extends BasePage {
    /**
     * 企业id
     */
    @NotNull(message = "企业id不能为空")
    private Integer cid;

    /**
     * 开始时间（年月日）
     */
    private String dateFrom;
    /**
     * 截止时间（年月日）
     */
    private String dateTo;

    @AssertFalse(message = "企业不存在")
    public boolean isVaildCid() {
        return 0 == cid;
    }
}
