package com.m2pool.lease.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 商品对应实际商品返回对象
 * </p>
 *
 * @author yyb
 * @since 2025-07-23
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "商品对应实际商品返回对象",value = "ProductMachineDto" )
public class ProductMachineDto {

    @ApiModelProperty(value = "矿机ID")
    private Long id;

    @ApiModelProperty(value = "购物车详情id")
    private Long cartInfoId;

    @ApiModelProperty(value = "店铺id")
    private Long shopId;

    @ApiModelProperty(value = "商品 ID")
    private Long productId;

    @ApiModelProperty(value = "挖矿机器 对应的矿工账号")
    private String user;


    @ApiModelProperty(value = "挖矿机器型号")
    private String type;

    @ApiModelProperty(value = "挖矿机器编号")
    private String miner;


    @ApiModelProperty(value = "单价")
    private BigDecimal price;


    @ApiModelProperty(value = "3天算力平均大小---实际实时算力（计算得到，商家不能够自己添加和修改）")
    private BigDecimal computingPower;



    @ApiModelProperty(value = "理论算力（卖方手动填写）")
    private BigDecimal theoryPower;

    @ApiModelProperty(value = "算力单位")
    private String unit;

    @ApiModelProperty(value = "上下架状态，0 上架，1 下架")
    private Integer state;

    @ApiModelProperty(value = "售出状态 0未售出 1已售出 2售出中")
    private Integer saleState;

   @ApiModelProperty(value = "机器算力最早记录的一次时间（和endTime相减得到商品上实时算力平均值计算的时间段）")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "机器算力最近记录的一次时间")
    private LocalDateTime endTime;


    @ApiModelProperty(value = "单机理论收入（每日） 单位币种")
    private BigDecimal theoryIncome;

    @ApiModelProperty(value = "单机理论收入（每日） 单位USDT")
    private BigDecimal theoryUsdtIncome;

    @ApiModelProperty(value = "租赁天数")
    private Integer leaseTime;

    @ApiModelProperty(value = "算法")
    private String algorithm;

    @ApiModelProperty(value = "功耗 单位kw/h",example = "10")
    private BigDecimal powerDissipation;

    @ApiModelProperty(value = "最大可租借天数(默认七天)",example = "7")
    private Integer maxLeaseDays;

    @ApiModelProperty(value = "挖矿机器挖矿币种")
    private String coin;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "是否删除 0否 1是")
    private Integer del;

    @ApiModelProperty(value = "支付币种")
    private String payCoin;


    @ApiModelProperty(value = "售价集合")
    private List<MachinePayTypeDto> priceList;
}
