osma-server/src/types.rs

55 lines
1 KiB
Rust
Raw Normal View History

2022-07-26 20:14:23 +03:00
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct App {
id: String,
name: String,
description: String,
version: String,
platform: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct User {
pub name: String,
pub password: String,
pub email: String,
}
2022-07-26 20:30:45 +03:00
#[derive(Debug, Serialize, Deserialize)]
pub struct UserAuth {
pub name: String,
pub password: String,
}
#[derive(Debug, Serialize, Deserialize)]
2022-07-26 20:29:27 +03:00
pub struct JwtInfo {
pub name: String,
pub role: String,
pub exp: i64,
}
2022-07-26 20:35:08 +03:00
#[derive(Debug, Serialize, Deserialize)]
pub struct UserData {
pub email: String,
pub img: String,
}
2022-07-26 20:38:06 +03:00
#[derive(Debug, Serialize, Deserialize)]
pub struct ReviewData {
2022-07-28 12:23:10 +03:00
pub app_id: String,
2022-07-26 20:38:06 +03:00
pub score: i32,
pub text: String,
}
2022-07-26 20:36:40 +03:00
#[derive(Debug, Serialize, Deserialize)]
pub struct PasswordsInf {
pub old_password: String,
pub new_password: String,
}
2022-07-27 13:28:58 +03:00
#[derive(Debug, Serialize, Deserialize)]
pub struct AppInfo {
2022-07-28 12:23:10 +03:00
pub app_id: String,
2022-07-27 13:28:58 +03:00
}