package com.heyu.api.data.dto.vv;

import com.alibaba.fastjson.JSON;
import com.heyu.api.data.entity.vv.VvCommentDetailEntity;
import com.heyu.api.data.entity.vv.VvCommentEntity;
import com.heyu.api.data.kuaidi100.ActionDTO;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class VvCommentDTO extends VvCommentEntity {

    private List<VvCommentDetailEntity> vvCommentDetailEntities;

    /***
     * 用户是否已经点击有用, 1 已经点击 ， 0 未点击
     */
    private Integer userful = 0 ;


    /***
     * 操作信息
     */
    private List<ActionDTO>  commentActionList;




    public static void main(String[] args) {
        VvCommentDTO vvCommentDTO = new VvCommentDTO();

        vvCommentDTO.setProductComment("testn");

        vvCommentDTO.setTradeOrderId(10L);

        vvCommentDTO.setSkuId(20L);

        vvCommentDTO.setProductId(4L);

        vvCommentDTO.setProductTitle("test");

        vvCommentDTO.setSkuInfo("3w893");

        vvCommentDTO.setStatus("wait_approval");

        vvCommentDTO.setCreateTimestamp(System.currentTimeMillis());

        List<VvCommentDetailEntity> vvCommentDetailEntities = new ArrayList<>();



        VvCommentDetailEntity vvCommentDetailEntity = new VvCommentDetailEntity();

        vvCommentDetailEntity.setCommentUrl("ewieow");
        vvCommentDetailEntity.setType("image");

        vvCommentDetailEntities.add(vvCommentDetailEntity);

        vvCommentDTO.setVvCommentDetailEntities(vvCommentDetailEntities);

        System.out.println(JSON.toJSONString(vvCommentDTO));
    }
}
