暂存
This commit is contained in:
@@ -7,16 +7,14 @@ export interface ContainerData {
|
||||
showChild?: boolean;
|
||||
shadowRoot?: boolean;
|
||||
}
|
||||
export type Container = {
|
||||
id?: string;
|
||||
title?: string;
|
||||
export type ContainerPublish = {
|
||||
rid?: string; // resource id
|
||||
name?: string;
|
||||
description?: string;
|
||||
type?: string;
|
||||
code?: string;
|
||||
source?: string;
|
||||
sourceType?: string;
|
||||
data?: ContainerData;
|
||||
version?: string;
|
||||
};
|
||||
export type Container = Partial<InstanceType<typeof ContainerModel>>;
|
||||
|
||||
export class ContainerModel extends Model {
|
||||
declare id: string;
|
||||
declare title: string;
|
||||
@@ -26,6 +24,12 @@ export class ContainerModel extends Model {
|
||||
declare source: string;
|
||||
declare sourceType: string;
|
||||
declare data: ContainerData;
|
||||
declare publish: ContainerPublish;
|
||||
declare uid: string;
|
||||
|
||||
// timestamps
|
||||
public readonly createdAt!: Date;
|
||||
public readonly updatedAt!: Date;
|
||||
}
|
||||
ContainerModel.init(
|
||||
{
|
||||
@@ -63,6 +67,11 @@ ContainerModel.init(
|
||||
type: DataTypes.JSON,
|
||||
defaultValue: {},
|
||||
},
|
||||
publish: {
|
||||
type: DataTypes.JSON,
|
||||
defaultValue: {},
|
||||
},
|
||||
|
||||
uid: {
|
||||
type: DataTypes.UUID,
|
||||
allowNull: true,
|
||||
|
||||
Reference in New Issue
Block a user