-
Notifications
You must be signed in to change notification settings - Fork 0
/
table_type.go
40 lines (34 loc) · 970 Bytes
/
table_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package storage
import (
"time"
)
var Tables = map[string]string{
"plates": "id text PRIMARY KEY, start timestamp, end timestamp, camera_id int, plate string, confidence float, direction float, is_parked integer",
"plate_images": "id text PRIMARY KEY, image blob",
"vehicle_images": "id text PRIMARY KEY, image blob",
"properties": "id text, key text, value text, confidence float",
}
type TablePlates struct {
ID string `db:"id"`
Start time.Time `db:"start"`
End time.Time `db:"end"`
CameraID int `db:"camera_id"`
Plate string `db:"plate"`
Confidence float64 `db:"confidence"`
Direction float64 `db:"direction"`
IsParked bool `db:"is_parked"`
}
type TablePlateImages struct {
ID string `db:"id"`
Image []byte `db:"image"`
}
type TableVehicleImages struct {
ID string `db:"id"`
Image []byte `db:"image"`
}
type TableProperties struct {
ID string `db:"id"`
Key string `db:"key"`
Value string `db:"value"`
Confidence float64 `db:"confidence"`
}