/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package object.billmanager;

import java.awt.Color;
import java.util.ArrayList;
import java.util.Date;
import object.tablemanager.Table;

/**
 *
 * @author Administrator
 */
public class Bill extends Table {

    private int Id;
    private Date date;

    public int getId() {
        return Id;
    }

    public void setId(int Id) {
        this.Id = Id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Bill() {
    }

    public Bill(int Id, Date date) {
        this.Id = Id;
        this.date = date;
    }

    public Bill(int Id, Date date, String idTable, String nameTable, ArrayList<BillItem> alBillItems, Color colorTable) {
        super(idTable, nameTable, alBillItems, colorTable);
        this.Id = Id;
        this.date = date;
    }

    public Bill(int Id, Date date, String idTable, String nameTable, ArrayList<BillItem> alBillItems, Color colorTable, String idFloor, String nameFloor) {
        super(idTable, nameTable, alBillItems, colorTable, idFloor, nameFloor);
        this.Id = Id;
        this.date = date;
    }

    @Override
    public String toString() {
        return super.toString() + ", Bill{" + "Id=" + Id + ", date=" + date + '}';
    }

    public String[] toArray() {
        return new String[]{super.getIdTable(), super.getNameTable(), Id + "", super.getTotalMoney() + "", date.toString()};
    }

}
