package com.haha.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("t_timed_discount_statistics")
public class TimedDiscountStatistics implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long activityId;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private LocalDate statDate;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long shopId;

    private String shopName;

    private Integer totalAdjustedProducts;

    private Integer priorityProducts;

    private Integer totalAdjustedStock;

    private Integer totalSoldQuantity;

    private Integer prioritySoldQuantity;

    private BigDecimal originalValue;

    private BigDecimal actualSales;

    private BigDecimal savedAmount;

    private BigDecimal wasteReductionRate;

    private BigDecimal sellThroughRate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private String activityName;
}
