59 lines
2.5 KiB
Protocol Buffer
59 lines
2.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package system;
|
|
|
|
import "aeus/rest.proto";
|
|
import "validate/validate.proto";
|
|
import "google/protobuf/descriptor.proto";
|
|
import "google/api/annotations.proto";
|
|
|
|
option go_package = "git.nobla.cn/golang/aeis-admin/pb;pb";
|
|
|
|
|
|
// Setting 参数设置表
|
|
message Setting {
|
|
option (aeus.rest) = {
|
|
table: "settings"
|
|
};
|
|
int64 id = 1 [(aeus.field) = {gorm:"primaryKey",comment:"ID"}];
|
|
int64 created_at = 2 [(aeus.field)={scenarios:"search;view;export",comment:"创建时间"}];
|
|
int64 updated_at = 3 [(aeus.field)={scenarios:"search;view;export",comment:"更新时间"}];
|
|
string name = 4 [(aeus.field)={gorm:"size:60",rule:"required",props:"readonly:update",comment: "配置项"},(validate.rules).string = {max_len: 20}];
|
|
string value = 5 [(aeus.field)={gorm:"size:512",rule:"required",format:"textarea",comment: "配置值"},(validate.rules).string = {max_len: 512}];
|
|
string description = 6 [(aeus.field)={gorm:"size:1024",format:"textarea",scenarios:"create;update;view;export",comment: "备注说明"},(validate.rules).string = {max_len: 1024}];
|
|
}
|
|
|
|
|
|
// Activity 活动记录
|
|
message Activity {
|
|
option (aeus.rest) = {
|
|
table: "activities"
|
|
};
|
|
int64 id = 1 [(aeus.field) = {gorm:"primaryKey",comment:"ID"}];
|
|
int64 created_at = 2 [(aeus.field)={scenarios:"search;search;view;export",comment:"创建时间"}];
|
|
string uid = 3 [(aeus.field)={gorm:"index;size:20",rule:"required",props:"readonly:update",format:"user",comment: "用户"},(validate.rules).string = {min_len: 5, max_len: 20}];
|
|
string action = 4 [(aeus.field)={props:"match:exactly",gorm:"index;size:20;not null;default:''",comment:"行为",enum:"create:新建#198754;update:更新#f09d00;delete:删除#e63757",scenarios:"search;list;create;update;view;export"}];
|
|
string module = 5 [(aeus.field)={gorm:"size:60;not null;default:''",comment:"模块",scenarios:"search;list;create;update;view;export"}];
|
|
string table = 6 [(aeus.field)={gorm:"size:60;not null;default:''",comment:"数据",scenarios:"list;create;update;view;export"}];
|
|
string data = 7 [(aeus.field)={gorm:"size:10240;not null;default:''",comment:"内容",scenarios:"list;create;update;view;export"}];
|
|
}
|
|
|
|
|
|
message SettingItem {
|
|
string name = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message GetSettingRequest{}
|
|
|
|
message GetSettingResponse{
|
|
repeated SettingItem data = 1;
|
|
}
|
|
|
|
service SettingService {
|
|
rpc GetSetting(GetSettingRequest) returns (GetSettingResponse) {
|
|
option (google.api.http) = {
|
|
get: "/system/setting"
|
|
};
|
|
}
|
|
} |