|
|
@@ -6,6 +6,7 @@ import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
+import com.goafanti.common.enums.ActivityStatus;
|
|
|
|
|
|
public class Lecture {
|
|
|
private String id;
|
|
|
@@ -187,4 +188,18 @@ public class Lecture {
|
|
|
public void setEndTimeFormattedDate(String endTimeFormattedDate) {
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ public Integer getLectureStatus(){
|
|
|
+ if (this.lectureTime == null){
|
|
|
+ return ActivityStatus.ENROLL.getCode();
|
|
|
+ }
|
|
|
+ if (new Date().getTime() > this.lectureTime.getTime()){
|
|
|
+ return ActivityStatus.CLOSED.getCode();
|
|
|
+ }
|
|
|
+ return ActivityStatus.ENROLL.getCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setLectureStatus(Integer lectureStatus){
|
|
|
+
|
|
|
+ }
|
|
|
}
|