log.model.js 411 B

123456789101112131415161718192021
  1. const mongoose = require('mongoose')
  2. const user = require('./user.model')
  3. const { Schema, Types } = mongoose
  4. module.exports = mongoose.model(
  5. 'Log',
  6. new Schema(
  7. {
  8. user: {
  9. type: Types.ObjectId,
  10. ref: user,
  11. },
  12. menu: {type:String},
  13. aktivitas: { type: String },
  14. os: { type: String },
  15. ipv4: { type: String },
  16. },
  17. { timestamps: true }
  18. ),
  19. 'log'
  20. )