Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
||
| register_id | int4 | 10 | √ | null |
|
|
||
| room_id | int4 | 10 | √ | null |
|
|
||
| booking_id | int4 | 10 | √ | null |
|
|
||
| credential_type | text | 2147483647 | √ | null |
|
|
||
| pin_code | text | 2147483647 | √ | null |
|
|
||
| qr_payload | text | 2147483647 | √ | null |
|
|
||
| valid_from | timestamp | 29,6 | √ | null |
|
|
||
| valid_until | timestamp | 29,6 | √ | null |
|
|
||
| status | text | 2147483647 | √ | 'P'::text |
|
|
P = ใช้งานได้ / E = ออกหรือเพิกถอนไม่สำเร็จ / R = เลิกใช้แล้ว (ดู revoke_reason) |
|
| api_request | jsonb | 2147483647 | √ | null |
|
|
||
| api_response | jsonb | 2147483647 | √ | null |
|
|
||
| log_time | timestamptz | 35,6 | √ | now() |
|
|
||
| log_user | text | 2147483647 | √ | null |
|
|
||
| credential_ref | text | 2147483647 | √ | null |
|
|
handle ของ credential ฝั่ง vendor สำหรับอ้างอิงกลับไปจัดการ – PIN = keyboardPwdId (ใช้กับ deleteonepasscode), QR = id ที่ vendor คืนตอนออก credential; ตั้งชื่อกลางไว้เพราะ 1 แถว = 1 credential ไม่ผูกชนิด (ดู credential_type) |
|
| revoke_time | timestamptz | 35,6 | √ | null |
|
|
||
| revoke_reason | text | 2147483647 | √ | null |
|
|
REVOKE = พนักงานสั่งเอง / STAYCHANGE = ถูกแทนที่ตอนย้ายห้อง-เปลี่ยนวัน / REISSUE = ถูก addpasscode ใบใหม่ล้าง / CANCEL_CHECKIN |
|
| revoke_request_id | int8 | 19 | √ | null |
|
|
net.http_request_queue.id ใน authen (สาย async) – ไล่ผลจริงได้จาก net._http_response |
|
| revoke_response | jsonb | 2147483647 | √ | null |
|
|
||
| extra_doors | jsonb | 2147483647 | √ | null |
|
|
ประตูเพิ่มเติมที่ passcode ใบนี้เปิดได้ ตาม vendor API v1.5: {“public_door”:{keyboardPwd,keyboardPwdId,roomno},…,“sub_door”:…} – NULL = ไม่มี (แถวก่อน v1.5 ก็เป็น NULL, ดูของจริงได้ใน api_response) |
|
| qr_url | text | 2147483647 | √ | null |
|
|
URL public บน S3 ของรูป QR (เฉพาะแถว credential_type=QR) – key ของไฟล์เก็บที่ credential_ref |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| intf_doorlock_logs_pkey | Primary key | Asc | id |
| idx_intf_doorlock_logs_register | Performance | Asc | register_id |
