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 {
|
|
|
|
pub app_name_id: String,
|
|
|
|
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,
|
|
|
|
}
|