2019-08-31 04:07:25 +05:00
|
|
|
/**
|
|
|
|
* Notification.js
|
|
|
|
*
|
|
|
|
* @description :: A model definition represents a database table/collection.
|
|
|
|
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
attributes: {
|
|
|
|
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
|
|
|
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
|
|
|
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
|
|
|
|
|
|
|
isRead: {
|
|
|
|
type: 'boolean',
|
|
|
|
defaultsTo: false,
|
2019-11-05 18:01:42 +05:00
|
|
|
columnName: 'is_read',
|
2019-08-31 04:07:25 +05:00
|
|
|
},
|
|
|
|
|
|
|
|
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
|
|
|
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
|
|
|
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
|
|
|
|
|
|
|
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
|
|
|
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
|
|
|
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
|
|
|
|
|
|
|
userId: {
|
|
|
|
model: 'User',
|
|
|
|
required: true,
|
2019-11-05 18:01:42 +05:00
|
|
|
columnName: 'user_id',
|
2019-08-31 04:07:25 +05:00
|
|
|
},
|
|
|
|
actionId: {
|
|
|
|
model: 'Action',
|
|
|
|
required: true,
|
2019-11-05 18:01:42 +05:00
|
|
|
columnName: 'action_id',
|
2019-08-31 04:07:25 +05:00
|
|
|
},
|
|
|
|
cardId: {
|
|
|
|
model: 'Card',
|
|
|
|
required: true,
|
2019-11-05 18:01:42 +05:00
|
|
|
columnName: 'card_id',
|
|
|
|
},
|
|
|
|
},
|
2019-08-31 04:07:25 +05:00
|
|
|
};
|