A
A
Andrey Gorbik2018-05-07 14:37:22
Database design
Andrey Gorbik, 2018-05-07 14:37:22

How to connect the Like, Topic, Comment entities so that both Topic and Comment can be likes?

- Like - one entity (without any TopicLike, CommentLike)
- Entities that can be liked can be added later
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2018-05-07
@and_gorbik

Well, what's the problem?
Link tablelikes

entity - Имя сущности
entity_id - id записи из соответствующей таблицы
user_id - id пользователя, поставившего лайк

or
entity - Имя сущности
entity_id - id записи из соответствующей таблицы
count - количество лайков

depends on conditions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question