@dynamatix/gb-schemas 0.24.11 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/users/auth-log.model.js +21 -0
- package/users/index.js +2 -1
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
const AuthLogSchema = new mongoose.Schema({
|
|
4
|
+
userId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: "User",
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
loggedInTimestamp: {
|
|
10
|
+
type: Date,
|
|
11
|
+
default: Date.now
|
|
12
|
+
},
|
|
13
|
+
isSuccess: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
required: true
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const AuthLogModel = mongoose.model("AuthLog", AuthLogSchema);
|
|
20
|
+
|
|
21
|
+
export default AuthLogModel;
|
package/users/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { default as UserModel } from './user.model.js';
|
|
|
2
2
|
export { default as RoleModel } from './role.model.js';
|
|
3
3
|
export { default as RoleGroupModel } from './role-group.model.js';
|
|
4
4
|
export { default as PermissionModel } from './permission.model.js';
|
|
5
|
-
export { default as TasksModel} from './tasks.model.js';
|
|
5
|
+
export { default as TasksModel} from './tasks.model.js';
|
|
6
|
+
export { default as AuthLogModel } from './auth-log.model.js';
|