feat: add visibility feature to thoughts, including new enum, database migration, and update related endpoints and tests

This commit is contained in:
2025-09-06 17:42:50 +02:00
parent 0abd275946
commit 82c6de8da8
12 changed files with 307 additions and 17 deletions

View File

@@ -3,6 +3,8 @@ use utoipa::ToSchema;
use uuid::Uuid;
use validator::Validate;
use crate::domains::thought::Visibility;
#[derive(Deserialize, Validate, ToSchema)]
pub struct CreateThoughtParams {
#[validate(length(
@@ -11,6 +13,6 @@ pub struct CreateThoughtParams {
message = "Content must be between 1 and 128 characters"
))]
pub content: String,
pub visibility: Option<Visibility>,
pub reply_to_id: Option<Uuid>,
}