Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::posts::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |user_id | INT(11) | |
- | |title | VARCHAR(255) | |
- | |slug | VARCHAR(255) | UNIQUE |
- | |views | INT(11) | DEFAULT 0 |
- | |image | VARCHAR(255) | | -> LONBLOB
- | |body | TEXT | |
- | |published | boolean | |
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- +----+-----------+--------------+------------+
- ::users::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |username | VARCHAR(255) | UNIQUE |
- | |email | VARCHAR(255) | UNIQUE |
- | |moderator | boolean | |
- | |password | VARCHAR(255) | |
- | |avatar | LONGBLOB | |
- | |role | ENUM() | | ("Administrador","Author","Lector")
- | |active | boolean | | -> usuario activo
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- +----+-----------+--------------+------------+
- ::categories::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |name | VARCHAR(55) | UNIQUE |
- | |slug | VARCHAR(55) | UNIQUE |
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- +----+-----------+--------------+------------+
- ::tags::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |name | VARCHAR(55) | UNIQUE |
- | |slug | VARCHAR(55) | UNIQUE |
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- +----+-----------+--------------+------------+
- ::posts_tags::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |post_id | INT(11) | |
- | |tags_id | INT(11) | |
- +----+-----------+--------------+------------+
- ::posts_category::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |post_id | INT(11) | |
- | |tag_id | INT(11) | |
- +----+-----------+--------------+------------+
- ::comments::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |contenido | VARCHAR(255) | |
- | |user_id | INT(11) | |
- | |post_id | INT(11) | |
- | |status | INT(11) | | -> "Publicado", "Pendiente de aprovacion", "Eliminado"
- | |moderate | bolean | |
- | |votes_pos | INT(11) | DEFAULT 0 |
- | |votes_neg | INT(11) | DEFAULT 0 |
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |edited_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |edited_by | INT(11) | |
- +----+-----------+--------------+------------+
- ::replies:: -> respuestas a los comentarios
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |contenido | VARCHAR(255) | |
- | |user_id | INT(11) | |
- | |comment_id | INT(11) | |
- | |status | INT(11) | | -> "Publicado", "Pendiente de aprovacion", "Eliminado"
- | |moderate | bolean | |
- | |votes_pos | INT(11) | |
- | |votes_neg | INT(11) | |
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |edited_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |edited_by | INT(11) | |
- +----+-----------+--------------+------------+
- ::posts_comments::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |post_id | INT(11) | |
- | |comment_id | INT(11) | |
- +----+-----------+--------------+------------+
- ::comments_replies::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |comment_id | INT(11) | |
- | |replies_id | INT(11) | |
- +----+-----------+--------------+------------+
- ::votes::
- +----+-----------+--------------+------------+
- | | field | type | specs |
- +----+-----------+--------------+------------+
- | |id | INT(11) | |
- | |user_id | INT(11) | |
- | |vote | INT(11) | | -> valor poitivo o negativo
- | |post_id | INT(11) | |
- | |comment_id | INT(11) | |
- | |replies_id | INT(11) | |
- +----+-----------+--------------+------------+
- ::images::
- +----+--------------+--------------+------------+
- | | field | type | specs |
- +----+--------------+--------------+------------+
- | |id | INT(11) | |
- | |url | VARCHAR(255) | UNIQUE |
- | |imageable_id | INT(11) | UNIQUE |
- | |imageable_type| VARCHAR(55) | UNIQUE |
- | |created_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- | |updated_at | TIMESTAMP | | -> DEFAULT CURRENT_TIMESTAMP
- +----+--------------+--------------+------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement