mirror of
https://github.com/plankanban/planka.git
synced 2025-12-15 01:10:55 +03:00
Initial commit
This commit is contained in:
37
server/api/models/Project.js
Executable file
37
server/api/models/Project.js
Executable file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Project.js
|
||||
*
|
||||
* @description :: A model definition represents a database table/collection.
|
||||
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
attributes: {
|
||||
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||||
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||||
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||||
|
||||
name: {
|
||||
type: 'string',
|
||||
required: true
|
||||
},
|
||||
|
||||
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||||
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||||
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||||
|
||||
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||||
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||||
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||||
|
||||
membershipUsers: {
|
||||
collection: 'User',
|
||||
via: 'projectId',
|
||||
through: 'ProjectMembership'
|
||||
},
|
||||
boards: {
|
||||
collection: 'Board',
|
||||
via: 'projectId'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user