From 1ea4fdf8072d6be99a13cc796c9775c05f8c9498 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Sun, 13 Sep 2015 23:05:18 +0200 Subject: 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. --- src/database/db-interface.vala | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/database/db-interface.vala') 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; -- cgit v1.2.3