You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docker-infisical/backend/src/models/workspace.ts

24 lines
436 B

import { Schema, model, Types } from 'mongoose';
export interface IWorkspace {
_id: Types.ObjectId;
name: string;
organization: Types.ObjectId;
}
const workspaceSchema = new Schema<IWorkspace>({
name: {
type: String,
required: true
},
organization: {
type: Schema.Types.ObjectId,
ref: 'Organization',
required: true
}
});
const Workspace = model<IWorkspace>('Workspace', workspaceSchema);
export default Workspace;