{"slug":"employee-roster","name":"EmpRoster","description":"Self-hosted staff rostering and shift scheduling for WordPress. No per-user fees. Your data, your server.","author":"AlifLab","active_installs":0,"version":"2.8.35","wp_org_url":"https://wordpress.org/plugins/employee-roster/","is_closed":false,"cleanup":{"has_uninstall_hook":true,"drops_tables_on_uninstall":false,"deletes_options_on_uninstall":true},"tables":[{"table_name":"emr_assignments","full_table_name":"wp_emr_assignments","description":"Stores emr assignments data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"shift_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"user_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"status","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"assigned_by","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"assigned_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"reviewed_by","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"reviewed_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_assignments ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, shift_id BIGINT UNSIGNED NOT NULL, user_id BIGINT UNSIGNED NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'confirmed', assigned_by BIGINT UNSIGNED NOT NULL DEFAULT 0, assigned_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, reviewed_by BIGINT UNSIGNED DEFAULT NULL, reviewed_at DATETIME DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY uq_shift_user (shift_id, user_id), KEY idx_user (user_id), KEY idx_shift (shift_id), KEY idx_status (status) ) $c;\" );"},{"table_name":"emr_attendance","full_table_name":"wp_emr_attendance","description":"Stores emr attendance data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"user_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"shift_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"clock_in","type":"DATETIME","nullable":true,"primary_key":false},{"name":"clock_out","type":"DATETIME","nullable":true,"primary_key":false},{"name":"break_minutes","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"notes","type":"TEXT","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_attendance ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, shift_id BIGINT UNSIGNED DEFAULT NULL, clock_in DATETIME DEFAULT NULL, clock_out DATETIME DEFAULT NULL, break_minutes SMALLINT UNSIGNED NOT NULL DEFAULT 0, notes TEXT DEFAULT NULL, status VARCHAR(20) NOT NULL DEFAULT 'active', created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_user (user_id), KEY idx_shift (shift_id), KEY idx_clock_in (clock_in) ) $c;\" );"},{"table_name":"emr_availability","full_table_name":"wp_emr_availability","description":"Stores emr availability data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"user_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"day_of_week","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"start_time","type":"TIME","nullable":false,"primary_key":false},{"name":"end_time","type":"TIME","nullable":false,"primary_key":false},{"name":"is_available","type":"TINYINT(1)","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_availability ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, day_of_week TINYINT UNSIGNED NOT NULL, start_time TIME NOT NULL, end_time TIME NOT NULL, is_available TINYINT(1) NOT NULL DEFAULT 1, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_user_day (user_id, day_of_week) ) $c;\" );"},{"table_name":"emr_leave","full_table_name":"wp_emr_leave","description":"Stores emr leave data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"user_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"leave_type","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"start_date","type":"DATE","nullable":false,"primary_key":false},{"name":"end_date","type":"DATE","nullable":false,"primary_key":false},{"name":"reason","type":"TEXT","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"reviewed_by","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"reviewed_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_leave ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, leave_type VARCHAR(20) NOT NULL DEFAULT 'annual', start_date DATE NOT NULL, end_date DATE NOT NULL, reason TEXT DEFAULT NULL, status VARCHAR(20) NOT NULL DEFAULT 'pending', reviewed_by BIGINT UNSIGNED DEFAULT NULL, reviewed_at DATETIME DEFAULT NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_user (user_id), KEY idx_dates (start_date, end_date), KEY idx_status (status) ) $c;\" );"},{"table_name":"emr_leave_balances","full_table_name":"wp_emr_leave_balances","description":"Stores emr leave balances data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"user_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"leave_type","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"year","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"accrued","type":"DECIMAL(8,2)","nullable":false,"primary_key":false},{"name":"used","type":"DECIMAL(8,2)","nullable":false,"primary_key":false},{"name":"adjustment","type":"DECIMAL(8,2)","nullable":false,"primary_key":false},{"name":"last_accrual_date","type":"DATE","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_leave_balances ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, leave_type VARCHAR(20) NOT NULL, year SMALLINT UNSIGNED NOT NULL, accrued DECIMAL(8,2) NOT NULL DEFAULT '0.00', used DECIMAL(8,2) NOT NULL DEFAULT '0.00', adjustment DECIMAL(8,2) NOT NULL DEFAULT '0.00', last_accrual_date DATE DEFAULT NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY uq_user_type_year (user_id, leave_type, year), KEY idx_user (user_id) ) $c;\" );"},{"table_name":"emr_login_logs","full_table_name":"wp_emr_login_logs","description":"A logging table that records activity, events, or audit history.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"user_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"username_attempt","type":"VARCHAR(60)","nullable":true,"primary_key":false},{"name":"event_type","type":"VARCHAR(10)","nullable":false,"primary_key":false},{"name":"ip_address","type":"VARCHAR(45)","nullable":true,"primary_key":false},{"name":"user_agent","type":"VARCHAR(500)","nullable":true,"primary_key":false},{"name":"login_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_login_logs ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED DEFAULT NULL, username_attempt VARCHAR(60) DEFAULT NULL, event_type VARCHAR(10) NOT NULL DEFAULT 'login', ip_address VARCHAR(45) DEFAULT NULL, user_agent VARCHAR(500) DEFAULT NULL, login_at DATETIME NOT NULL, PRIMARY KEY (id), KEY idx_user (user_id), KEY idx_login_at (login_at), KEY idx_event (event_type) ) $c;\" );"},{"table_name":"emr_shifts","full_table_name":"wp_emr_shifts","description":"Stores emr shifts data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"title","type":"VARCHAR(200)","nullable":false,"primary_key":false},{"name":"start_datetime","type":"DATETIME","nullable":false,"primary_key":false},{"name":"end_datetime","type":"DATETIME","nullable":false,"primary_key":false},{"name":"location","type":"VARCHAR(200)","nullable":false,"primary_key":false},{"name":"department","type":"VARCHAR(120)","nullable":false,"primary_key":false},{"name":"assignment_type","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"break_minutes","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"color","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"slot_limit","type":"SMALLINT UNSIGNED","nullable":true,"primary_key":false},{"name":"notes","type":"TEXT","nullable":true,"primary_key":false},{"name":"attachment_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"created_by","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_shifts ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(200) NOT NULL DEFAULT '', start_datetime DATETIME NOT NULL, end_datetime DATETIME NOT NULL, location VARCHAR(200) NOT NULL DEFAULT '', department VARCHAR(120) NOT NULL DEFAULT '', assignment_type VARCHAR(20) NOT NULL DEFAULT 'direct', break_minutes SMALLINT UNSIGNED NOT NULL DEFAULT 30, color VARCHAR(20) NOT NULL DEFAULT '#2563EB', slot_limit SMALLINT UNSIGNED DEFAULT NULL, notes TEXT DEFAULT NULL, attachment_id BIGINT UNSIGNED DEFAULT NULL, status VARCHAR(20) NOT NULL DEFAULT 'published', created_by BIGINT UNSIGNED NOT NULL DEFAULT 0, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_start (start_datetime), KEY idx_status (status) ) $c;\" );"},{"table_name":"emr_swap_requests","full_table_name":"wp_emr_swap_requests","description":"Stores emr swap requests data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"requester_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"requester_shift_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"target_user_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"reason","type":"TEXT","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"reviewed_by","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"reviewed_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_emr_swap_requests ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, requester_id BIGINT UNSIGNED NOT NULL, requester_shift_id BIGINT UNSIGNED NOT NULL, target_user_id BIGINT UNSIGNED DEFAULT NULL, reason TEXT DEFAULT NULL, status VARCHAR(20) NOT NULL DEFAULT 'pending', reviewed_by BIGINT UNSIGNED DEFAULT NULL, reviewed_at DATETIME DEFAULT NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_requester (requester_id), KEY idx_status (status) ) $c;\" );"}],"table_count":8}