chat / api /models /schema /assistant.js
Zhitomir's picture
chat init
aa2e6af
Raw
History Blame Contribute Delete
624 Bytes
const mongoose = require('mongoose');
const assistantSchema = mongoose.Schema(
{
user: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
required: true,
},
assistant_id: {
type: String,
index: true,
required: true,
},
avatar: {
type: {
filepath: String,
source: String,
},
default: undefined,
},
access_level: {
type: Number,
},
file_ids: { type: [String], default: undefined },
actions: { type: [String], default: undefined },
},
{
timestamps: true,
},
);
module.exports = assistantSchema;