Skip to content

Commit e754a2e

Browse files
committed
feat:add skl in salmon base
1 parent bb0490f commit e754a2e

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

campusapis/sklInfo/v1/skl.proto

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
syntax = "proto3";
2+
3+
package campusapis.sklInfo.v1;
4+
5+
import "campusapis/schoolTime/defined.proto";
6+
import "campusapis/staff/base.proto";
7+
import "google/api/annotations.proto";
8+
import "google/protobuf/empty.proto";
9+
import "protoc-gen-openapiv2/options/annotations.proto";
10+
11+
option go_package = "./campusapis/sklInfo/v1";
12+
13+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
14+
info: {
15+
title: "SklInfo API";
16+
version: "0.1";
17+
description: "SklInfo API";
18+
contact: {
19+
name: "hduhelp salmon base project";
20+
url: "https://github.com/hduhelp/salmon_api_base";
21+
22+
};
23+
license: {
24+
name: "BSD 3-Clause License";
25+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
26+
};
27+
};
28+
schemes: HTTPS;
29+
consumes: "application/json";
30+
produces: "application/json";
31+
};
32+
33+
34+
35+
36+
// Skl 数据库中的student_history_info表
37+
message SklStudentHistoryInfo {
38+
string StudentName = 1; // 学生姓名
39+
string UnitId = 2; // 学院ID
40+
//18,卓越学院
41+
//27,网络空间安全学院(浙江保密学院)
42+
//14,会计学院
43+
//06,自动化学院(人工智能学院)
44+
//15,经济学院
45+
//01,机械工程学院
46+
//07,理学院
47+
//03,管理学院
48+
//05,计算机学院(软件学院)
49+
//34,法学院
50+
//11,外国语学院
51+
//08,通信工程学院
52+
//33,人文艺术与数字媒体学院
53+
//20,材料与环境工程学院
54+
//12,人文与法学院
55+
//17,国际教育学院
56+
//28,人文艺术与数字媒体学院、法学院
57+
//22,数字媒体与艺术设计学院
58+
//32,圣光机联合学院
59+
//31,继续教育学院
60+
//04,电子信息学院(集成电路科学与工程学院)
61+
//19,生命信息与仪器工程学院
62+
string UnitName = 3; // 学院名称
63+
string MajorCode = 4; // 专业代码
64+
string Major = 5; // 专业名称
65+
string ClassNo = 6; // 班级
66+
string Grade = 7; // 年级
67+
string TeacherId = 8; // 辅导员工号
68+
string SchoolYear = 9; // 学年
69+
string Semester = 10; // 学期
70+
string StudentId = 11; // 学号
71+
}
72+
73+
service SklInfoService {
74+
// 获取某学院某年级的学生信息
75+
rpc GetSklUnitInfo(SklUnitInfoRequest) returns (SklUnitInfo) {
76+
option (google.api.http) = {
77+
get: "/v1/sklInfo/unitInfo"
78+
additional_bindings {
79+
get: "/sklInfo/unitInfo"
80+
}
81+
};
82+
}
83+
}
84+
85+
// 用于从Skl数据库中筛选某年级某学院的学生
86+
message SklUnitInfo {
87+
string UnitId = 1; // 学院ID
88+
string UnitName = 2; // 学院名称
89+
string Grade = 3; // 年级
90+
repeated string Teachers = 4; // 辅导员
91+
repeated string Students = 5; // 学生
92+
}
93+
94+
message SklUnitInfoRequest {
95+
string StaffId = 1; // 学/工号
96+
}
97+
98+
message SklUnitInfoResponse {
99+
int32 error = 1;
100+
string msg = 2;
101+
SklUnitInfo sklUnitInfo = 3;
102+
}
103+
104+
105+

0 commit comments

Comments
 (0)