Initial commit

Connects to zwave-js, syncs all locks and codeslots with database, and records an event log. No support for updating code slots.
This commit is contained in:
Finn 2024-04-08 21:25:36 -07:00
commit 054008eb1f
20 changed files with 1165 additions and 0 deletions

32
db/models.go Normal file
View file

@ -0,0 +1,32 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.20.0
package db
import (
"database/sql"
"time"
)
type Lock struct {
ID int64
Name string
ZwaveDeviceID int64
}
type LockCodeSlot struct {
ID int64
Lock int64
Code string
Slot int64
Name string
Enabled bool
}
type LockLog struct {
Lock int64
Timestamp time.Time
State string
Code sql.NullInt64
}