feat: change agent and container add tags

This commit is contained in:
2024-09-28 03:01:10 +08:00
parent 718322ae47
commit 1505c25166
7 changed files with 32 additions and 25 deletions

View File

@@ -112,6 +112,7 @@ const initManager = async () => {
where: {
status: 'open',
},
logging: false,
});
const data = list.map((item) => {
return {

View File

@@ -45,12 +45,7 @@ add.run = async (ctx) => {
source: '',
type: '',
sourceType: '',
data: {
className: '',
style: {},
showChild: true,
shadowRoot: false,
},
data: {},
};
const container = {
..._data,

View File

@@ -1,12 +1,7 @@
import { sequelize } from '../../../modules/sequelize.ts';
import { DataTypes, Model } from 'sequelize';
export interface ContainerData {
style?: { [key: string]: string };
className?: string;
showChild?: boolean;
shadowRoot?: boolean;
}
export interface ContainerData {}
export type ContainerPublish = {
rid?: string; // resource id
name?: string;
@@ -20,6 +15,7 @@ export class ContainerModel extends Model {
declare title: string;
declare description: string;
declare type: string;
declare tags: string[];
declare code: string;
declare source: string;
declare sourceType: string;
@@ -43,6 +39,10 @@ ContainerModel.init(
type: DataTypes.STRING,
defaultValue: '',
},
tags: {
type: DataTypes.JSON,
defaultValue: [],
},
type: {
type: DataTypes.STRING,
defaultValue: '',