mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
|
/**
|
||
|
* Session.js
|
||
|
*
|
||
|
* @description :: A model definition represents a database table/collection.
|
||
|
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||
|
*/
|
||
|
|
||
|
module.exports = {
|
||
|
attributes: {
|
||
|
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||
|
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||
|
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||
|
|
||
|
accessToken: {
|
||
|
type: 'string',
|
||
|
required: true,
|
||
|
columnName: 'access_token',
|
||
|
},
|
||
|
remoteAddress: {
|
||
|
type: 'string',
|
||
|
required: true,
|
||
|
columnName: 'remote_address',
|
||
|
},
|
||
|
userAgent: {
|
||
|
type: 'string',
|
||
|
isNotEmptyString: true,
|
||
|
allowNull: true,
|
||
|
columnName: 'user_agent',
|
||
|
},
|
||
|
deletedAt: {
|
||
|
type: 'ref',
|
||
|
columnName: 'deleted_at',
|
||
|
},
|
||
|
|
||
|
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||
|
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||
|
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||
|
|
||
|
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||
|
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||
|
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||
|
|
||
|
userId: {
|
||
|
model: 'User',
|
||
|
required: true,
|
||
|
columnName: 'user_id',
|
||
|
},
|
||
|
},
|
||
|
};
|