import {Injectable, Model, Field, FieldType} from '@extollo/lib'

@Injectable()
export class Certificate extends Model<Certificate> {
    protected static table = 'pub_certificates'
    protected static key = 'certificate_id'

    @Field(FieldType.serial, 'certificate_id')
    public certificateId?: number

    @Field(FieldType.varchar)
    public reltype: 'user' = 'user'

    @Field(FieldType.bigint)
    public relid!: number

    @Field(FieldType.text)
    public pubkey!: string

    @Field(FieldType.text)
    public privkey!: string
}
