feat: add visibility feature to thoughts, including new enum, database migration, and update related endpoints and tests
This commit is contained in:
@@ -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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user