From ae71cd9e1d50fd782e5a3bd1d83cb4cd9c723f92 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Wed, 27 Jul 2022 06:46:12 +0000 Subject: [PATCH] client is changed --- src/models/core/network.rs | 12 +-- src/models/member.rs | 166 ++++++++++++++++++++----------------- 2 files changed, 97 insertions(+), 81 deletions(-) diff --git a/src/models/core/network.rs b/src/models/core/network.rs index 37b72aa..5c1cd47 100644 --- a/src/models/core/network.rs +++ b/src/models/core/network.rs @@ -1,11 +1,11 @@ use serde::{Deserialize, Serialize}; -#[derive(Clone, Serialize, Deserialize, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, ::prost::Message, Serialize, Deserialize)] pub struct Client { - #[prost(string, optional, tag = "1")] - pub site_url: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, tag = "2")] - pub client_id: u64, - #[prost(string, tag = "3")] + #[prost(string, tag = "1")] pub client_ip: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub site_url: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub access_token: ::core::option::Option<::prost::alloc::string::String>, } diff --git a/src/models/member.rs b/src/models/member.rs index 5705182..9ba7221 100644 --- a/src/models/member.rs +++ b/src/models/member.rs @@ -1,91 +1,107 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct MemberClass { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(message, optional, boxed, tag="2")] - pub parent: ::core::option::Option<::prost::alloc::boxed::Box>, - #[prost(string, tag="3")] - pub name: ::prost::alloc::string::String, - #[prost(uint64, tag="4")] - pub created_at: u64, - #[prost(uint64, tag="5")] - pub updated_at: u64, - #[prost(uint64, optional, tag="6")] - pub deleted_at: ::core::option::Option, + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, boxed, tag = "2")] + pub parent: ::core::option::Option<::prost::alloc::boxed::Box>, + #[prost(string, tag = "3")] + pub name: ::prost::alloc::string::String, + #[prost(uint64, tag = "4")] + pub created_at: u64, + #[prost(uint64, tag = "5")] + pub updated_at: u64, + #[prost(uint64, optional, tag = "6")] + pub deleted_at: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MemberLevel { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag="3")] - pub order: u32, - #[prost(uint64, tag="4")] - pub created_at: u64, - #[prost(uint64, tag="5")] - pub updated_at: u64, - #[prost(uint64, optional, tag="6")] - pub deleted_at: ::core::option::Option, + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag = "3")] + pub order: u32, + #[prost(uint64, tag = "4")] + pub created_at: u64, + #[prost(uint64, tag = "5")] + pub updated_at: u64, + #[prost(uint64, optional, tag = "6")] + pub deleted_at: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MemberSite { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub url: ::prost::alloc::string::String, - #[prost(uint64, tag="3")] - pub created_at: u64, - #[prost(uint64, tag="4")] - pub updated_at: u64, - #[prost(uint64, optional, tag="5")] - pub deleted_at: ::core::option::Option, + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub url: ::prost::alloc::string::String, + #[prost(uint64, tag = "3")] + pub created_at: u64, + #[prost(uint64, tag = "4")] + pub updated_at: u64, + #[prost(uint64, optional, tag = "5")] + pub deleted_at: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub domain_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="3")] - pub member_class: ::core::option::Option, - #[prost(message, optional, tag="4")] - pub member_level: ::core::option::Option, - #[prost(message, optional, tag="5")] - pub member_site: ::core::option::Option, - #[prost(message, optional, boxed, tag="6")] - pub referrer: ::core::option::Option<::prost::alloc::boxed::Box>, - #[prost(uint64, tag="7")] - pub referred_count: u64, - #[prost(string, tag="8")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag="9")] - pub nickname: ::prost::alloc::string::String, - #[prost(string, optional, tag="10")] - pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, - #[prost(enumeration="MemberState", tag="11")] - pub state: i32, - #[prost(uint64, optional, tag="12")] - pub state_changed_at: ::core::option::Option, - #[prost(string, optional, tag="13")] - pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, optional, tag="14")] - pub last_signined_at: ::core::option::Option, - #[prost(uint64, tag="15")] - pub created_at: u64, - #[prost(uint64, tag="16")] - pub updated_at: u64, - #[prost(uint64, optional, tag="17")] - pub deleted_at: ::core::option::Option, + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub domain_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub member_class: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub member_level: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub member_site: ::core::option::Option, + #[prost(message, optional, boxed, tag = "6")] + pub referrer: ::core::option::Option<::prost::alloc::boxed::Box>, + #[prost(uint64, tag = "7")] + pub referred_count: u64, + #[prost(string, tag = "8")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag = "9")] + pub nickname: ::prost::alloc::string::String, + #[prost(string, optional, tag = "10")] + pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration = "MemberState", tag = "11")] + pub state: i32, + #[prost(uint64, optional, tag = "12")] + pub state_changed_at: ::core::option::Option, + #[prost(string, optional, tag = "13")] + pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "14")] + pub last_signined_at: ::core::option::Option, + #[prost(uint64, tag = "15")] + pub created_at: u64, + #[prost(uint64, tag = "16")] + pub updated_at: u64, + #[prost(uint64, optional, tag = "17")] + pub deleted_at: ::core::option::Option, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum MemberState { - None = 0, - Normal = 1, - Pending = 2, - Withdrawal = 3, - Dormancy = 4, - Blacklist = 5, - Suspended = 6, + None = 0, + Normal = 1, + Pending = 2, + Withdrawal = 3, + Dormancy = 4, + Blacklist = 5, + Suspended = 6, +} + +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberSession { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub member: ::core::option::Option, + #[prost(string, tag = "3")] + pub data: ::prost::alloc::string::String, + #[prost(uint64, tag = "4")] + pub last_accessed_at: u64, + #[prost(uint64, tag = "5")] + pub expires_at: u64, + #[prost(uint64, tag = "6")] + pub created_at: u64, }