import { BaseResourceModel } from "../../../shared/models/base-resource.model" ; import { Category } from "../../categories/shared/category.model" ; export class Entry extends BaseResourceModel { constructor ( public id ? , public name ? , public description ? , public type ? , public amount ? , public date ? , public paid ? , public categoryId ? , public category ? ) { super ( ) ; } static types = { expense : 'Despesa' , revenue : 'Receita' } ; static fromJson ( jsonData ) { return Object . assign ( new Entry ( ) , jsonData ) ; } get paidText ( ) : string { return this . paid ? 'Pago' : 'Pedente' ; } }