package com.cirle.scientific.po;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.time.LocalDateTime;


@Entity
@Table(name = "qkj_study_record_app")
@Data
@ApiModel
@EntityListeners(AuditingEntityListener.class)
public class QkjStudyRecordApp {

    private static final long serialVersionUID = -2257461108638049692L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id")
    private Long id;

    private String memCard;
    /**
     * 学习的类型 暂时只有课程 1：理论课程 2：技能课程
     */
    private Integer objType;
    /**
     * 类型对应的ID
     */
    private Long objId;
    /**
     * 是否学习完成 0:未完成 1:已完成
     */
    private Integer studyAccomplish;

    /**
     * 观看时长
     */
    private Integer presentTime;

    /**
     * 总时长
     */
    private Integer duration;

    @CreatedDate
    @Column(nullable = false, updatable = false)
    private LocalDateTime createTime;

    @LastModifiedDate
    @Column()
    private LocalDateTime updateTime;
}
