Browse Source

refactor(nocodb): implements RollupType

pull/5222/head
Wing-Kam Wong 2 years ago
parent
commit
0939b718cb
  1. 16
      packages/nocodb/src/lib/models/RollupColumn.ts

16
packages/nocodb/src/lib/models/RollupColumn.ts

@ -3,15 +3,21 @@ import Column from './Column';
import { CacheGetType, CacheScope, MetaTable } from '../utils/globals'; import { CacheGetType, CacheScope, MetaTable } from '../utils/globals';
import NocoCache from '../cache/NocoCache'; import NocoCache from '../cache/NocoCache';
import { extractProps } from '../meta/helpers/extractProps'; import { extractProps } from '../meta/helpers/extractProps';
import type { RollupType } from 'nocodb-sdk';
export default class RollupColumn { export default class RollupColumn implements RollupType {
id: string;
fk_column_id; fk_column_id;
fk_relation_column_id; fk_relation_column_id;
fk_rollup_column_id; fk_rollup_column_id;
rollup_function:
rollup_function: string; | 'count'
| 'min'
id: string; | 'max'
| 'avg'
| 'countDistinct'
| 'sumDistinct'
| 'avgDistinct';
constructor(data: Partial<RollupColumn>) { constructor(data: Partial<RollupColumn>) {
Object.assign(this, data); Object.assign(this, data);

Loading…
Cancel
Save