14 lines
380 B
JavaScript
14 lines
380 B
JavaScript
const { Schema, model } = require("mongoose");
|
|
const moment = require('moment');
|
|
const timestamp = moment().valueOf() / 1000;
|
|
|
|
const commands = new Schema({
|
|
id: { type: String },
|
|
name: { type: String },
|
|
content: { type: String },
|
|
createdBy: { type: String },
|
|
created_at: { type: String, default: timestamp }
|
|
});
|
|
|
|
module.exports = model("commands", commands);
|