Files
overleaf-cep/services/web/modules/gitlab-sync/app/models/gitlabSyncUserCredentials.mjs
T

18 lines
509 B
JavaScript

import mongoose from "../../../../app/src/infrastructure/Mongoose.mjs"
const { Schema } = mongoose
const { ObjectId } = Schema
export const GitLabSyncUserCredentialsSchema = new Schema(
{
userId: { type: ObjectId, ref: 'User', required: true, unique: true },
gitlab: { type: String, required: true },
},
{ collection: 'gitlabSyncUserCredentials', minimize: false }
)
export const GitLabSyncUserCredentials = mongoose.model(
'GitLabSyncUserCredentials',
GitLabSyncUserCredentialsSchema,
)