summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-24 10:08:09 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-24 10:08:09 +0900
commitac0390fec36ff16bc5bb924563d6b1bc7d52120a (patch)
tree18712d6254ad96060f5704d2baf15f8cfa22082e /src/services
parentImprove doc (diff)
downloadsharkey-ac0390fec36ff16bc5bb924563d6b1bc7d52120a.tar.gz
sharkey-ac0390fec36ff16bc5bb924563d6b1bc7d52120a.tar.bz2
sharkey-ac0390fec36ff16bc5bb924563d6b1bc7d52120a.zip
Improve doc
Diffstat (limited to 'src/services')
-rw-r--r--src/services/chart/per-user-drive.ts77
1 files changed, 49 insertions, 28 deletions
diff --git a/src/services/chart/per-user-drive.ts b/src/services/chart/per-user-drive.ts
index d23852bdd9..8e8e83d35b 100644
--- a/src/services/chart/per-user-drive.ts
+++ b/src/services/chart/per-user-drive.ts
@@ -1,42 +1,63 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import DriveFile, { IDriveFile } from '../../models/drive-file';
+import { SchemaType } from '../../prelude/schema';
-/**
- * ユーザーごとのドライブに関するチャート
- */
-type PerUserDriveLog = {
- /**
- * 集計期間時点での、全ドライブファイル数
- */
- totalCount: number;
+export const perUserDriveLogSchema = {
+ type: 'object' as 'object',
+ properties: {
+ /**
+ * 集計期間時点での、全ドライブファイル数
+ */
+ totalCount: {
+ type: 'number' as 'number',
+ description: '集計期間時点での、全ドライブファイル数'
+ },
- /**
- * 集計期間時点での、全ドライブファイルの合計サイズ
- */
- totalSize: number;
+ /**
+ * 集計期間時点での、全ドライブファイルの合計サイズ
+ */
+ totalSize: {
+ type: 'number' as 'number',
+ description: '集計期間時点での、全ドライブファイルの合計サイズ'
+ },
- /**
- * 増加したドライブファイル数
- */
- incCount: number;
+ /**
+ * 増加したドライブファイル数
+ */
+ incCount: {
+ type: 'number' as 'number',
+ description: '増加したドライブファイル数'
+ },
- /**
- * 増加したドライブ使用量
- */
- incSize: number;
+ /**
+ * 増加したドライブ使用量
+ */
+ incSize: {
+ type: 'number' as 'number',
+ description: '増加したドライブ使用量'
+ },
- /**
- * 減少したドライブファイル数
- */
- decCount: number;
+ /**
+ * 減少したドライブファイル数
+ */
+ decCount: {
+ type: 'number' as 'number',
+ description: '減少したドライブファイル数'
+ },
- /**
- * 減少したドライブ使用量
- */
- decSize: number;
+ /**
+ * 減少したドライブ使用量
+ */
+ decSize: {
+ type: 'number' as 'number',
+ description: '減少したドライブ使用量'
+ },
+ }
};
+type PerUserDriveLog = SchemaType<typeof perUserDriveLogSchema>;
+
class PerUserDriveChart extends Chart<PerUserDriveLog> {
constructor() {
super('perUserDrive', true);