package com.app.entity.order;

import com.app.constant.OrderConstant;
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;

@ApiModel("开课 - 订单项")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("t_open_course_order_item")
public class OpenCourseOrderItem extends BaseEntity {

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

    @ApiModelProperty("开课订单标识")
    @NotEmpty
    @TableField("open_course_order_id")
    private String openCourseOrderId;

    @ApiModelProperty("开课标识")
    @NotEmpty
    @TableField("open_course_id")
    private String openCourseId;

    @ApiModelProperty("家长标识")
    @NotEmpty
    @TableField("guardian_id")
    private String guardianId;

    /**
     * @see OrderConstant.OrderItemState
     */
    @ApiModelProperty("订单项状态")
    @NotNull
    @TableField("state")
    private Integer state;

    @ApiModelProperty("家长小孩标识")
    @NotEmpty
    @TableField("guardian_child_id")
    private String guardianChildId;

    @ApiModelProperty("小孩姓名")
    @NotEmpty
    @TableField("child_name")
    private String childName;

    @ApiModelProperty("手机号码")
    @NotEmpty
    @TableField("phone_number")
    private String phoneNumber;

    @ApiModelProperty("课后回家方式")
    @NotNull
    @TableField("go_home")
    private String goHome;

    @ApiModelProperty("学年")
    @NotNull
    @TableField("school_year")
    private Integer schoolYear;

    @ApiModelProperty("学期")
    @NotNull
    @TableField("semester")
    private Integer semester;

    @ApiModelProperty("学校标识")
    @NotEmpty
    @TableField("school_id")
    private String schoolId;

    @ApiModelProperty("学校名称")
    @NotEmpty
    @TableField("school_name")
    private String schoolName;

    /**
     * 年级名称
     *
     * @see com.app.constant.SchoolConstant#PRIMARY_SCHOOL
     * @see com.app.constant.SchoolConstant#MIDDLE_SCHOOL
     * @see com.app.constant.SchoolConstant#HIGH_SCHOOL
     */
    @ApiModelProperty("年级名称")
    @NotEmpty
    @TableField("grade_name")
    private Integer gradeName;

    /**
     * 班级名称
     *
     * @see com.app.constant.SchoolConstant#CLASS_NAME_LIST
     */
    @ApiModelProperty("班级名称")
    @NotEmpty
    @TableField("class_name")
    private Integer className;

    // todo 更改为openCourseOrderName
    @ApiModelProperty("开课名称")
    @NotNull
    @TableField("name")
    private String name;

    // todo 更改为openCourseOrderPrice
    @ApiModelProperty("开课价格")
    @NotNull
    @TableField("price")
    private Double price;

    // todo 更改为openCourseOrderCycle
    @ApiModelProperty("星期X")
    @NotEmpty
    @TableField("cycle")
    private String cycle;

    // todo 更改为openCourseOrderHours
    @ApiModelProperty("时间段")
    @NotEmpty
    @TableField("hours")
    private String hours;

}
