1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 21:29:43 +02:00
planka/server/api/models/NotificationService.js

57 lines
1.5 KiB
JavaScript
Raw Normal View History

/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
2019-08-31 04:07:25 +05:00
/**
* NotificationService.js
2019-08-31 04:07:25 +05:00
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
const Formats = {
TEXT: 'text',
MARKDOWN: 'markdown',
HTML: 'html',
};
2019-08-31 04:07:25 +05:00
module.exports = {
Formats,
2019-08-31 04:07:25 +05:00
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
url: {
2019-08-31 04:07:25 +05:00
type: 'string',
required: true,
},
format: {
type: 'string',
isIn: Object.values(Formats),
2019-08-31 04:07:25 +05:00
required: true,
},
2019-08-31 04:07:25 +05:00
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
userId: {
model: 'User',
columnName: 'user_id',
},
boardId: {
model: 'Board',
columnName: 'board_id',
},
2019-08-31 04:07:25 +05:00
},
tableName: 'notification_service',
2019-08-31 04:07:25 +05:00
};