Database Schema#
Database được thiết kế qua Eloquent Migrations, dưới đây là các bảng chính thống kê theo phân tích mã (được quản lý timestamps created_at, updated_at, deleted_at - SoftDelete cho hầu hết bảng).1. Phân Quyền và Quản Lý Trạng Thái (Spatie Permission)#
users: id, name, email, password, is_active, last_login, remember_token...
roles, permissions, model_has_permissions, model_has_roles, role_has_permissions: Cấu trúc chuẩn RBAC của Gói Laravel Spatie Permission. Có tính năng mở rộng độ sâu quyền hạn qua Level.
user_otps: Lưu trữ OTP, thời gian đăng nhập.
2. Dữ liệu Google Indexing & Domains#
domains: id, name, group_id, branch_id, index_status, date_checkindex, date_s3_key, index_state, run_check_index, type, v.v...
domain_google_accounts: Bảng trung gian lưu Service Accounts Map (domain_id, google_account_id).
domain_reports: Thống kê tổng traffic, trạng thái số file, ranking của từng domain theo ngày.
domain_finals / domain_redirects: Lưu lịch sử redirect domain SEO 301.
3. Google Engine Service Database#
google_accounts: id, client_email, private_key, project_id, count_date...
4. Keywords Engine Data#
keywords: Quản lý meta dữ liệu SEO từ khoá (title, slug, volume, volume_trend, group_id, branch_id, ai_content, is_active, redirect_url).
keyword_contents: Thư mục hay nội dung tạo ngẫu nhiên trên trang sinh nội dụng HTML.
keyword_tools: Keyword search volumes cache, traffic logs.
keyword_file_jobs: uuid, domain_id, status, keyword_generated_ids, count, keyword_running_ids, is_insert_log, internal_link, batch_ids (Quản lý tiến độ tạo hàng loạt html).
keyword_job_logs: keyword_id, domain_id, index_url, position_index, index_time, traffic_total, template_url, ranking_rank_time. Lịch sử ranking và traffic của file đã tạo.
history_indexes, history_rank, history_indexeds: Dữ liệu Snapshots Tracking Google Search Console qua API.
5. Jobs / Framework#
jobs, job_batches, failed_jobs: Horizon Queue Storage.
activity_log: Bảng theo dõi lịch sử thao tác của backend user (Spatie Activitylog).
6. Template & Config#
templates, template_users, template_value_rules: Quản lý rule template HTML tạo website landing clone tự động (seo PBN).
configs: Cấu hình Amazon S3 API keys, thư mục public push files.
groups, branches: Taxonomy phân lớp từ khoá và domains.
brand_images: Hình ảnh nhận diện nhãn hiệu (alt).
Ngày cập nhật 2026-03-31 10:33:00