package com.palmnest.model.repair;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 维修单耗材记录
 *
 * @author wangxz
 * <p>
 * 2018年5月7日
 */
@Entity
@Table(name = "tb_repair_bill_materials")
public class RepairBillMaterial implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 2145255166612536066L;

	private Long    id;

	private Long materialsId;
	private Long    billId;// '维修单',
	private String  materialName; // 材料名称
	private Integer amount; // 材料数量

	public RepairBillMaterial() {

	}


	public RepairBillMaterial(Long billId,Long materialsId, String materialName, Integer amount) {
		super();
		this.billId = billId;
		this.materialsId =materialsId;
		this.materialName = materialName;
		this.amount = amount;
	}


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "bill_id")
	public Long getBillId() {
		return billId;
	}

	public void setBillId(Long billId) {
		this.billId = billId;
	}

	@Column(name = "material_name")
	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	@Column(name = "amount")
	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	@Column(name = "materials_id")
	public Long getMaterialsId() {
		return materialsId;
	}

	public void setMaterialsId(Long materialsId) {
		this.materialsId = materialsId;
	}
}
