package com.ytpm.advertise.param;

import com.ytpm.agent.param.AppParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddAppParam {
    @ApiModelProperty(value = "1-安卓 2-IOS",required = true)
    private Integer platform;
    @ApiModelProperty(value = "应用名称", required = true)
    private String name;
    @ApiModelProperty(value = "是否应用商店上架 1-否 2-是 ",required = true)
    private Integer store_on_sale;
    @ApiModelProperty(value = "商店类型 枚举类StoreTypeEnum", required = false)
    private Integer store_type;
    @ApiModelProperty(value = "应用商店链接",required  = false)
    private String store_url;
    @ApiModelProperty(value = "应用包名",required = true)
    private String package_name;
    @ApiModelProperty(value = "一级分类", required = true)
    private String category;
    @ApiModelProperty(value = "二级分类",required = true)
    private String sub_category;
    @ApiModelProperty(value = "屏幕方向 1-竖屏 2-横屏 3-所有",required = true)
    private Integer screen_orientation;
    @ApiModelProperty(value = "是否遵守COPPA协议 1-否 2-是", required = true)
    private Integer coppa;
    @ApiModelProperty(value = "是否遵守CCPA协议 1-否 2-是", required = true)
    private Integer ccpa;
    @ApiModelProperty(value = "应用ID",required = false, notes = "修改时传新增时不传")
    private String uuid;
    @ApiModelProperty(value = "taku公钥",required = true)
    private String takuPublicKey;

    public AddAppParam(AppParam param) {
        this.platform = param.getAppType();
        this.name = param.getAppName();
        this.store_on_sale = param.getStore_on_sale();
        this.store_type = param.getStore_type();
        this.store_url = param.getStore_url();
        this.package_name = param.getPackage_name();
        this.category = param.getCategory();
        this.sub_category = param.getSub_category();
        this.screen_orientation = param.getScreen_orientation();
        this.coppa = param.getCoppa();
        this.ccpa = param.getCcpa();
        this.uuid = param.getAppId();
    }
}
