mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
TypeDef
This commit is contained in:
parent
4eb53990f4
commit
35f0991f03
@ -37,7 +37,7 @@ public class InstanceInfoDO {
|
||||
// 任务实例参数
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String instanceParams;
|
||||
|
||||
// 该任务实例的类型,普通/工作流(InstanceType)
|
||||
@ -51,7 +51,7 @@ public class InstanceInfoDO {
|
||||
// 执行结果(允许存储稍大的结果)
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String result;
|
||||
// 预计触发时间
|
||||
private Long expectedTriggerTime;
|
||||
|
@ -53,7 +53,7 @@ public class JobInfoDO {
|
||||
// 执行器信息(可能需要存储整个脚本文件)
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String processorInfo;
|
||||
|
||||
/* ************************** 运行时配置 ************************** */
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.github.kfcfans.powerjob.server.persistence.core.model;
|
||||
|
||||
/**
|
||||
* @see package-info.java
|
||||
* @author user
|
||||
*/
|
||||
public final class TypeDefConstant {
|
||||
public static final String STRING_TYPE = "string-type";
|
||||
}
|
@ -36,7 +36,7 @@ public class WorkflowInfoDO {
|
||||
// 工作流的DAG图信息(点线式DAG的json)
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String peDAG;
|
||||
|
||||
/* ************************** 定时参数 ************************** */
|
||||
|
@ -40,16 +40,16 @@ public class WorkflowInstanceInfoDO {
|
||||
// 工作流启动参数
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String wfInitParams;
|
||||
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String dag;
|
||||
@Lob
|
||||
@Column
|
||||
@Type(type ="org.hibernate.type.StringType")
|
||||
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||
private String result;
|
||||
|
||||
// 预计触发时间
|
||||
|
@ -0,0 +1,7 @@
|
||||
@TypeDefs({
|
||||
@TypeDef(name = TypeDefConstant.STRING_TYPE, typeClass = org.hibernate.type.StringType.class)
|
||||
})
|
||||
package com.github.kfcfans.powerjob.server.persistence.core.model;
|
||||
|
||||
import org.hibernate.annotations.TypeDef;
|
||||
import org.hibernate.annotations.TypeDefs;
|
Loading…
x
Reference in New Issue
Block a user