type fix for references
This commit is contained in:
parent
5058489c2f
commit
b8321cbb00
@ -10,25 +10,26 @@ import {
|
|||||||
IProjectSkill,
|
IProjectSkill,
|
||||||
ChatSessionMode,
|
ChatSessionMode,
|
||||||
IProjectTask,
|
IProjectTask,
|
||||||
Types,
|
|
||||||
} from "@gadget/api";
|
} from "@gadget/api";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
|
|
||||||
export const ProjectSkillSchema = new Schema<IProjectSkill>({
|
export const ProjectSkillSchema = new Schema<IProjectSkill>({
|
||||||
|
_id: { type: String, default: () => nanoid() },
|
||||||
name: { type: String, required: true },
|
name: { type: String, required: true },
|
||||||
modes: { type: [String], enum: ChatSessionMode, required: true },
|
modes: { type: [String], enum: ChatSessionMode, required: true },
|
||||||
content: { type: String, required: true },
|
content: { type: String, required: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
export const ProjectTaskSchema = new Schema<IProjectTask>({
|
export const ProjectTaskSchema = new Schema<IProjectTask>({
|
||||||
|
_id: { type: String, default: () => nanoid() },
|
||||||
name: { type: String, required: true },
|
name: { type: String, required: true },
|
||||||
provider: { type: Types.ObjectId, required: true, ref: "AiProvider" },
|
provider: { type: String, required: true, ref: "AiProvider" },
|
||||||
selectedModel: { type: String, required: true },
|
selectedModel: { type: String, required: true },
|
||||||
mode: { type: String, enum: ChatSessionMode, required: true },
|
mode: { type: String, enum: ChatSessionMode, required: true },
|
||||||
crontab: { type: String, required: true },
|
crontab: { type: String, required: true },
|
||||||
content: { type: String, required: true },
|
content: { type: String, required: true },
|
||||||
enabled: { type: Boolean, default: true, required: true },
|
enabled: { type: Boolean, default: true, required: true },
|
||||||
lastRun: { type: Types.ObjectId, ref: "ChatSession" },
|
lastRun: { type: String, ref: "ChatSession" },
|
||||||
});
|
});
|
||||||
|
|
||||||
export const ProjectSchema = new Schema<IProject>({
|
export const ProjectSchema = new Schema<IProject>({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user