const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
let mongoose = require("mongoose");
mongoose = require_rolldown_runtime.__toESM(mongoose);

//#region src/schemas/session.schema.ts
const sessionSchema = new mongoose.Schema({
	activeOrganizationId: {
		type: mongoose.Schema.Types.ObjectId,
		ref: "Organization",
		required: false
	},
	activeProjectId: {
		type: mongoose.Schema.Types.ObjectId,
		ref: "Project",
		required: false
	}
}, {
	timestamps: true,
	toJSON: {
		virtuals: true,
		versionKey: false,
		transform(_doc, ret) {
			const { _id,...rest } = ret;
			return {
				...rest,
				id: _id.toString()
			};
		}
	},
	toObject: {
		virtuals: true,
		transform(_doc, ret) {
			const { _id,...rest } = ret;
			return {
				...rest,
				id: _id
			};
		}
	}
});

//#endregion
exports.sessionSchema = sessionSchema;
//# sourceMappingURL=session.schema.cjs.map