For example, suppose I have several tables {code ...} in the table, friendships contains the relationship between the following user and the followed user. retweet indicates the relationship between the forwarded tweet and the user, how can I implement the following requirements? My retweet needs to be displayed on the timeline of the person who follows me .... For example, suppose I have the following tables:
tweets id user_id text created_atretweets tweet_id user_id created_atusers id ...friendships ...
In the table, friendships contains the relationship between the following user and the followed user. retweet indicates the relationship between the forwarded tweet and the user. How can I implement the following requirements?
- My retweet needs to be displayed on the timeline of the person who follows me.
- In addition, the time order of this tweet on the timeline of the people who follow me needs to be sorted by the time point of my retweet, andNoThe original tweet time.
- Do not change the table design. For example, merge retweet and tweet and add a parent_id field.
Reply content:
For example, suppose I have the following tables:
tweets id user_id text created_atretweets tweet_id user_id created_atusers id ...friendships ...
In the table, friendships contains the relationship between the following user and the followed user. retweet indicates the relationship between the forwarded tweet and the user. How can I implement the following requirements?
- My retweet needs to be displayed on the timeline of the person who follows me.
- In addition, the time order of this tweet on the timeline of the people who follow me needs to be sorted by the time point of my retweet, andNoThe original tweet time.
- Do not change the table design. For example, merge retweet and tweet and add a parent_id field.