syntax = "proto3";

package master.v1;

// Path should be relative to the module root.
// The package name is specified after the semicolon.
option go_package = "internal/infrastructure/transport/grpc/gen/master/role/master/v1;masterV1";

import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";

// Service definition for RoleAccessRolMaster.
service RoleAccessRolMasterService {
  // Get a single RoleAccessRolMaster by its ID.
  rpc GetRoleAccessRolMaster(GetRoleAccessRolMasterRequest) returns (RoleAccessRolMasterResponse);

  // Get a list of RoleAccessRolMasters with pagination and filtering.
  rpc ListRoleAccessRolMasters(ListRoleAccessRolMastersRequest) returns (ListRoleAccessRolMastersResponse);

  // Create a new RoleAccessRolMaster.
  rpc CreateRoleAccessRolMaster(CreateRoleAccessRolMasterRequest) returns (RoleAccessRolMasterResponse);

  // Update an existing RoleAccessRolMaster.
  rpc UpdateRoleAccessRolMaster(UpdateRoleAccessRolMasterRequest) returns (RoleAccessRolMasterResponse);

  // Delete a RoleAccessRolMaster by its ID.
  rpc DeleteRoleAccessRolMaster(DeleteRoleAccessRolMasterRequest) returns (google.protobuf.Empty);
}

// The main message representing a RoleAccessRolMaster.
message RoleAccessRolMaster {
  string id = 1;
  optional string name = 2;
  optional bool active = 3;
  optional google.protobuf.Timestamp created_at = 4;
  optional google.protobuf.Timestamp updated_at = 5;
  optional string s_e_l_e_c_t = 6;
}

// --- Request/Response Messages ---

message GetRoleAccessRolMasterRequest {
  int64 id = 1;
}

message RoleAccessRolMasterResponse {
  RoleAccessRolMaster data = 1;
}

message ListRoleAccessRolMastersRequest {
  int32 page = 1;
  int32 page_size = 2;
  // Add filter fields here if needed
}

message ListRoleAccessRolMastersResponse {
  repeated RoleAccessRolMaster data = 1;
  int64 total_items = 2;
}

message CreateRoleAccessRolMasterRequest {
  string id = 1;
  string name = 2;
  bool active = 3;
  google.protobuf.Timestamp created_at = 4;
  google.protobuf.Timestamp updated_at = 5;
  string s_e_l_e_c_t = 6;
}

message UpdateRoleAccessRolMasterRequest {
  int64 id = 1;
  optional string id = 2;
  optional string name = 3;
  optional bool active = 4;
  optional google.protobuf.Timestamp created_at = 5;
  optional google.protobuf.Timestamp updated_at = 6;
  optional string s_e_l_e_c_t = 7;
}

message DeleteRoleAccessRolMasterRequest {
  int64 id = 1;
}
