@topgroup/diginext
Version:
A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.
72 lines (71 loc) • 1.51 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.apiKeyAccountSchema = void 0;
const mongoose_1 = require("mongoose");
const Base_1 = require("./Base");
exports.apiKeyAccountSchema = new mongoose_1.Schema({
...Base_1.baseSchemaDefinitions,
name: {
type: String,
maxlength: 250,
},
username: {
type: String,
},
type: {
type: String,
default: "user",
},
email: {
type: String,
maxlength: 500,
},
verified: {
type: Boolean,
default: false,
},
image: {
type: String,
},
providers: {
type: [Object],
default: [],
},
password: {
type: String,
},
token: {
type: Object,
},
roles: {
type: [mongoose_1.Schema.Types.ObjectId],
ref: "roles",
default: [],
},
activeRole: {
type: mongoose_1.Schema.Types.ObjectId,
ref: "roles",
},
teams: {
type: [mongoose_1.Schema.Types.ObjectId],
ref: "teams",
default: [],
},
workspaces: {
type: [mongoose_1.Schema.Types.ObjectId],
ref: "workspaces",
default: [],
},
activeWorkspace: {
type: mongoose_1.Schema.Types.ObjectId,
ref: "workspaces",
},
owner: {
type: mongoose_1.Schema.Types.ObjectId,
ref: "users",
},
ownerSlug: String,
}, {
collection: "api_key",
timestamps: true,
});