Spaces:
Sleeping
Sleeping
File size: 1,101 Bytes
1cd0545 | 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | create table employees (
employee_id text primary key,
full_name text not null,
department text,
position text,
email text,
phone text,
is_active boolean default true,
created_at timestamptz default now()
);
create table face_embeddings (
employee_id text primary key,
full_name text,
embedding_vector jsonb not null,
image_count integer default 0,
updated_at timestamptz default now(),
constraint fk_embedding_employee
foreign key(employee_id)
references employees(employee_id)
);
create table attendance_logs (
attendance_id bigint generated always as identity primary key,
employee_id text not null,
check_time timestamptz default now(),
similarity float,
camera_id text,
status text,
constraint fk_attendance_employee
foreign key(employee_id)
references employees(employee_id)
);
create table devices (
device_id text primary key,
device_name text,
location text,
is_active boolean default true,
created_at timestamptz default now()
); |