package com.sqx.modules.course.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;

/**
 * @description course_user  用户短剧
 * @author fang
 * @date 2021-03-27
 */
@Data
@TableName("course_user")
public class CourseUser implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 我的短剧id
     */
    @TableId(type = IdType.ID_WORKER)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseUserId;

    /**
     * 短剧id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseId;

    /**
     * 集数id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseDetailsId;

    /**
     * 分类 1整集/2单集
     */
    private Integer classify;

    /**
     * 订单id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    /**
     * 用户id
     */
    @TableField(updateStrategy = FieldStrategy.NEVER)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 更新时间
     */
    private String updateTime;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private String courseCount;

    public CourseUser() {}
}
