import { Model } from 'front';

/**\

    title: LegalName
    category: model
    description: A pretty sweet model with displayName function

\**/
class LegalName extends Model {
    constructor(data) {
        super({
            first: '',
            last: ''
        });

        this.fill(data);
    }

    displayName() {
        return (
            (this.first || '').trim() +
            ' ' +
            (this.last || '').trim()
        ).trim();
    }
}

export default LegalName;
