package tech.easyflow.agent.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import tech.easyflow.common.entity.DateEntity;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

/**
 * Agent 正式产物的对象存储状态账本。
 */
@Table("tb_agent_artifact")
public class AgentArtifact extends DateEntity implements Serializable {

    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    private BigInteger id;
    private String artifactId;
    @Column(tenantId = true)
    private BigInteger tenantId;
    private BigInteger agentId;
    private BigInteger ownerUserId;
    private String chatMode;
    private BigInteger chatSessionId;
    private String runtimeSessionId;
    private String requestId;
    private BigInteger roundId;
    private Integer variantIndex;
    private String toolCallId;
    private String fileName;
    private String mimeType;
    private Long sizeBytes;
    private String sha256;
    private String storagePlatform;
    private String objectKey;
    private String storageEtag;
    private String status;
    private Date expiresAt;
    private Integer retryCount;
    private Date nextRetryAt;
    private String lastErrorCode;
    private Date created;
    private BigInteger createdBy;
    private Date modified;
    private BigInteger modifiedBy;
    @Column(isLogicDelete = true)
    private Integer isDeleted;

    /** @return 内部主键 */
    public BigInteger getId() { return id; }
    /** @param id 内部主键 */
    public void setId(BigInteger id) { this.id = id; }
    /** @return 对外稳定产物 ID */
    public String getArtifactId() { return artifactId; }
    /** @param artifactId 对外稳定产物 ID */
    public void setArtifactId(String artifactId) { this.artifactId = artifactId; }
    /** @return 租户 ID */
    public BigInteger getTenantId() { return tenantId; }
    /** @param tenantId 租户 ID */
    public void setTenantId(BigInteger tenantId) { this.tenantId = tenantId; }
    /** @return Agent ID */
    public BigInteger getAgentId() { return agentId; }
    /** @param agentId Agent ID */
    public void setAgentId(BigInteger agentId) { this.agentId = agentId; }
    /** @return 所有者用户 ID */
    public BigInteger getOwnerUserId() { return ownerUserId; }
    /** @param ownerUserId 所有者用户 ID */
    public void setOwnerUserId(BigInteger ownerUserId) { this.ownerUserId = ownerUserId; }
    /** @return 聊天模式 */
    public String getChatMode() { return chatMode; }
    /** @param chatMode 聊天模式 */
    public void setChatMode(String chatMode) { this.chatMode = chatMode; }
    /** @return 正式聊天会话 ID */
    public BigInteger getChatSessionId() { return chatSessionId; }
    /** @param chatSessionId 正式聊天会话 ID */
    public void setChatSessionId(BigInteger chatSessionId) { this.chatSessionId = chatSessionId; }
    /** @return Runtime 会话 ID */
    public String getRuntimeSessionId() { return runtimeSessionId; }
    /** @param runtimeSessionId Runtime 会话 ID */
    public void setRuntimeSessionId(String runtimeSessionId) { this.runtimeSessionId = runtimeSessionId; }
    /** @return 运行请求 ID */
    public String getRequestId() { return requestId; }
    /** @param requestId 运行请求 ID */
    public void setRequestId(String requestId) { this.requestId = requestId; }
    /** @return 聊天轮次 ID */
    public BigInteger getRoundId() { return roundId; }
    /** @param roundId 聊天轮次 ID */
    public void setRoundId(BigInteger roundId) { this.roundId = roundId; }
    /** @return 正式聊天答案版本序号 */
    public Integer getVariantIndex() { return variantIndex; }
    /** @param variantIndex 正式聊天答案版本序号 */
    public void setVariantIndex(Integer variantIndex) { this.variantIndex = variantIndex; }
    /** @return 工具调用 ID */
    public String getToolCallId() { return toolCallId; }
    /** @param toolCallId 工具调用 ID */
    public void setToolCallId(String toolCallId) { this.toolCallId = toolCallId; }
    /** @return 安全展示文件名 */
    public String getFileName() { return fileName; }
    /** @param fileName 安全展示文件名 */
    public void setFileName(String fileName) { this.fileName = fileName; }
    /** @return MIME 类型 */
    public String getMimeType() { return mimeType; }
    /** @param mimeType MIME 类型 */
    public void setMimeType(String mimeType) { this.mimeType = mimeType; }
    /** @return 字节数 */
    public Long getSizeBytes() { return sizeBytes; }
    /** @param sizeBytes 字节数 */
    public void setSizeBytes(Long sizeBytes) { this.sizeBytes = sizeBytes; }
    /** @return SHA-256 */
    public String getSha256() { return sha256; }
    /** @param sha256 SHA-256 */
    public void setSha256(String sha256) { this.sha256 = sha256; }
    /** @return 内部存储平台 */
    public String getStoragePlatform() { return storagePlatform; }
    /** @param storagePlatform 内部存储平台 */
    public void setStoragePlatform(String storagePlatform) { this.storagePlatform = storagePlatform; }
    /** @return 内部对象键 */
    public String getObjectKey() { return objectKey; }
    /** @param objectKey 内部对象键 */
    public void setObjectKey(String objectKey) { this.objectKey = objectKey; }
    /** @return 对象 ETag */
    public String getStorageEtag() { return storageEtag; }
    /** @param storageEtag 对象 ETag */
    public void setStorageEtag(String storageEtag) { this.storageEtag = storageEtag; }
    /** @return 账本状态 */
    public String getStatus() { return status; }
    /** @param status 账本状态 */
    public void setStatus(String status) { this.status = status; }
    /** @return 过期时间 */
    public Date getExpiresAt() { return expiresAt; }
    /** @param expiresAt 过期时间 */
    public void setExpiresAt(Date expiresAt) { this.expiresAt = expiresAt; }
    /** @return 重试次数 */
    public Integer getRetryCount() { return retryCount; }
    /** @param retryCount 重试次数 */
    public void setRetryCount(Integer retryCount) { this.retryCount = retryCount; }
    /** @return 下次重试时间 */
    public Date getNextRetryAt() { return nextRetryAt; }
    /** @param nextRetryAt 下次重试时间 */
    public void setNextRetryAt(Date nextRetryAt) { this.nextRetryAt = nextRetryAt; }
    /** @return 最近错误码 */
    public String getLastErrorCode() { return lastErrorCode; }
    /** @param lastErrorCode 最近错误码 */
    public void setLastErrorCode(String lastErrorCode) { this.lastErrorCode = lastErrorCode; }
    /** @return 创建时间 */
    @Override public Date getCreated() { return created; }
    /** @param created 创建时间 */
    @Override public void setCreated(Date created) { this.created = created; }
    /** @return 创建人 */
    public BigInteger getCreatedBy() { return createdBy; }
    /** @param createdBy 创建人 */
    public void setCreatedBy(BigInteger createdBy) { this.createdBy = createdBy; }
    /** @return 修改时间 */
    @Override public Date getModified() { return modified; }
    /** @param modified 修改时间 */
    @Override public void setModified(Date modified) { this.modified = modified; }
    /** @return 修改人 */
    public BigInteger getModifiedBy() { return modifiedBy; }
    /** @param modifiedBy 修改人 */
    public void setModifiedBy(BigInteger modifiedBy) { this.modifiedBy = modifiedBy; }
    /** @return 逻辑删除标记 */
    public Integer getIsDeleted() { return isDeleted; }
    /** @param isDeleted 逻辑删除标记 */
    public void setIsDeleted(Integer isDeleted) { this.isDeleted = isDeleted; }
}
