80 lines
2.9 KiB
Plaintext
80 lines
2.9 KiB
Plaintext
################## SHOULD I SPLIT FOLLOW INTO 2 TABLES ?? ################################
|
|
|
|
we can put following and follower as 1 table instead of 2 table
|
|
(follower and following) but it's gonna be have multiple where clause when
|
|
querying instead, we can use less where clause query if we split it into two
|
|
tables, but idk how big is the performance difference is, so for right now
|
|
i'm just put it on single table, if the query speed diff noticeable we can
|
|
just remigrate it later
|
|
|
|
REF: - https://www.percona.com/blog/how-expensive-is-a-where-clause-in-mysql/
|
|
- https://stackoverflow.com/questions/58829268/does-using-where-clause-with-a-select-statement-increase-or-decrease-performance
|
|
|
|
|
|
##########################################################################################
|
|
|
|
|
|
|
|
######################### IMPLEMENT POLYMORPHIC RELATIONS ################################
|
|
|
|
ok idk how to implement polymorphic (without ORM ofc) because Rails have
|
|
the thing the polymorphic thing but imma just create a table with 1 column
|
|
"type" just polymorphic relation table so when i query it imma use "where"
|
|
clause.
|
|
ex: select message where commented_id = ... and where comment_type = (stories, ratings, locations)
|
|
|
|
##########################################################################################
|
|
|
|
|
|
|
|
####################### INDONESIA ADMINISTRATIVE DIVISION ################################
|
|
|
|
https://en.wikipedia.org/wiki/Provinces_of_Indonesia
|
|
|
|
|
|
##########################################################################################
|
|
|
|
|
|
|
|
######################### CUSTOM GIN VALIDATION ERR MESSAGE ##############################
|
|
|
|
make custom err message, and get all the type, the err message sucks now
|
|
https://github.com/gin-gonic/gin/issues/430 (using middleware)
|
|
tbh i'd raher use like a wrapper instead of middleware but we'll see
|
|
|
|
|
|
##########################################################################################
|
|
|
|
|
|
##########################################################################################
|
|
|
|
WITHOUT aUTHORIZATION ->
|
|
- AUTH
|
|
- GET LOCATIONS
|
|
- POST,PATCH,GET COMMENTS
|
|
- GET REVIEWS
|
|
- POST, REVIEWS ?
|
|
|
|
THE REST SHOUDL HAVE AUTHORIVAOZOIANITON
|
|
|
|
|
|
##########################################################################################
|
|
|
|
|
|
##########################################################################################
|
|
|
|
https://github.com/discourse/discourse
|
|
USE THIS FOR DISCSUSSSINON
|
|
|
|
|
|
##########################################################################################
|
|
|
|
|
|
##########################################################################################
|
|
|
|
OK FOR THE RATINGS IMMA USE THAT FLOW FIRST LIKE JOINING THE LOCAITONS AND REVIEWS
|
|
CALCULATE ALL THE RATINGS SHIT,
|
|
AFTER I FINISHED THE WHOLE THING IMMA TRY TO COMPARE IF EACH LOCATIONS HAVE user_ratings
|
|
user_counts etc etc
|
|
|
|
########################################################################################## |