mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 01:14:12 +03:00
feat: Track storage usage
This commit is contained in:
53
server/api/models/StorageUsage.js
Normal file
53
server/api/models/StorageUsage.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/**
|
||||
* StorageUsage.js
|
||||
*
|
||||
* @description :: A model definition represents a database table/collection.
|
||||
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||||
*/
|
||||
|
||||
const MAIN_ID = '1';
|
||||
|
||||
module.exports = {
|
||||
MAIN_ID,
|
||||
|
||||
attributes: {
|
||||
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||||
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||||
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||||
|
||||
total: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
},
|
||||
userAvatars: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
columnName: 'user_avatars',
|
||||
},
|
||||
backgroundImages: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
columnName: 'background_images',
|
||||
},
|
||||
attachments: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
columnName: 'attachments',
|
||||
},
|
||||
|
||||
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||||
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||||
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||||
|
||||
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||||
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||||
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||||
},
|
||||
|
||||
tableName: 'storage_usage',
|
||||
};
|
||||
Reference in New Issue
Block a user