log.model.js 384 B

1234567891011121314151617181920
  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. aktivitas: { type: String },
  13. os: { type: String },
  14. ipv4: { type: String },
  15. },
  16. { timestamps: true }
  17. ),
  18. 'log'
  19. )