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.AssertTrue;
import javax.validation.constraints.NotNull;

@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class EnterpriseBidDataGroupBody
{
    /**
     * 企业id
     */
    @NotNull(message = "企业id不能为空")
    private Integer cid;
    /**
     * 时间跨度id 1：年，2：月，3：周
     */
    @NotNull(message = "spanId不能为空")
    private Integer spanId;

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

}
