package com.jy.framework.model.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.jy.framework.model.validation.AddGroup;
import com.jy.framework.model.validation.EditGroup;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

@Getter
@Setter
public class BaseIdPo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Null(groups = AddGroup.class)
    @NotNull(groups = EditGroup.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

}
