Archived
1
0
This repository has been archived on 2025-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
Dietrich fc9b18141f Working user and link list, (big)restructure
This is now a workspace consisting of:
  * the pslink app (a wasm frontend for the admin interface)
  * the pslink binary
  * shared - modules for communication between the two above.
2021-08-12 15:48:02 +02:00

32 lines
794 B
Rust

use enum_map::{Enum, EnumMap};
use serde::{Deserialize, Serialize};
use super::general::{Filter, Operation, Ordering};
/// A generic list returntype containing the User and a Vec containing e.g. Links or Users
#[derive(Clone, Deserialize, Serialize, Debug)]
pub struct LinkRequestForm {
pub filter: EnumMap<LinkOverviewColumns, Filter>,
pub order: Option<Operation<LinkOverviewColumns, Ordering>>,
pub amount: usize,
}
impl Default for LinkRequestForm {
fn default() -> Self {
Self {
filter: EnumMap::default(),
order: None,
amount: 20,
}
}
}
#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Eq, Hash, Enum)]
pub enum LinkOverviewColumns {
Code,
Description,
Target,
Author,
Statistics,
}