feat: 上传文件到minio
This commit is contained in:
@@ -14,6 +14,8 @@ export type App = Partial<InstanceType<typeof AppModel>>;
|
||||
export class AppModel extends Model {
|
||||
declare id: string;
|
||||
declare data: AppData;
|
||||
declare title: string;
|
||||
declare description: string;
|
||||
declare version: string;
|
||||
declare domain: string;
|
||||
declare appType: string;
|
||||
@@ -21,6 +23,7 @@ export class AppModel extends Model {
|
||||
declare type: string;
|
||||
declare uid: string;
|
||||
declare user: string;
|
||||
declare status: string;
|
||||
}
|
||||
AppModel.init(
|
||||
{
|
||||
@@ -30,6 +33,14 @@ AppModel.init(
|
||||
defaultValue: DataTypes.UUIDV4,
|
||||
comment: 'id',
|
||||
},
|
||||
title: {
|
||||
type: DataTypes.STRING,
|
||||
defaultValue: '',
|
||||
},
|
||||
description: {
|
||||
type: DataTypes.STRING,
|
||||
defaultValue: '',
|
||||
},
|
||||
data: {
|
||||
type: DataTypes.JSON,
|
||||
defaultValue: {},
|
||||
@@ -48,7 +59,7 @@ AppModel.init(
|
||||
},
|
||||
key: {
|
||||
type: DataTypes.STRING,
|
||||
unique: true,
|
||||
// 和 uid 组合唯一
|
||||
},
|
||||
type: {
|
||||
type: DataTypes.STRING,
|
||||
@@ -58,11 +69,25 @@ AppModel.init(
|
||||
type: DataTypes.UUID,
|
||||
allowNull: true,
|
||||
},
|
||||
user: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
status: {
|
||||
type: DataTypes.STRING,
|
||||
defaultValue: 'running', // stop, running
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'kv_app',
|
||||
paranoid: true,
|
||||
indexes: [
|
||||
{
|
||||
unique: true,
|
||||
fields: ['key', 'uid'],
|
||||
},
|
||||
],
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user