package com.izouma.nineth.dto;

import com.izouma.nineth.domain.Asset;
import com.izouma.nineth.domain.FileObject;
import com.izouma.nineth.domain.PreEmptionPrivilege;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
public class AssetDTO extends Asset {


    public AssetDTO(Asset asset){
        BeanUtils.copyProperties(asset, this);
    }

    /**
     * 分组合并
     *
     */
    public AssetDTO(Long userId, String name, List<FileObject> pic, String minter,
                    String minterAvatar, Long collectionId, Long assetCount){
        this.setUserId(userId);
        this.setName(name);
        this.setPic(pic);
        this.setMinter(minter);
        this.setMinterAvatar(minterAvatar);
        this.setCollectionId(collectionId);
        this.assetCount = assetCount;
    }

    private PreEmptionPrivilege preEmptionPrivilege;

    /**
     * 用户手机号
     */
    private String phone;

    /**
     * 资产数量
     */
    private Long assetCount;

}
