Create relationship schemes

This commit is contained in:
Flori Weber 2023-06-18 19:04:55 +02:00
parent 0460a67bdd
commit 191dc34933
No known key found for this signature in database
GPG Key ID: 0ACD574FCF5226CF
1 changed files with 24 additions and 0 deletions

View File

@ -1 +1,25 @@
use serde::{Deserialize, Serialize};
use crate::types::RelationshipType;
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct FriendRequestSendSchema {
pub username: String,
pub discriminator: Option<String>,
}
/// Represents the schema for the Create User Relationship route.
/// # Arguments
///
/// * relationship_type: The [`RelationshipType`] to create (defaults to -1, which accepts an existing or creates a new friend request)
/// * from_friend_suggestion: Whether the relationship was created from a friend suggestion (default false)
/// * friend_token: The friend token of the user to add a direct friend relationship to
///
/// See: [https://discord-userdoccers.vercel.app/resources/user#create-user-relationship](https://discord-userdoccers.vercel.app/resources/user#create-user-relationship)
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct CreateUserRelationshipSchema {
#[serde(rename = "type")]
pub relationship_type: Option<RelationshipType>,
pub from_friend_suggestion: Option<bool>,
pub friend_token: Option<String>,
}