mirror of
https://github.com/plankanban/planka.git
synced 2025-12-21 01:11:26 +03:00
Prepare for collection board type, refactoring, update dependencies
This commit is contained in:
@@ -5,12 +5,21 @@
|
||||
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||||
*/
|
||||
|
||||
const TYPES = ['kanban', 'collection'];
|
||||
|
||||
module.exports = {
|
||||
TYPES,
|
||||
|
||||
attributes: {
|
||||
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||||
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||||
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||||
|
||||
type: {
|
||||
type: 'string',
|
||||
isIn: TYPES,
|
||||
required: true,
|
||||
},
|
||||
position: {
|
||||
type: 'number',
|
||||
required: true,
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = {
|
||||
|
||||
position: {
|
||||
type: 'number',
|
||||
required: true,
|
||||
allowNull: true,
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
@@ -40,16 +40,15 @@ module.exports = {
|
||||
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||||
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||||
|
||||
listId: {
|
||||
model: 'List',
|
||||
required: true,
|
||||
columnName: 'list_id',
|
||||
},
|
||||
boardId: {
|
||||
model: 'Board',
|
||||
required: true,
|
||||
columnName: 'board_id',
|
||||
},
|
||||
listId: {
|
||||
model: 'List',
|
||||
columnName: 'list_id',
|
||||
},
|
||||
coverAttachmentId: {
|
||||
model: 'Attachment',
|
||||
columnName: 'cover_attachment_id',
|
||||
|
||||
Reference in New Issue
Block a user