2021-08-26 06:55:19 -04:00
|
|
|
const { BeanModel } = require("redbean-node/dist/bean-model");
|
|
|
|
|
|
|
|
class Tag extends BeanModel {
|
2022-04-16 16:11:45 -04:00
|
|
|
|
|
|
|
/**
|
2022-04-22 14:10:13 -04:00
|
|
|
* Return an object that ready to parse to JSON
|
2022-04-16 16:11:45 -04:00
|
|
|
* @returns {Object}
|
|
|
|
*/
|
2021-08-26 06:55:19 -04:00
|
|
|
toJSON() {
|
|
|
|
return {
|
|
|
|
id: this._id,
|
|
|
|
name: this._name,
|
|
|
|
color: this._color,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Tag;
|