mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
|
/**
|
||
|
* Action.js
|
||
|
*
|
||
|
* @description :: A model definition represents a database table/collection.
|
||
|
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||
|
*/
|
||
|
|
||
|
const TYPES = ['createCard', 'moveCard', 'commentCard'];
|
||
|
|
||
|
module.exports = {
|
||
|
TYPES,
|
||
|
|
||
|
attributes: {
|
||
|
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||
|
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||
|
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||
|
|
||
|
type: {
|
||
|
type: 'string',
|
||
|
isIn: TYPES,
|
||
|
required: true
|
||
|
},
|
||
|
data: {
|
||
|
type: 'json',
|
||
|
required: true
|
||
|
},
|
||
|
|
||
|
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||
|
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||
|
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||
|
|
||
|
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||
|
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||
|
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||
|
|
||
|
cardId: {
|
||
|
model: 'Card',
|
||
|
required: true,
|
||
|
columnName: 'card_id'
|
||
|
},
|
||
|
userId: {
|
||
|
model: 'User',
|
||
|
required: true,
|
||
|
columnName: 'user_id'
|
||
|
}
|
||
|
}
|
||
|
};
|