ES创建实体类

1.创建类

2.设置kibana时区  不需要再+8了

 



import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

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

@Document(indexName = StudentTaskStatusDocument.INDEX_NAME, type = StudentTaskStatusDocument.TYPE)
public class StudentTaskStatusDocument implements Serializable {
	
	public static final String INDEX_NAME = "student_task_status";

	public static final String TYPE = "studentTaskStatusDoc";
	
	public static final String ALIAS = "studentTaskStatus";//别名
	
	@Id
    private String id;

	// 下发时间
	@Field(type = FieldType.Date, format=DateFormat.custom,pattern ="yyyy-MM-dd HH:mm:ss:SSS")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
    private Date creTime;


	// 修改时间
    @Field(type = FieldType.Date, format=DateFormat.custom,pattern ="yyyy-MM-dd HH:mm:ss:SSS")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
    private Date modTime;

    // 开始做作业BEGIN,标准完成STANDARD_COMPLETION,作业完成COMPLETE
    private String taskStatus;


    // 布置作业人id
    private String creTaskUser;

    // 作业创建者类型:教师TEACHER,家长PARENT,学生自己STUDENT
    private String creTaskType;

    // 任务id
    private String taskId;

    // 任务标题
    private String taskTitle;

    // 作业类型: EXERCISES 练习 TESTFLOW 测试 EXAM 考试
    private String taskType;

    // 学校id
    private String schoolId;

    private String schoolName;

    // 班级id
    private String classId;

    private String className;

    // 年级
    private String gradeLevel;

    // 学校id
    private String studentId;

    private String studentName;

    // 学科
    private String subjectCode;

    // 学习的累积时间
    private Integer timeScope;

    // 开始做题时间
    @Field(type = FieldType.Date, format=DateFormat.custom,pattern ="yyyy-MM-dd HH:mm:ss:SSS")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
    private Date beginTime;


    // 结束做题时间
    @Field(type = FieldType.Date, format=DateFormat.custom,pattern ="yyyy-MM-dd HH:mm:ss:SSS")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
    private Date endTime;

    // 版本id
    private String versionId;

    // 地区id
    private String areaId;

    // 地区code
    private String areaCode;


    // 省id
    private String provinceId;

    // 市id
    private String cityId;


    // 县id
    private String countyId;

    // 平台id
    private String domainId;


    private String sessionId;

    
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值