Closed happydeveloper closed 4 years ago
create table attendance( id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, user_id INT UNSIGNED NOT NULL, clock_in TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( id ) );
id – This is an integer that is used to keep track of the current row and increases automatically.
user_id – This is an integer, and we utilize this to tie attendance with a user in our users table that has the same id.
clock_in – This variable stores a SQL timestamp. This timestamp is used to track when the user taps their RFID card onto the RFID reader.
create table users( id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, rfid_uid VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( id ) );
id – This is an integer that is used to keep track of the current user and increases automatically.
rfid_uid – This variable is used to store the UID that is captured when an RFID card is tapped on the RFID reader.
name – This variable stores the name of the person who owns the RFID card.
created – We use this variable to keep track of when the user was created.
create table attendance( id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, user_id INT UNSIGNED NOT NULL, clock_in TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( id ) );
- id – This is an integer that is used to keep track of the current row and increases automatically.
- user_id – This is an integer, and we utilize this to tie attendance with a user in our users table that has the same id.
- clock_in – This variable stores a SQL timestamp. This timestamp is used to track when the user taps their RFID card onto the RFID reader.
create table users( id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, rfid_uid VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( id ) );
- id – This is an integer that is used to keep track of the current user and increases automatically.
- rfid_uid – This variable is used to store the UID that is captured when an RFID card is tapped on the RFID reader.
- name – This variable stores the name of the person who owns the RFID card.
- created – We use this variable to keep track of when the user was created.
@happydeveloper 여기 참고해주세요
모델링 반영~ 인증테이블과 비지니스 로직 테이블이 필요해 보여요! @AntonSangho
사용자 상세 페이지 출력
사용자 테이블 출입로그 테이블