package cn.bunny.dao.dto.financial.bill.user;

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

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Schema(name = "BillUserUpdateDto对象", title = "用户账单信息更新内容", description = "用户账单信息更新内容")
public class BillUserUpdateDto {

    @Schema(name = "id", title = "主键")
    @NotNull(message = "id不能为空")
    private Long id;

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

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

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

    @Schema(name = "transactionDate", title = "交易日期")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime transactionDate;

    @Schema(name = "categoryId", title = "类别id")
    private Long categoryId;

}