package com.yonge.cooleshow.biz.dal.wrapper.course;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.enums.OrderStatusEnum;
import com.yonge.cooleshow.biz.dal.enums.album.PurchaseRecordTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.course.CourseRelationTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.course.CourseTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.course.RelationMusicAlbumEnum;
import com.yonge.cooleshow.common.enums.YesOrNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 课程关联曲目、专辑信息
 * Created by Eric.Shang on 2022/10/24.
 */
public class CourseRelationWrapper {

    /**
     * 关联曲目、专辑信息
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class MusicAlbumInfo implements Serializable {

        @ApiModelProperty("主键 ")
        private Long id;

        @ApiModelProperty("课程组id ")
        private Long courseGroupId;

        @ApiModelProperty("课程ID ")
        private Long courseId;

        @ApiModelProperty("课程类型 ")
        private CourseTypeEnum courseType;

        @ApiModelProperty("关联类型, MUSIC, ALBUM ")
        private RelationMusicAlbumEnum relationType;


        @ApiModelProperty("关联类型,RECOMMEND:推荐  GIFT:赠品 ")
        private CourseRelationTypeEnum useRelationType;

        @ApiModelProperty("关联曲目专辑ID ")
        private Long musicAlbumId;

        @ApiModelProperty("曲目/专辑名称")
        private String name;

        @ApiModelProperty("图标/封面")
        private String cover;

        @ApiModelProperty("曲目音乐人 专辑简介")
        private String remark;

        @ApiModelProperty("视频标题")
        private String videoTitle;

        @ApiModelProperty("标签id")
        private String tagIds;

        @ApiModelProperty("标签")
        private String tagName;

        @ApiModelProperty("是否启用 0：否 1：是")
        private YesOrNoEnum status;

        public MusicAlbumInfo name(String name) {
            this.name = name;
            return this;
        }




        public MusicAlbumInfo cover(String cover) {
            this.cover = cover;
            return this;
        }
    }

    /**
     * 课程赠送曲目、专辑信息
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class MusicAlbumRecord implements Serializable {

        @ApiModelProperty(value = "主键id")
        private Long id;  //主键ID

        @ApiModelProperty(value = "曲谱ID")
        private Long musicSheetId;  //曲谱ID

        @ApiModelProperty(value = "老师ID")
        private Long teacherId;  //老师ID

        @ApiModelProperty(value = "订单流水号")
        private String orderNo;  //订单流水号

        @ApiModelProperty(value = "用户类型 TEACHER:老师，STUDENT:学生")
        private ClientEnum clientType;

        @ApiModelProperty(value = "学生ID")
        private Long studentId;  //学生ID

        @ApiModelProperty(value = "购买时间")
        private java.util.Date purchaseTime;  //购买时间

        @ApiModelProperty(value = "购买价格")
        private java.math.BigDecimal purchasePrice;  //购买价格

        @ApiModelProperty(value = "原价")
        private BigDecimal originalPrice;

        @ApiModelProperty("服务费")
        private BigDecimal musicSheetServiceFee;

        @ApiModelProperty(value = "订单状态(WAIT_PAY:待支付;PAYING:支付中,PAID:已付款)")
        private OrderStatusEnum orderStatus;  //订单状态(1:已完成;0:取消)

        @ApiModelProperty(value = "课程关联曲目专辑ID")
        private Long courseMusicAlbumId;

        @ApiModelProperty("购买类型 ")
        private PurchaseRecordTypeEnum purchaseType;
    }

    /**
     * 课程购买记录查询
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PurchaseRecordQueryInfo implements Serializable {

        @ApiModelProperty("购买课程类型 ")
        private CourseTypeEnum courseType;

        @ApiModelProperty("订单支付状态 ")
        private OrderStatusEnum orderStatus;

        @ApiModelProperty("课程组ID")
        private Long groupId;
    }

}
