You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
622 B

import {Injectable, Model, Field, FieldType} from '@extollo/lib'
/**
* Credential Model
* -----------------------------------
* A username and {password|api token} for the PVE cluster.
*/
@Injectable()
export class Credential extends Model<Credential> {
protected static table = 'p5x_credentials'
protected static key = 'id'
@Field(FieldType.serial)
public id?: number
@Field(FieldType.varchar, 'pve_username')
public username!: string
@Field(FieldType.text, 'pve_credential')
public credential!: string
@Field(FieldType.bool, 'is_api_token')
public isApiToken!: boolean
}