package com.kaidi.oa.domain; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.Table; import java.time.Instant; /** * A single step in a form instance's flow trace. Mirrors the frontend * TraceStep. type is one of: 发起 / 同意 / 退回 / 转交 / 加签 / 办结 / 知会. */ @Entity @Table(name = "flow_trace") public class FlowTrace { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(nullable = false) private Long instanceId; /** Node label (e.g. 部门主管, 发起). */ private String node; /** Who handled the step. */ private String who; @Column(columnDefinition = "TEXT") private String opinion; /** 发起 / 同意 / 退回 / 转交 / 加签 / 办结 / 知会 */ private String type; private Instant createdAt; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getInstanceId() { return instanceId; } public void setInstanceId(Long instanceId) { this.instanceId = instanceId; } public String getNode() { return node; } public void setNode(String node) { this.node = node; } public String getWho() { return who; } public void setWho(String who) { this.who = who; } public String getOpinion() { return opinion; } public void setOpinion(String opinion) { this.opinion = opinion; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Instant getCreatedAt() { return createdAt; } public void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } }