syntax = "proto3";

package cuser;

option go_package = "gitlab.galaxy-immi.com/Backend-group/proto/pb/cuser";
option java_package = "com.cuser.pb";


// List 接口
message ListDocServerAppRequest {
    int32 id = 1[json_name="id"];// 业务id
    string application = 2[json_name="application"];// 密钥
    string name = 3[json_name="name"];// 名称
    string createdAt = 4[json_name="created_at"];// 创建时间
}

message DocServerAppItem {
    int32 id = 1[json_name="id"];// 业务id
    string application = 2[json_name="application"];// 密钥
    string name = 3[json_name="name"];// 名称
    optional string createdAt = 4[json_name="created_at"];// 创建时间
}

message ListDocServerAppResponse {
    int32 code = 1;
    string msg = 2;
    repeated DocServerAppItem data = 3;
}

// Del 接口
message DelDocServerAppRequest {
    int32 id = 3[json_name="id"]; // 业务id                
}

message DelDocServerAppResponse {
    int32 code = 1;
    string msg = 2;
    int32 id = 3[json_name="id"]; // 业务id                
}

// Add 接口
message AddDocServerAppRequest {
    int32 id = 1[json_name="id"];// 业务id
    string application = 2[json_name="application"];// 密钥
    string name = 3[json_name="name"];// 名称
    optional string createdAt = 4[json_name="created_at"];// 创建时间
}

message AddDocServerAppResponse {
    int32 code = 1;
    string msg = 2;
    int32 id = 3[json_name="id"]; // 业务id                
}

// Edit 接口
message EditDocServerAppRequest {
    int32 id = 1[json_name="id"];// 业务id
    string application = 2[json_name="application"];// 密钥
    string name = 3[json_name="name"];// 名称
    optional string createdAt = 4[json_name="created_at"];// 创建时间
}

message EditDocServerAppResponse {
    int32 code = 1;
    string msg = 2;
    int32 id = 3[json_name="id"];// 业务id     
}

// Detail 接口
message DetailDocServerAppRequest {  
    int32 id = 1[json_name="id"]; // 业务id   
}

message DetailDocServerAppResponse {
    int32 code = 1;
    string msg = 2;
    DocServerAppItem data = 3;
}