package com.pcloud.book.rightsSetting.entity;

import com.pcloud.book.applet.dto.AppletNewsServeDTO;
import com.pcloud.book.applet.entity.AppletNewsServe;
import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.common.entity.BaseEntity;
import com.pcloud.common.page.PageBeanNew;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.NonNull;
import org.hibernate.validator.constraints.Length;

@Data
public class RightsSetting extends BaseTempletClassify {

    @ApiModelProperty("权益编号")
    private String rightsNumber;

    private String introduce;

    private String detail;

    private Integer count;

    private Long firstClassify;

    private Long secondClassify;

    private Long thirdClassify;

    private Long gradeLabelId;

    private Long subjectLabelId;

    @ApiModelProperty("线上网课是否开启")
    private Boolean onlineCourseOpen;

    @ApiModelProperty("学习工具是否开启")
    private Boolean learningToolOpen;

    @ApiModelProperty("抽奖是否开启")
    private Boolean drawNowOpen;

    @NonNull
    @ApiModelProperty("线上网课集合")
    private RightsSettingTitle onlineRightsSettingTitle;

    @NonNull
    @ApiModelProperty("学习工具集合")
    private RightsSettingTitle  learningToolTitle;

    @NonNull
    @ApiModelProperty("抽奖集合")
    private RightsSettingTitle drawSettingTitle;

    @NonNull
    @ApiModelProperty("专享礼包券集合")
    private RightsSettingTitle giftCouponPackageTitle;

    @NonNull
    @ApiModelProperty("社群集合")
    private RightsSettingTitle groupServiceTitle;

    @NonNull
    @ApiModelProperty("配套资料集合")
    private RightsSettingTitle servesTitle;

    @ApiModelProperty("本书立享权益")
    private RightsSettingNow rightsSettingNow;

    @ApiModelProperty("更新步骤类型 0 基本信息，1、本书立享权益，2，周，3，长期")
    private Integer stepType;

    @ApiModelProperty("启用专享社群服务")
    private Integer enableGroupService = 0;

    @ApiModelProperty("权益类型;【1分类权益、2书刊权益】")
    private Integer rightsSettingType = 1;

    @ApiModelProperty("书刊id")
    private Long bookId;

    @ApiModelProperty("书刊ids")
    private List<RightsSettingBookRelation> rightsSettingBookRelations;

    /**
     * 书或isbn查询
     */
    private String bookQuery;
    /**
     * 书名
     */
    private String bookName;

    /**
     * 每周权益
     */
    private List<RightsSettingItem> rightsSettingWeekItems;

    /**
     * 长期权益
     */
    private List<RightsSettingItem> rightsSettingLongTermItems;

    @ApiModelProperty("权益配套资料分组集合")
    private List<RightsItemGroup> rightsItemGroups;

    @ApiModelProperty("权益阅读方式标题")
    @Length(min=0, max=30,message = "权益阅读方式标题最大30个字")
    private String readTypeTitle;

    @ApiModelProperty("权益de阅读方式")
    @Size(min = 3,max = 3,message = "目前有且只有3种阅读方式")
    @Valid
    private List<RightsReadType> rightsReadTypes;

    /**
     * 上下册标签id
     */
    private Long volLabelId;

    @ApiModelProperty("是否打开阅读指引 1：开 0：关")
    private Long guideIsOpen;

    private Long guideId;

    @NonNull
    @ApiModelProperty("阅读指引图片")
    private String guidePic;

    @ApiModelProperty("阅读指引标题")
    private String guideTitle;

    @NonNull
    @ApiModelProperty("阅读指引类型")
    private String guideType;

    @ApiModelProperty("咨询对象")
    private RightsNowItem guideNewsItem;

    @ApiModelProperty("小程序对象")
    private AppletThirdResources guideAppletServe;

    @ApiModelProperty("版本标签")
    private Long verLabelId;

    @ApiModelProperty("上下架状态")
    private Boolean showState;

    private Long agentId;

    @ApiModelProperty("应用或作品对象")
    private RightsNowItem guideAppItem;

    @ApiModelProperty("应用或作品跳转地址")
    private String guideLinkUrl;

    @ApiModelProperty("专业标签ID")
    private Long proLabelId;

    @ApiModelProperty("深度标签ID")
    private Long depLabelId;

    @ApiModelProperty("目的标签ID")
    private Long purLabelId;

    @ApiModelProperty("专业标签名称")
    private String proLabelName;

    @ApiModelProperty("深度标签名称")
    private String depLabelName;

    @ApiModelProperty("目的标签名称")
    private String purLabelName;

    /**
     * 年级标签
     */
    private String graLabelName;

    /**
     * 科目标签
     */
    private String subLabelName;

    /**
     * 版本标签
     */
    private String verLabelName;

    /**
     * 地域标签
     */
    private String areaLabelName;
    /**
     * 上下册标签
     */
    private String volLabelName;

    /**
     * 地域标签id
     */
    private Long areaLabelId;

    private String  firstClassifyContent;

    private String secondClassifyContent;

    private String thirdClassifyContent;

    private String gradeLabelIdContent;

    private String subjectLabelIdContent;

    private String volLabelContent;

    private String verLabelContent;

    private String areaLabelContent;

    private Long createUserId;

    private Long updateUserId;

    private String createUserName;

    private String updateUserName;

    public RightsSetting() {

    }
}