Record Class VoteRecord
java.lang.Object
java.lang.Record
cloud.opencode.base.flow.model.VoteRecord
- Record Components:
id- vote record id — 记录 IDtaskId- related task id — 关联任务 IDvoterId- voter user id — 投票人opinion- vote opinion (VoteOpinion.AGREE/VoteOpinion.DISAGREE) — 投票意见votedAt- vote timestamp — 投票时间
public record VoteRecord(String id, String taskId, String voterId, VoteOpinion opinion, Instant votedAt)
extends Record
Single vote cast at a
StepType.VOTE step (mirrors
flow_vote_record row).
投票节点(StepType.VOTE)单次投票记录(对应 flow_vote_record 表行)。
Append-only: votes are written once and never updated; the engine relies on this immutability to compute tally idempotently.
仅追加:投票记录写入后不再变更,引擎据此幂等地统计票数。
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
-
Constructor Summary
ConstructorsConstructorDescriptionVoteRecord(String id, String taskId, String voterId, VoteOpinion opinion, Instant votedAt) Compact constructor; validates required fields. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.opinion()Returns the value of theopinionrecord component.taskId()Returns the value of thetaskIdrecord component.final StringtoString()Returns a string representation of this record class.votedAt()Returns the value of thevotedAtrecord component.voterId()Returns the value of thevoterIdrecord component.
-
Constructor Details
-
VoteRecord
Compact constructor; validates required fields. 紧凑构造器:校验必填字段。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
id
-
taskId
-
voterId
-
opinion
-
votedAt
-