syntax = "proto3";

// 场景03：import 子目录下的 proto
// 预期：goctl 应同时生成 common/types.pb.go 和 order.pb.go
package ordersvc;

option go_package = "example.com/demo/s03_import_subdir/pb";

import "common/types.proto";

message OrderItem {
  string id    = 1;
  string name  = 2;
  double price = 3;
}

message ListOrdersReq {
  common.PageInfo page = 1;
  common.SortInfo sort = 2;
}

message ListOrdersReply {
  repeated OrderItem orders = 1;
}

message GetOrderReq {
  string id = 1;
}

message GetOrderReply {
  OrderItem order = 1;
}

service OrderService {
  rpc ListOrders(ListOrdersReq) returns (ListOrdersReply);
  rpc GetOrder(GetOrderReq)     returns (GetOrderReply);
}
