feat: Create credentials model and graphQL mutation

This commit is contained in:
Faruk AYDIN
2021-10-12 17:51:43 +02:00
committed by Ali BARIN
parent e569b188a9
commit 981ea6d163
10 changed files with 174 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import Base from './base'
class Credential extends Base {
id!: number
displayName!: string
key!: string
data!: string
userId!: number
static tableName = 'credentials';
static jsonSchema = {
type: 'object',
required: ['displayName', 'key', 'data', 'userId'],
properties: {
id: { type: 'integer' },
displayName: { type: 'string', minLength: 1, maxLength: 255 },
key: { type: 'string', minLength: 1, maxLength: 255 },
data: { type: 'object' },
userId: { type: 'integer' },
verified: { type: 'boolean' },
}
}
}
export default Credential;