import { AllowNull, Column, CreatedAt, DataType, HasMany, Model, Table, UpdatedAt } from 'sequelize-typescript'
+import { AttributesOnly } from '@shared/typescript-utils'
import { OAuthTokenModel } from './oauth-token'
@Table({
}
]
})
-export class OAuthClientModel extends Model<OAuthClientModel> {
+export class OAuthClientModel extends Model<Partial<AttributesOnly<OAuthClientModel>>> {
@AllowNull(false)
@Column
static getByIdAndSecret (clientId: string, clientSecret: string) {
const query = {
where: {
- clientId: clientId,
- clientSecret: clientSecret
+ clientId,
+ clientSecret
}
}