package com.app.entity.basics;

import com.app.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 功能描述：课程
 *
 * @Auther: 梁展鹏
 * @Date: 2018/7/17 14:03
 */
@ApiModel("课程")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("t_course")
public class Course extends BaseEntity {

    @ApiModelProperty("机构id")
    @NotEmpty
    @TableField(value = "organ_id")
    private String organId;

    @ApiModelProperty("课程名称")
    @NotEmpty
    @TableField("name")
    private String name;

    @ApiModelProperty("缩略图")
    @TableField("thumbnail")
    private String thumbnail;

    @ApiModelProperty("横幅")
    @TableField("banner")
    private String banner;

    /* todo 数据字典（德育、智育、体育、美育、劳育） */
    @ApiModelProperty("类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("课程介绍")
    @NotEmpty
    @TableField("introduce_url")
    private String introduceUrl;

    /**
     * 课程价格
     * 基本都是整数场景，暂不考虑使用BigDecimal
     */
    @ApiModelProperty("课程价格")
    @NotNull
    @TableField("price")
    private Double price;

    @ApiModelProperty("备注")
    @TableField("remarks")
    private String remarks;

}
