From 2f0483eb34ae51dc0dc241409342db021b995856 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 5 Jul 2024 21:43:56 +0530 Subject: bpf: use hwaddr for identification --- db/models.go | 6 +++--- db/query.sql.go | 6 +++--- db/schema.sql | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'db') diff --git a/db/models.go b/db/models.go index 83e4051..a6da6bf 100644 --- a/db/models.go +++ b/db/models.go @@ -9,9 +9,9 @@ import ( ) type Usage struct { - Hardwareaddr int32 + Hardwareaddr int64 Starttime pgtype.Timestamp Stoptime pgtype.Timestamp - Egress int32 - Ingress int32 + Egress int64 + Ingress int64 } diff --git a/db/query.sql.go b/db/query.sql.go index de68384..7afe159 100644 --- a/db/query.sql.go +++ b/db/query.sql.go @@ -20,11 +20,11 @@ INSERT INTO Usage ( ` type EnterUsageParams struct { - Hardwareaddr int32 + Hardwareaddr int64 Starttime pgtype.Timestamp Stoptime pgtype.Timestamp - Egress int32 - Ingress int32 + Egress int64 + Ingress int64 } func (q *Queries) EnterUsage(ctx context.Context, arg EnterUsageParams) error { diff --git a/db/schema.sql b/db/schema.sql index b8f8540..aece061 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -1,7 +1,7 @@ CREATE TABLE Usage ( - HardwareAddr INTEGER NOT NULL, + HardwareAddr BIGINT NOT NULL, StartTime TIMESTAMP NOT NULL, StopTime TIMESTAMP NOT NULL, - Egress INTEGER NOT NULL, - Ingress INTEGER NOT NULL + Egress BIGINT NOT NULL, + Ingress BIGINT NOT NULL ); -- cgit v1.2.3