udpate add columns types
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { title } from "process";
|
||||
import { nocoApi } from "./common";
|
||||
import bun from 'bun'
|
||||
|
||||
@@ -7,11 +8,12 @@ import bun from 'bun'
|
||||
|
||||
// AI id
|
||||
const baseId = 'pypv3deh9qzol7q'
|
||||
// 个人知识库 id
|
||||
const startId = 'prg9dee7ldbemzd'
|
||||
// const res = await nocoApi.meta.tables.list(baseId)
|
||||
// console.log('tables list', res);
|
||||
|
||||
const tableId = 'm9rcgc95ev9d1uo'
|
||||
// const tableId = 'm9rcgc95ev9d1uo'
|
||||
|
||||
// const tableMeta = await nocoApi.meta.tables.getTableMeta(tableId)
|
||||
|
||||
@@ -20,34 +22,96 @@ const tableId = 'm9rcgc95ev9d1uo'
|
||||
// bun.write('meta.json', JSON.stringify(tableMeta, null, 2))
|
||||
|
||||
const newTables = await nocoApi.meta.tables.createTable(startId, {
|
||||
title: '测试表3',
|
||||
title: '测试表4',
|
||||
description: '这是一个测试表3',
|
||||
columns: [
|
||||
// {
|
||||
// title: 'Title',
|
||||
// uidt: 'SingleLineText',
|
||||
// description: '标题列',
|
||||
// },
|
||||
// {
|
||||
// title: 'Summary',
|
||||
// uidt: 'LongText',
|
||||
// description: '摘要列',
|
||||
// },
|
||||
// {
|
||||
// title: 'Tags',
|
||||
// uidt: 'MultiSelect',
|
||||
// description: '标签列',
|
||||
// },
|
||||
// {
|
||||
// title: 'Description',
|
||||
// uidt: 'LongText',
|
||||
// description: '描述列',
|
||||
// },
|
||||
// {
|
||||
// title: 'Link',
|
||||
// uidt: 'URL',
|
||||
// description: '链接列',
|
||||
// },
|
||||
{
|
||||
title: 'Title',
|
||||
title: '标题',
|
||||
uidt: 'SingleLineText',
|
||||
description: '标题列',
|
||||
},
|
||||
{
|
||||
title: 'Summary',
|
||||
uidt: 'LongText',
|
||||
description: '摘要列',
|
||||
},
|
||||
{
|
||||
title: 'Tags',
|
||||
title: '标签',
|
||||
uidt: 'MultiSelect',
|
||||
description: '标签列',
|
||||
},
|
||||
{
|
||||
title: 'Description',
|
||||
title: '总结',
|
||||
uidt: 'LongText',
|
||||
description: '总结列',
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
uidt: 'LongText',
|
||||
description: '描述列',
|
||||
},
|
||||
{
|
||||
title: 'Link',
|
||||
title: '数据',
|
||||
uidt: 'JSON',
|
||||
description: '数据列',
|
||||
},
|
||||
{
|
||||
title: '链接',
|
||||
uidt: 'URL',
|
||||
description: '链接列',
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
uidt: 'SingleSelect',
|
||||
// dtxp: toStr(['每日', '每周', '每月', '每年', '一次性', '备忘', '归档', '智能']),
|
||||
colOptions: {
|
||||
options: [
|
||||
{
|
||||
title: '每日',
|
||||
},
|
||||
{
|
||||
title: '每周',
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '启动时间',
|
||||
uidt: 'DateTime',
|
||||
},
|
||||
{
|
||||
title: '任务',
|
||||
uidt: 'MultiSelect'
|
||||
},
|
||||
{
|
||||
title: '任务结果',
|
||||
uidt: 'LongText'
|
||||
},
|
||||
{
|
||||
title: '提示词',
|
||||
uidt: 'LongText',
|
||||
description: '和AI交互时候简单的实时提示词',
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user