const { Model } = require('flitter-orm') class AnnouncementModel extends Model { static get schema() { return { title: String, message: String, user_ids: [String], group_ids: [String], type: String, // login | email | banner } } async to_api() { return { id: this.id, title: this.title, message: this.message, user_ids: this.user_ids, group_ids: this.group_ids, type: this.type, } } } module.exports = exports = AnnouncementModel