Skip to content
Snippets Groups Projects
Commit 1bc5555f authored by BEAUVAIS ANTOINE's avatar BEAUVAIS ANTOINE
Browse files

Merge branch 'develop' into 'master'

Merge 'develop' changes into 'master'.

See merge request !1
parents 47acf3ea daf3dfed
1 merge request!1Merge 'develop' changes into 'master'.
/*
* CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-B
* https://cecill.info/licences/Licence_CeCILL-B_V1-fr.html
*/
package fr.unistra.sil.erp.back.model;
/**
* Representation of a stock entry.
* @author BEAUVAIS ANTOINE
*/
public class Stock {
private final int id;
private final int itemId;
private final String itemName;
private final int quantity;
public Stock(int id, int itemId, String itemName, int quantity)
{
this.id = id;
this.itemId = itemId;
this.itemName = itemName;
this.quantity = quantity;
}
public int getId()
{
return this.id;
}
public int getItemId()
{
return this.itemId;
}
public String getItemName()
{
return this.itemName;
}
public int getQuantity()
{
return this.quantity;
}
}
/*
* CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-B
* https://cecill.info/licences/Licence_CeCILL-B_V1-fr.html
*/
package fr.unistra.sil.erp.back.model;
import java.math.BigDecimal;
/**
* Representation of a transaction.
* @author BEAUVAIS ANTOINE
*/
public class Transaction {
private final Integer item;
private final Integer type;
private final BigDecimal amount;
private final Integer quantity;
public Transaction(Integer item, Integer type, BigDecimal amount,
Integer quantity)
{
this.item = item;
this.type = type;
this.amount = amount;
this.quantity = quantity;
}
public Integer getItem()
{
return this.item;
}
public Integer getType()
{
return this.type;
}
public BigDecimal getAmount()
{
return this.amount;
}
public Integer getQuantity()
{
return this.quantity;
}
public boolean checkIfValid()
{
return (this.item != null && this.type != null
&& this.amount != null && this.quantity != null);
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment