package com.zsElectric.boot.business.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 用户积分日志记录表单对象
 *
 * @author zsElectric
 * @since 2025-12-12 10:25
 */
@Getter
@Setter
@Schema(description = "用户积分日志记录表单对象")
public class UserInfoIntegralLogForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "原积分")
    private BigDecimal integralNumOrg;

    @Schema(description = "积分")
    private BigDecimal integralNum;

    @Schema(description = "类型（1，增加；2，扣减）")
    private Integer type;

    @Schema(description = "来源（1自动上账，2手动上账）")
    @Size(max=2, message="来源（1自动上账，2手动上账）长度不能超过2个字符")
    private String sourceType;

    @Schema(description = "来源单号")
    @Size(max=100, message="来源单号长度不能超过100个字符")
    private String changNo;

    @Schema(description = "备注")
    @Size(max=255, message="备注长度不能超过255个字符")
    private String remark;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
