frigate/frigate/models.py

30 lines
875 B
Python
Raw Normal View History

from numpy import unique
2020-11-01 17:06:15 +03:00
from peewee import *
from playhouse.sqlite_ext import *
2020-11-04 15:31:25 +03:00
2020-11-01 17:06:15 +03:00
class Event(Model):
id = CharField(null=False, primary_key=True, max_length=30)
label = CharField(index=True, max_length=20)
camera = CharField(index=True, max_length=20)
start_time = DateTimeField()
end_time = DateTimeField()
top_score = FloatField()
false_positive = BooleanField()
2020-11-04 15:31:25 +03:00
zones = JSONField()
thumbnail = TextField()
2020-12-24 16:47:27 +03:00
has_clip = BooleanField(default=True)
has_snapshot = BooleanField(default=True)
2021-09-23 15:31:48 +03:00
region = JSONField()
box = JSONField()
2021-09-26 17:42:31 +03:00
area = IntegerField()
class Recordings(Model):
id = CharField(null=False, primary_key=True, max_length=30)
camera = CharField(index=True, max_length=20)
path = CharField(unique=True)
start_time = DateTimeField()
end_time = DateTimeField()
duration = FloatField()