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
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String instanceParams;
|
private String instanceParams;
|
||||||
|
|
||||||
// 该任务实例的类型,普通/工作流(InstanceType)
|
// 该任务实例的类型,普通/工作流(InstanceType)
|
||||||
@ -51,7 +51,7 @@ public class InstanceInfoDO {
|
|||||||
// 执行结果(允许存储稍大的结果)
|
// 执行结果(允许存储稍大的结果)
|
||||||
@Lob
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String result;
|
private String result;
|
||||||
// 预计触发时间
|
// 预计触发时间
|
||||||
private Long expectedTriggerTime;
|
private Long expectedTriggerTime;
|
||||||
|
@ -53,7 +53,7 @@ public class JobInfoDO {
|
|||||||
// 执行器信息(可能需要存储整个脚本文件)
|
// 执行器信息(可能需要存储整个脚本文件)
|
||||||
@Lob
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String processorInfo;
|
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)
|
// 工作流的DAG图信息(点线式DAG的json)
|
||||||
@Lob
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String peDAG;
|
private String peDAG;
|
||||||
|
|
||||||
/* ************************** 定时参数 ************************** */
|
/* ************************** 定时参数 ************************** */
|
||||||
|
@ -40,16 +40,16 @@ public class WorkflowInstanceInfoDO {
|
|||||||
// 工作流启动参数
|
// 工作流启动参数
|
||||||
@Lob
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String wfInitParams;
|
private String wfInitParams;
|
||||||
|
|
||||||
@Lob
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String dag;
|
private String dag;
|
||||||
@Lob
|
@Lob
|
||||||
@Column
|
@Column
|
||||||
@Type(type ="org.hibernate.type.StringType")
|
@Type(type = TypeDefConstant.STRING_TYPE)
|
||||||
private String result;
|
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