package com.starry.common.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author admin
 * 分页基类
 * @since 2021/9/2
 */
@Data
@Accessors(chain = true)
public class BasePageEntity implements Serializable {

    private int currentPage = 1;

    private int pageSize = 10;

    private int pageNum = 1;

    @TableField(fill = FieldFill.INSERT)
    private Boolean deleted = Boolean.FALSE;

    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @TableField(fill = FieldFill.UPDATE)
    private Date updatedTime;

    @TableField(fill = FieldFill.UPDATE)
    private String updatedBy;

    /**
     * 开始日期
     */
    @TableField(exist = false)
    private String beginTime;

    /**
     * 结束日期
     */
    @TableField(exist = false)
    private String endTime;

}

