-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prekė `Item`: * barcode - Barkodas * name - Prekės pavadinimas * price - Kaina * weight - Svoris * image_url - Nuotrauka Nuskenuota prekė `ScannedItem`: * id - nuskenavimo id * barcode - prekės barkodas * time - Laikas * place - Vieta * volunteer - Savanoris
- Loading branch information
1 parent
c6e9e5c
commit a3d19b7
Showing
4 changed files
with
171 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package lt.andro.maistobankas.db; | ||
|
||
import com.j256.ormlite.field.DatabaseField; | ||
import com.j256.ormlite.table.DatabaseTable; | ||
|
||
/** | ||
* @author Vilius Kraujutis viliusk@gmail.com | ||
* @since 2014-02-08 14:30 | ||
*/ | ||
@DatabaseTable(tableName = "items") | ||
public class Item { | ||
@DatabaseField(id = true) | ||
private String barcode; | ||
private String name; | ||
private double price; | ||
private double weight; | ||
private String imageUrl; | ||
|
||
public String getBarcode() { | ||
return barcode; | ||
} | ||
|
||
public void setBarcode(String barcode) { | ||
this.barcode = barcode; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public double getPrice() { | ||
return price; | ||
} | ||
|
||
public void setPrice(double price) { | ||
this.price = price; | ||
} | ||
|
||
public double getWeight() { | ||
return weight; | ||
} | ||
|
||
public void setWeight(double weight) { | ||
this.weight = weight; | ||
} | ||
|
||
public String getImageUrl() { | ||
return imageUrl; | ||
} | ||
|
||
public void setImageUrl(String imageUrl) { | ||
this.imageUrl = imageUrl; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Item{" + | ||
"barcode='" + barcode + '\'' + | ||
", name='" + name + '\'' + | ||
", price=" + price + | ||
", weight=" + weight + | ||
", imageUrl='" + imageUrl + '\'' + | ||
'}'; | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
app/src/main/java/lt/andro/maistobankas/db/ScannedItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package lt.andro.maistobankas.db; | ||
|
||
import com.j256.ormlite.field.DatabaseField; | ||
import com.j256.ormlite.table.DatabaseTable; | ||
|
||
/** | ||
* @author Vilius Kraujutis viliusk@gmail.com | ||
* @since 2014-02-08 14:50 | ||
*/ | ||
@DatabaseTable(tableName = "scanned_item") | ||
public class ScannedItem { | ||
|
||
@DatabaseField(id = true) | ||
private long id; | ||
|
||
@DatabaseField(canBeNull = false) | ||
private String barcode; | ||
@DatabaseField(canBeNull = false) | ||
private long timestamp; | ||
private String place; | ||
private String volunteer; | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getBarcode() { | ||
return barcode; | ||
} | ||
|
||
public void setBarcode(String barcode) { | ||
this.barcode = barcode; | ||
} | ||
|
||
public long getTimestamp() { | ||
return timestamp; | ||
} | ||
|
||
public void setTimestamp(long timestamp) { | ||
this.timestamp = timestamp; | ||
} | ||
|
||
public String getPlace() { | ||
return place; | ||
} | ||
|
||
public void setPlace(String place) { | ||
this.place = place; | ||
} | ||
|
||
public String getVolunteer() { | ||
return volunteer; | ||
} | ||
|
||
public void setVolunteer(String volunteer) { | ||
this.volunteer = volunteer; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ScannedItem{" + | ||
"id=" + id + | ||
", barcode='" + barcode + '\'' + | ||
", timestamp=" + timestamp + | ||
", place='" + place + '\'' + | ||
", volunteer='" + volunteer + '\'' + | ||
'}'; | ||
} | ||
} |