syntax = "proto3";

package at_jet.example;

// User message
message User {
  int32 id = 1;
  string name = 2;
  string email = 3;
  int64 created_at = 4;
}

// Create user request
message CreateUserRequest {
  string name = 1;
  string email = 2;
}

// Update user request
message UpdateUserRequest {
  int32 id = 1;
  optional string name = 2;
  optional string email = 3;
}

// List users request
message ListUsersRequest {
  int32 page = 1;
  int32 page_size = 2;
}

// List users response
message ListUsersResponse {
  repeated User users = 1;
  int32 total = 2;
  int32 page = 3;
  int32 page_size = 4;
}

// Delete user response
message DeleteUserResponse {
  bool success = 1;
  string message = 2;
}

// Empty message for requests/responses with no body
message Empty {}
