Files
nahodka-back/src/main/java/com/krylov/refound/dto/ChatPostDto.java
SlimusMinus e02f8cdb6b Add anti-fraud verification questions and scam warnings
- posts can carry up to 3 verification questions (post_verification_questions,
  changelog 026); to contact the author one answers them first
- POST /api/v1/posts/{id}/claim creates a PENDING chat with the answers as a
  CLAIM message; the claimant cannot write or see the phone until the author
  approves via POST /api/v1/chats/{chatId}/verification
- plain first message to such a post and phone reveal return 403
  VERIFICATION_REQUIRED; GET /api/v1/chats/{chatId} exposes the status
- FraudSignals flags prepayment, card data (Luhn) and SMS-code requests in
  messages (MessageDto.fraudSignal); ChatDto.otherUserCreatedAt for new accounts
- claim limits: 5 per day per account, 2 per post per 30 days, 10/h per IP
- docs/anti-fraud.md, tests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 01:04:31 +03:00

24 lines
918 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.krylov.refound.dto;
import com.krylov.refound.enums.PostStatus;
import com.krylov.refound.enums.PostType;
import java.util.List;
import lombok.Data;
/**
* Краткая информация об объявлении для списка чатов: достаточно, чтобы отличить
* чаты по похожим объявлениям (тип, город, закрыто ли). Полное объявление
* фронт догружает по клику через GET /api/v1/posts/{id}.
*/
@Data
public class ChatPostDto {
private Long id;
private String title;
private List<String> images;
private PostType type;
private PostStatus status;
private String city;
/** Автор разрешил показ номера: после подтверждения ответов чат предлагает его открыть. */
private boolean phoneVisible;
}