1
0
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:
2020-07-04 16:44:42 +02:00
parent 1e956cdcb5
commit 8d5013b00a
12 changed files with 237 additions and 13 deletions

View File

@ -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
View 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,
}