refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,74 @@
syntax = "proto3";
package mall;
option go_package = ".;mall";
import "blocks.proto";
// Store(店铺)微服务-工作人员
service Staff {
// 登录
rpc Login(LoginRequest) returns (LoginReply) {}
// 获取工作人员列表
rpc Fetch(FetchRequest) returns (StaffListReply) {}
// 创建工作人员
rpc Create(StaffItem) returns (StatusReply) {}
// 删除工作人员
rpc Delete(IdentRequest) returns (StatusReply) {}
// 获取个人信息
rpc GetProfile(IdentRequest) returns (StaffItem) {}
// 设置个人信息
rpc SetProfile(StaffItem) returns (StatusReply) {}
// 设置账号密码
rpc SetPassword(SetAccountRequest) returns (StatusReply) {}
}
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为正常
string avatar = 11; // 头像
string created_at = 12 [json_name="created_at"];
}
message StaffListReply {
repeated StaffItem data = 1;
int64 count = 2;
}