Record Class HistoryRecord

java.lang.Object
java.lang.Record
cloud.opencode.base.flow.model.HistoryRecord
Record Components:
id - history record id — 记录 ID
instanceId - owning instance id — 所属实例 ID
taskId - related task id (may be null for START/COMPLETE) — 关联任务 ID(START/COMPLETE 时可为 null)
stepId - step id — 节点 ID
action - action type — 动作类型
operatorId - operator user id — 操作人
comment - human comment — 文本意见
extraJson - action-specific extra JSON payload — 动作专属 JSON
createdAt - creation timestamp — 创建时间

public record HistoryRecord(String id, String instanceId, String taskId, String stepId, Action action, String operatorId, String comment, String extraJson, Instant createdAt) extends Record
Single immutable history entry (mirrors flow_history row). 单条历史记录(对应 flow_history 表行)。
Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
  • Constructor Details

    • HistoryRecord

      public HistoryRecord(String id, String instanceId, String taskId, String stepId, Action action, String operatorId, String comment, String extraJson, Instant createdAt)
      Compact constructor; validates required fields. 紧凑构造器:校验必填字段。
      Since:
      JDK 25, opencode-base-flow V1.0.5
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • instanceId

      public String instanceId()
      Returns the value of the instanceId record component.
      Returns:
      the value of the instanceId record component
    • taskId

      public String taskId()
      Returns the value of the taskId record component.
      Returns:
      the value of the taskId record component
    • stepId

      public String stepId()
      Returns the value of the stepId record component.
      Returns:
      the value of the stepId record component
    • action

      public Action action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • operatorId

      public String operatorId()
      Returns the value of the operatorId record component.
      Returns:
      the value of the operatorId record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component
    • extraJson

      public String extraJson()
      Returns the value of the extraJson record component.
      Returns:
      the value of the extraJson record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component