- F201: Commentaires avec timestamp cliquable, modération mots-clés - F202: Likes privés (compteur visible créateur uniquement) - F203: Reposts de tracks sur le profil, bouton Repost, onglet Reposts - F204: Notifications (commentaire, repost), pas de gamification Backend: migrations 127/128, comment_moderation_service, track_repost_service, GetTrackLikes/GetTrack masquent like_count pour non-créateurs Frontend: LikeButton isCreator, RepostButton, Reposts tab profil, timestamp seek
18 lines
757 B
SQL
18 lines
757 B
SQL
-- 127_moderation_keywords.sql
|
|
-- v0.10.3 F201: Modération déterministe des commentaires par mots-clés (pas de ML)
|
|
|
|
CREATE TABLE IF NOT EXISTS public.moderation_keywords (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
word VARCHAR(50) NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
UNIQUE(word)
|
|
);
|
|
|
|
CREATE INDEX idx_moderation_keywords_word ON public.moderation_keywords(LOWER(word));
|
|
|
|
-- Seed initial minimal (spam, insultes basiques, langues FR/EN)
|
|
INSERT INTO public.moderation_keywords (word) VALUES
|
|
('spam'), ('scam'), ('virus'), ('free money'), ('click here'),
|
|
('casino'), ('lottery'), ('winner'), ('nigerian'), ('pharma'),
|
|
('viagra'), ('crypto'), ('bitcoin'), ('nft'), ('mlm')
|
|
ON CONFLICT (word) DO NOTHING;
|