feat: create Config model

This commit is contained in:
Ali BARIN
2023-08-11 08:29:57 +00:00
parent 84b701747f
commit bafb8b86db
3 changed files with 68 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { IJSONValue } from '@automatisch/types';
import Base from './base';
class Config extends Base {
id!: string;
key!: string;
value!: { data: IJSONValue };
static tableName = 'config';
static jsonSchema = {
type: 'object',
required: ['key', 'value'],
properties: {
id: { type: 'string', format: 'uuid' },
key: { type: 'string', minLength: 1 },
value: { type: 'object' },
},
};
}
export default Config;