syntax = "proto3"; //版本声明,使用v3版本 package fsservice; option go_package = "gitee.com/fusenpack/fusen-service;service"; // 导入google/api/annotations.proto 注释依赖 import "google/api/annotations.proto"; import "service/basic.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/any.proto"; //定义服务 service info { // 用户信息 rpc UserInfo(UserInfoRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/user" body: "*" }; } // 用户个人资料查询 rpc UserProfile(QueryProfileRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/user/profile" body: "*" }; } // 获取默认用户个人资料 rpc DefaultUserProfile(DefaultProfileRequest) returns (basic.Response) { option (google.api.http) = { get: "/api/info/user/profile/default/{request}" }; } // 更新用户个人资料 rpc UpdateProfileBase(ProfileRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/user/profile/base/update" body: "*" }; } // 设置默认地址 rpc AddressDefault(AddressDefaultRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/address/default" body: "*" }; } // 添加地址 rpc AddressAdd(AddressRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/address/add" body: "*" }; } // 更新地址 rpc AddressUpdate(AddressRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/address/update" body: "*" }; } // 更新地址使用状态 rpc AddressUsedUpdate(AddressIdRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/address/update/used" body: "*" }; } // 删除地址 rpc AddressDelete(AddressIdRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/address/delete" body: "*" }; } // 获取地址列表 rpc AddressList(basic.Request) returns (basic.Response) { option (google.api.http) = { get: "/api/info/address/list" }; } // 获取餐厅列表 rpc RestaurantList(basic.Request) returns (basic.Response) { option (google.api.http) = { get: "/api/info/restaurant/list" }; } // 搜索建议 rpc PreLogoSearchSuggestions(PreLogoSearchSuggestionsRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/prelogo/search/suggestions" body: "*" }; } // 搜索 rpc PreLogoSearch(PreLogoSearchRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/prelogo/search" body: "*" }; } // 联系我们 rpc ContactUs(ContactUsRequest) returns (basic.Response) { option (google.api.http) = { post: "/api/info/contact/us" body: "*" }; } } message UserInfoRequest { repeated string module = 1; // 模块 } message QueryProfileRequest { string top_key = 1; // 首键 } message QueryProfileResponse { google.protobuf.Struct data = 1; } message DefaultProfileRequest { string request = 1; // 请求 } message ProfileRequest { ProfileBase base = 1; // 基础个人资料 SubscriptionStatus sub_status = 2; // 订阅状态 } message ProfileBase { optional string first_name = 1; // 名字 optional string last_name = 2; // 姓氏 optional string email = 4; // 电子邮件 optional string mobile = 5; // 手机号码 optional string resetaurant = 6; // 餐厅 optional string company = 7; // 公司 } message SubscriptionStatus { NotificationEmail notification_email = 1; // 邮件通知设置 NotificationPhone notification_phone = 2; // 电话通知设置 } message NotificationEmail { bool order_update = 1; // 订单更新 bool newseleter = 2; // 新闻订阅 } message NotificationPhone { bool order_update = 1; // 订单更新 bool newseleter = 2; // 新闻订阅 } message AddressObjectRequest { int64 address_id = 1; // 地址ID string address_name = 2; // 地址名称 } message AddressIdRequest { int64 address_id = 1; // 地址ID } message AddressDefaultRequest { int64 address_id = 1; // 地址ID int64 is_default = 2; // 是否默认 } message AddressRequest { int64 address_id = 1; // 地址ID(已弃用) int64 is_default = 2; // 是否默认 string first_name = 3; // 名字 string last_name = 4; // 姓氏 string mobile = 5; // 手机号码 string zip_code = 6; // 邮政编码 string street = 7; // 街道 string suite = 8; // 套房 string city = 9; // 城市 string state = 10; // 省份 } message PreLogoSearchSuggestionsRequest { string keywords = 1; // 关键字 } message PreLogoSearchRequest { string zip_code = 1; // 邮编 string keywords = 2; // 关键字 } message ContactUsRequest { string name = 1; // 姓名 string email = 2; // 电子邮件 string phone = 3; // 电话号码 string message = 4; // 消息内容 }