mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
47 lines
1.3 KiB
JavaScript
Executable file
47 lines
1.3 KiB
JavaScript
Executable file
/**
|
|
* 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'
|
|
}
|
|
}
|
|
};
|