package com.emoon.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.emoon.common.tenant.core.TenantEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author destiny
 * @description:
 * @date 2025/8/24 18:03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_project", autoResultMap = true)
public class SysProjectDo extends TenantEntity {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "dept_id")
    private Long deptId;

    /**
     * 组织名称
     */
    @TableField(value = "organization")
    private String organization;

    /**
     * 项目名称
     */
    @TableField(value = "project")
    private String project;

    /**
     * 私钥
     */
    @TableField(value = "private_key")
    private String privateKey;

    /**
     * 公钥
     */
    @TableField(value = "public_key")
    private String publicKey;

    /**
     * 项目类型
     */
    @TableField(value = "project_type")
    private String projectType;

    /**
     * 模型仓库
     */
    @TableField(value = "model_ids", typeHandler = FastjsonTypeHandler.class)
    @JsonProperty("model_ids")
    private List<String> modelIds = new ArrayList<>();

    /**
     * 知识库仓库
     */
    @TableField(value = "rag_ids", typeHandler = FastjsonTypeHandler.class)
    @JsonProperty("rag_ids")
    private List<String> ragIds = new ArrayList<>();

    /**
     * 智能体权限
     */
    @JsonProperty("agent_ids")
    @TableField(value = "agent_ids", typeHandler = FastjsonTypeHandler.class)
    private List<String> agentIds = new ArrayList<>();

    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    private String delFlag;
}
