
package com.tmerclub.cloud.order.bo.mongo;

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 虚拟订单核销记录
 *
 * @author TRACK
 */
@CompoundIndexes({
        @CompoundIndex(name = "order_idx", def = "{'orderId':1}"),
        @CompoundIndex(name = "shop_idx", def = "{'shopId':1}"),
        @CompoundIndex(name = "station_idx", def = "{'stationId':1}")
})
@Document("order_virtual_info_log")
@Data
@ToString
public class MongoOrderVirtualInfoLogBO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 核销日志id
     */
    @Id
    private Long orderVirutalInfoLogId;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 订单号
     */
    private Long orderId;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 自提点id
     */
    private Long stationId;

    /**
     * 核销码
     */
    private String writeOffCode;

    public MongoOrderVirtualInfoLogBO() {
    }

}
