package org.xyzh.common.dto;

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

import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

@Data
@Schema(description = "基础数据传输对象")
public class BaseDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @Schema(description = "操作流水号")
    private String optsn;
    
    @Schema(description = "创建人")
    private String creator;
    
    @Schema(description = "更新人")
    private String updater;
    
    @Schema(description = "部门路径")
    private String deptPath;
    
    @Schema(description = "备注")
    private String remark;

    @Schema(description = "创建时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "更新时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Schema(description = "删除时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;
    
    @Schema(description = "是否已删除", defaultValue = "false")
    private Boolean deleted = false;


    // =============== 下方为筛选字段，非数据库字段 ================

    @Schema(description = "数量限制")
    private Integer limit;
    
    @Schema(description = "开始时间")
    private Date startTime;

    @Schema(description = "结束时间")
    private Date endTime;

    @Schema(description = "排序字段")
    private List<OrderField> orderFields;
}