mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Add survey posts support
This commit is contained in:
@ -20,4 +20,5 @@ pub mod global_search_result;
|
||||
pub mod friend;
|
||||
pub mod friendship_status;
|
||||
pub mod post;
|
||||
pub mod movie;
|
||||
pub mod movie;
|
||||
pub mod survey;
|
23
src/data/survey.rs
Normal file
23
src/data/survey.rs
Normal file
@ -0,0 +1,23 @@
|
||||
//! # Survey
|
||||
//!
|
||||
//! This structure contains all the information about a survey
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
use crate::data::user::UserID;
|
||||
|
||||
pub struct SurveyChoice {
|
||||
pub id: u64,
|
||||
pub name: String,
|
||||
pub count: u64,
|
||||
}
|
||||
|
||||
pub struct Survey {
|
||||
pub id: u64,
|
||||
pub user_id: UserID,
|
||||
pub time_create: u64,
|
||||
pub post_id: u64,
|
||||
pub question: String,
|
||||
pub choices: Vec<SurveyChoice>,
|
||||
pub allow_new_choices: bool,
|
||||
}
|
Reference in New Issue
Block a user