You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
610 B
38 lines
610 B
use super::*;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct OpenPost
|
|
{
|
|
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct ClosedPost
|
|
{
|
|
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub enum PostKind
|
|
{
|
|
Open(OpenPost),
|
|
Closed(ClosedPost),
|
|
}
|
|
|
|
/// A post
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct Post
|
|
{
|
|
owner: user::UserID,
|
|
kind: PostKind
|
|
}
|
|
|
|
impl Post
|
|
{
|
|
/// The ID of the owning user & session of this post.
|
|
pub fn owner(&self) -> &user::UserID
|
|
{
|
|
&self.owner
|
|
}
|
|
}
|