package com.boman.system.common;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author:zc
 * @since:2018/12/27
 * @createat:2018/12/274:41 PM
 */
@Data
@ToString
@EqualsAndHashCode
public class BaseTableSaveDTO implements Serializable {

    private static final long serialVersionUID = -8653990707913725671L;
    @JSONField(name = "objId")
    private Long objId;

    @JSONField(name = "fixedData")
    private JSONObject fixedData;

    @JSONField(name = "table")
    private String table;

    /**
     * 逻辑删除，数据库对应的属性名称
     */
    @JSONField(name = "logicDelName")
    private String logicDelName;

    /**
     * 逻辑删除，数据库对应的属性值
     */
    @JSONField(name = "logicDelValue")
    private String logicDelValue;

    /**
     * 删除时，前台传过来需要删除的idList
     */
    @JSONField(name = "idList")
    private List<Long> idList;

    /**
     * orderBy eg: order_by columnName desc
     */
    @JSONField(name = "orderBy")
    private String orderBy;

    /**
     * 分页
     */
    @JSONField(name = "limit")
    private Integer limit;

    /**
     * 分页
     */
    @JSONField(name = "offset")
    private Integer offset;
}
