package com.sckw.system.model;

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 lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 装载作业记录表
 * @author chenxiaofei
 * @date 2026-01-07
 */
@EqualsAndHashCode(callSuper = false)
@Data
@Accessors(chain = true)
@TableName("loading_records")
public class LoadingRecords implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 雪花ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 操作员ID
     */
    @TableField("operator_id")
    private Long operatorId;

    /**
     * 车牌号
     */
    @TableField("license_plate")
    private String licensePlate;

    /**
     * 客户名称
     */
    @TableField("customer_name")
    private String customerName;

    /**
     * 装载类型: 1-装载, 2-补货
     */
    @TableField("load_type")
    private Integer loadType;

    /**
     * 物料ID
     */
    @TableField("material_id")
    private Long materialId;

    /**
     * 装载数量/重量
     */
    @TableField("quantity")
    private BigDecimal quantity;

    /**
     * 作业日期
     */
    @TableField("work_date")
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date workDate;

    /**
     * 记录创建时间
     */
    @TableField("created_at")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

}

