package jnpf.model.cultivate.v2.position.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jnpf.model.cultivate.po.position.FtbCultivatePositionCourse;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class FtbCultivatePositionCourseVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;

    /**
     * 课程主键ID
     */

    private String courseId;

    /**
     * 课程名称
     */
    private String courseName;
    /**
     * 课程显示id
     */
    private String courseIdShow;
    /**
     * 岗位ID
     */

    private String postRankId;

    /**
     * 职级ID
     */
    private String gradeId;

    /**
     * 岗位学习主键ID
     */

    private String postLearnId;

    /**
     * 是否必修，0必修，1选修
     */

    private Integer compulsory;


    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastModifyTime;

    /**
     * 排序字段
     */
    private Long sortCode = 0L;

    /**
     * 岗位学习课程关联考试表
     */
    private FtbCultivatePositionCourseExamVo exam;
    /**
     * 岗位学习课程关联鉴定表
     */
    private FtbCultivatePositionCourseIdentityVo identity;

    private List<FtbCultivatePositionCoursePracticeVo> practiceList;

    private FtbCultivatePositionCourseCertificateVo certificate;

    public void convert(FtbCultivatePositionCourse course) {
        this.setId(course.getId());
        this.setCourseId(course.getCourseId());
        this.setPostRankId(course.getPostRankId());
        this.setGradeId(course.getGradeId());
        this.setPostLearnId(course.getPostLearnId());
        this.setCompulsory(course.getCompulsory());
        this.setLastModifyTime(course.getLastModifyTime());
    }
}