package com.aiotagro.cattletrade.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

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

/**
 * 屠宰场进场记录实体
 *
 * @author System
 * @date 2025-12-09
 */
@Data
@TableName("slaughter_entry")
public class SlaughterEntry implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 屠宰场ID
     */
    @TableField("slaughter_house_id")
    private Integer slaughterHouseId;

    /**
     * 运送清单ID
     */
    @TableField("delivery_id")
    private Integer deliveryId;

    /**
     * 订单ID
     */
    @TableField("order_id")
    private Integer orderId;

    /**
     * 起始地
     */
    @TableField("start_location")
    private String startLocation;

    /**
     * 起始经度
     */
    @TableField("start_lon")
    private String startLon;

    /**
     * 起始纬度
     */
    @TableField("start_lat")
    private String startLat;

    /**
     * 目的地
     */
    @TableField("end_location")
    private String endLocation;

    /**
     * 目的地经度
     */
    @TableField("end_lon")
    private String endLon;

    /**
     * 目的地纬度
     */
    @TableField("end_lat")
    private String endLat;

    /**
     * 司机姓名
     */
    @TableField("driver_name")
    private String driverName;

    /**
     * 联系方式
     */
    @TableField("driver_mobile")
    private String driverMobile;

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

    /**
     * 出肉率（%）
     */
    @TableField("yield_rate")
    private BigDecimal yieldRate;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 逻辑删除标记(0-正常,1-已删除)
     */
    @TableLogic(value = "0", delval = "1")
    @TableField("is_delete")
    private Integer isDelete;

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

    /**
     * 创建人ID
     */
    @TableField("created_by")
    private Integer createdBy;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 更新人ID
     */
    @TableField("updated_by")
    private Integer updatedBy;
}

