mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
|
/**
|
||
|
* Board.js
|
||
|
*
|
||
|
* @description :: A model definition represents a database table/collection.
|
||
|
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||
|
*/
|
||
|
|
||
|
module.exports = {
|
||
|
attributes: {
|
||
|
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||
|
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||
|
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||
|
|
||
|
position: {
|
||
|
type: 'number',
|
||
|
required: true
|
||
|
},
|
||
|
name: {
|
||
|
type: 'string',
|
||
|
required: true
|
||
|
},
|
||
|
|
||
|
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||
|
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||
|
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||
|
|
||
|
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||
|
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||
|
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||
|
|
||
|
projectId: {
|
||
|
model: 'Project',
|
||
|
required: true,
|
||
|
columnName: 'project_id'
|
||
|
},
|
||
|
lists: {
|
||
|
collection: 'List',
|
||
|
via: 'boardId'
|
||
|
},
|
||
|
labels: {
|
||
|
collection: 'Label',
|
||
|
via: 'boardId'
|
||
|
}
|
||
|
}
|
||
|
};
|