observation.proto 2.14 KB
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
syntax = "proto3";

package dfs.facility.observation;
option go_package = "cnlab.net/csst/proto/facility/observation";
import "common/error.proto";

service ObservationSrv {
        rpc Find(FindObservationReq) returns (FindObservationResp) {}
        rpc Get(GetObservationReq) returns (GetObservationResp) {}
        rpc Write(WriteObservationReq) returns (WriteObservationResp) {}
        rpc UpdateQc0Status(UpdateQc0StatusReq) returns (UpdateQc0StatusResp) {}
        rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message Observation {
        int64 id = 1;
        string obs_id = 2;
        string obs_time = 3;
        float exp_time = 4;
        string module_id = 5;
        string obs_type = 6;
        int64 facility_status_id = 7;
        int64 module_status_id = 8;
        int32 qc0_status = 9;
        string qc0_time = 10;
        int32 prc_status = 11;
        string prc_time = 12;
        string create_time = 13;
        int32 import_status = 14;
}

message FindObservationReq {
        string module_id = 1;
        string obs_type = 2;
        string exp_time_start = 3;
        string exp_time_end = 4;
        int32 qc0_status = 5;
        int32 prc_status = 6;
        int32 limit = 7;
        map<string,string> other_conditions = 8;
}

message FindObservationResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated Observation records = 4;
}

message GetObservationReq {
        int64 id = 1;
        string obs_id = 2;
}

message GetObservationResp {
        Observation observation = 1;
}

message WriteObservationReq {
        Observation record = 1;
}

message WriteObservationResp {
        bool success = 1;
        common.Error error = 2;
        Observation record = 3;
}

message UpdateQc0StatusReq {
        int64 id = 1;
        string obs_id = 2;
        int32 status = 3;
}

message UpdateQc0StatusResp {
        bool success = 1;
        common.Error error = 2;
}
message UpdateProcStatusReq {
        int64 id = 1;
        string obs_id = 2;
        int32 status = 3;
}

message UpdateProcStatusResp {
        bool success = 1;
        common.Error error = 2;
}