import 'package:json_annotation/json_annotation.dart';

part 'invoice.model.g.dart';

@JsonSerializable()
class Invoice {

  Invoice();

  factory Invoice.fromJson(Map<String, dynamic> json) => _$InvoiceFromJson(json);
  Map<String, dynamic> toJson() => _$InvoiceToJson(this);

  int id;
  int company_id;
  String type;
  String from_fiscal_name;
  String from_nif_cif;
  String from_fiscal_address;
  String to_fiscal_name;
  String to_nif_cif;
  String to_fiscal_address;
  String invoice_prefix;
  String invoice_serie;
  int invoice_number;
  DateTime emitted_date;
  DateTime due_date;
  String concept;
  double subtotal;
  double tax_prcnt;
  double tax_amount;
  double total;
  DateTime created_at;
  DateTime updated_at;
  String official_number;

}