import { ISeed , ISeedData , ISeedOptions , ISeedDataFull } from '../interfaces/ISeed' ; export class Seed implements ISeed { public static parse ( data ) { return new Seed ( data . id , data . entrantId , data . placeholderName , data . seedNumber , data . placement , data . isBye ) ; } public static parseFull ( data ) { return data . seed . map ( seedData => Seed . parse ( seedData ) ) ; } public static getDefaultSeedOptions ( ) { return { page : null , perPage : 1 , sortBy : null , filter : null } ; } private id : number ; private entrantId : number ; private placeholderName : string ; private seedNumber : number ; private placement : number ; private isBye : boolean ; constructor ( id , entrantId , placeholderName , seedNumber , placement , isBye ) { this . id = id ; this . entrantId = entrantId ; this . placeholderName = placeholderName ; this . seedNumber = seedNumber ; this . placement = placement ; this . isBye = isBye ; } public getId ( ) { return this . id ; } public getEntrantId ( ) { return this . entrantId ; } public getPlaceholderName ( ) { return this . placeholderName ; } public getSeedNumber ( ) { return this . seedNumber ; } public getPlacement ( ) { return this . placement ; } public getIsBye ( ) { return this . isBye ; } }