package cn.bunny.mvc.dao.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Schema(name = "BillDto对象", title = "账单信息查询内容", description = "账单信息查询内容")
public class BillDto {

    @Schema(name = "userId", title = "绑定的用户id")
    private Long userId;

    @Schema(name = "amount", title = "金额")
    private BigDecimal amount;

    @Schema(name = "categoryIds", title = "类别分类")
    private List<Long> categoryIds;

    @Schema(name = "username", title = "类型：1 - 收入，-1 - 支出")
    private Byte type;

    @Schema(name = "description", title = "描述")
    private String description;

    @Schema(name = "startDate", title = "开始交易日期")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @Schema(name = "endDate", title = "结束交易日期")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate endDate;

}