mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 09:30:09 +00:00
24 lines
436 B
TypeScript
24 lines
436 B
TypeScript
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;
|