mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
35 lines
711 B
TypeScript
35 lines
711 B
TypeScript
import { Schema, Types, model } from "mongoose";
|
|
|
|
type GitAppInstallationSession = {
|
|
id: string;
|
|
sessionId: string;
|
|
organization: Types.ObjectId;
|
|
user: Types.ObjectId;
|
|
}
|
|
|
|
const gitAppInstallationSession = new Schema<GitAppInstallationSession>({
|
|
id: {
|
|
required: true,
|
|
type: String,
|
|
},
|
|
sessionId: {
|
|
type: String,
|
|
required: true,
|
|
unique: true
|
|
},
|
|
organization: {
|
|
type: Schema.Types.ObjectId,
|
|
required: true,
|
|
unique: true
|
|
},
|
|
user: {
|
|
type: Schema.Types.ObjectId,
|
|
ref: "User"
|
|
}
|
|
});
|
|
|
|
|
|
const GitAppInstallationSession = model<GitAppInstallationSession>("git_app_installation_session", gitAppInstallationSession);
|
|
|
|
export default GitAppInstallationSession;
|