package cn.reghao.tnb.content.app.mall.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author reghao
 * @date 2024-04-26 16:37:29
 */
@NoArgsConstructor
@Getter
@Setter
public class ProductSnapshot extends BaseObject<Integer> {
    private Long orderId;
    private Long itemId;
    private String title;
    private String picUrl;
    private Double price;

    public ProductSnapshot(long orderId, Product product) {
        this.orderId = orderId;
        this.itemId = product.getItemId();
        this.title = product.getTitle();
        this.picUrl = product.getPicUrl();
        this.price = product.getPrice();
    }
}
