import { ITransaction } from 'typings';

export default class Transaction {
  constructor(state: ITransaction) {
    this.title = state.title;
    this.description = state.description;
    this.success = state.success;
    this.message = state.message;
    this.date = new Date(state.date);
    this.amount = state.amount;
  }

  title: string;
  description: string;
  success: boolean;
  message: string;
  date: Date;
  amount: number;
}
