import { model, Schema } from 'mongoose';
const apiTokenSchema = new Schema({
    hashedToken: { type: String, required: true },
    salt: { type: String, required: true },
    createdBy: { type: Schema.Types.ObjectId, required: true },
    organizationId: { type: Schema.Types.ObjectId, required: true },
    tokenName: { type: String, required: true },
    tokenDescription: { type: String, required: true },
}, { timestamps: true });
apiTokenSchema.index({
    organizationId: 1,
    createdBy: 1,
});
export const ApiTokenModel = model('ApiToken', apiTokenSchema);
