mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 22:46:24 +00:00
29 lines
467 B
TypeScript
29 lines
467 B
TypeScript
import { Schema, Types, model } from "mongoose";
|
|
|
|
export interface IUserAction {
|
|
_id: Types.ObjectId;
|
|
user: Types.ObjectId;
|
|
action: string;
|
|
}
|
|
|
|
const userActionSchema = new Schema<IUserAction>(
|
|
{
|
|
user: {
|
|
type: Schema.Types.ObjectId,
|
|
ref: "User",
|
|
required: true,
|
|
},
|
|
action: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
{
|
|
timestamps: true,
|
|
}
|
|
);
|
|
|
|
const UserAction = model<IUserAction>("UserAction", userActionSchema);
|
|
|
|
export default UserAction;
|