import { Account } from 'shared/model/account' ; import { PublicKey } from 'shared/model/types' ; export class DelegateModel { username : string ; url : string ; missedBlocks : number ; forgedBlocks : number ; account : Account ; votes : number ; confirmedVoteCount : number ; approval : number ; constructor ( data ) { this . username = data . username ; this . url = data . url ; this . missedBlocks = data . missedBlocks ; this . forgedBlocks = data . forgedBlocks ; this . account = data . account ; this . votes = data . votes ; this . confirmedVoteCount = data . confirmedVoteCount ; this . approval = data . approval || 0 ; } } export class Delegate extends DelegateModel { } export type SerializedDelegate = { username : string ; missedBlocks : number ; forgedBlocks : number ; publicKey : PublicKey ; votes : number ; confirmedVoteCount : number ; approval : number ; } ;