2026-08-09 10:43:45 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
package mall;
|
2026-08-09 15:10:19 +08:00
|
|
|
|
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
2026-08-09 20:14:57 +08:00
|
|
|
|
import "module/ec/mall/proto/const.proto";
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// Store(店铺)微服务-工作人员
|
|
|
|
|
|
service Staff {
|
|
|
|
|
|
// 登录
|
|
|
|
|
|
rpc Login(LoginRequest) returns (LoginReply) {}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取工作人员列表
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc Fetch(blocks.MallFetchRequest) returns (StaffListReply) {}
|
|
|
|
|
|
|
2026-08-09 10:43:45 +08:00
|
|
|
|
// 创建工作人员
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc Create(StaffItem) returns (blocks.IdentityStatusReply) {}
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 删除工作人员
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {}
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 获取个人信息
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc GetProfile(blocks.IdentRequest) returns (StaffItem) {}
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 设置个人信息
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc SetProfile(StaffItem) returns (blocks.IdentityStatusReply) {}
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 设置账号密码
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc SetPassword(SetAccountRequest) returns (blocks.IdentityStatusReply) {}
|
2026-08-09 10:43:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message LoginRequest {
|
|
|
|
|
|
string account = 1;
|
|
|
|
|
|
string password = 2;
|
|
|
|
|
|
string phone = 3;
|
|
|
|
|
|
string verify_code = 4 [json_name="verify_code"];
|
|
|
|
|
|
int32 login_genre = 5 [json_name="login_genre"]; // 登陆类型: 1 账密; 2 手机验证码
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message LoginReply {
|
|
|
|
|
|
string token = 1; // token 授权码
|
|
|
|
|
|
string identity = 2; // 唯一标识
|
|
|
|
|
|
string store_identity = 3 [json_name="store_identity"]; // 店铺唯一标识
|
|
|
|
|
|
string name = 4; // 姓名
|
|
|
|
|
|
string account = 5; // 账号
|
|
|
|
|
|
string role = 6; // 角色
|
|
|
|
|
|
int32 status = 7; // 状态
|
|
|
|
|
|
string created_at = 8 [json_name="created_at"]; // 创建时间
|
|
|
|
|
|
string store_name = 9 [json_name="store_name"]; // 店铺名称
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SetAccountRequest {
|
|
|
|
|
|
string account = 1; // 账号
|
|
|
|
|
|
string password = 2; // 密码
|
|
|
|
|
|
string password_confirmed = 3 [json_name="password_confirmed"]; // 确认密码
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message StaffItem {
|
|
|
|
|
|
int64 id = 1; // id
|
|
|
|
|
|
string identity = 2; // 唯一标识
|
|
|
|
|
|
string name = 3; // 姓名
|
|
|
|
|
|
string account = 4; // 账号
|
|
|
|
|
|
string password =5; // 密码
|
|
|
|
|
|
string profile = 6; // 简介
|
|
|
|
|
|
string role =7; // 角色
|
|
|
|
|
|
string phone = 8; // 手机号
|
|
|
|
|
|
string email = 9; // 邮箱
|
|
|
|
|
|
int32 status = 10; // 状态:默认为0,-1禁止,1为正常
|
2026-08-09 15:10:19 +08:00
|
|
|
|
string avatar = 11; // 头像
|
2026-08-09 10:43:45 +08:00
|
|
|
|
string created_at = 12 [json_name="created_at"];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message StaffListReply {
|
|
|
|
|
|
repeated StaffItem data = 1;
|
|
|
|
|
|
int64 count = 2;
|
|
|
|
|
|
}
|