diff options
author | Sebastian Reichel <sre@ring0.de> | 2015-09-13 23:05:18 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2015-09-13 23:05:18 +0200 |
commit | 1ea4fdf8072d6be99a13cc796c9775c05f8c9498 (patch) | |
tree | b743630f1813670d6034717da829b17bc33e906b /src/database/db-interface.vala | |
parent | 9dce0dfa4cd90e7ce2131e1e5821f54eb3754b26 (diff) | |
download | serial-barcode-scanner-1ea4fdf8072d6be99a13cc796c9775c05f8c9498.tar.bz2 |
Add support for aliased EANs
Some products are sold under different EANs (e.g. per-country EANs).
The alias table can be used to map multiple EANs to a single product.
Diffstat (limited to 'src/database/db-interface.vala')
-rw-r--r-- | src/database/db-interface.vala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/database/db-interface.vala b/src/database/db-interface.vala index b61cba7..d469743 100644 --- a/src/database/db-interface.vala +++ b/src/database/db-interface.vala @@ -55,6 +55,9 @@ public interface Database : Object { public abstract void cashbox_add(int user, Price amount, int64 timestamp) throws IOError, DatabaseError; public abstract CashboxDiff[] cashbox_history() throws IOError; public abstract CashboxDiff[] cashbox_changes(int64 start, int64 stop) throws IOError; + public abstract void ean_alias_add(uint64 ean, uint64 real_ean) throws IOError, DatabaseError; + public abstract uint64 ean_alias_get(uint64 ean) throws IOError; + public abstract EanAlias[] ean_alias_list() throws IOError; } public struct StockEntry { @@ -141,6 +144,11 @@ public struct CashboxDiff { public int64 timestamp; } +public struct EanAlias { + public uint64 ean; + public uint64 real_ean; +} + public struct StatsInfo { public int count_articles; public int count_users; |