-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathAward.ts
More file actions
29 lines (23 loc) · 758 Bytes
/
Award.ts
File metadata and controls
29 lines (23 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { BiDataQueryOptions, BiDataTable, BiSearch, TableCellValue } from 'mobx-lark';
import { larkClient } from './Base';
import { AwardTableId, LarkBitableId } from './configuration';
export type Award = Record<
| 'awardName'
| `nominee${'Name' | 'Desc'}`
| 'videoUrl'
| 'reason'
| 'nominator'
| 'createdAt'
| 'votes',
TableCellValue
>;
export class AwardModel extends BiDataTable<Award>() {
client = larkClient;
queryOptions: BiDataQueryOptions = { text_field_as_array: false };
constructor(appId = LarkBitableId, tableId = AwardTableId) {
super(appId, tableId);
}
}
export class SearchAwardModel extends BiSearch<Award>(AwardModel) {
searchKeys = ['awardName', 'nomineeName', 'nomineeDesc', 'reason', 'nominator'];
}