* model config * feat: model config ui * perf: rename variable * feat: custom request url * perf: model buffer * perf: init model * feat: json model config * auto login * fix: ts * update packages * package * fix: dockerfile
22 lines
462 B
TypeScript
22 lines
462 B
TypeScript
import { connectionMongo, getMongoModel } from '../../../common/mongo';
|
|
const { Schema } = connectionMongo;
|
|
import type { SystemModelSchemaType } from '../type';
|
|
|
|
const SystemModelSchema = new Schema({
|
|
model: {
|
|
type: String,
|
|
required: true,
|
|
unique: true
|
|
},
|
|
metadata: {
|
|
type: Object,
|
|
required: true,
|
|
default: {}
|
|
}
|
|
});
|
|
|
|
export const MongoSystemModel = getMongoModel<SystemModelSchemaType>(
|
|
'system_models',
|
|
SystemModelSchema
|
|
);
|