syntax = "proto3";

option go_package ="./pb";

package pb;

// ------------------------------------ 
// Messages
// ------------------------------------ 

//--------------------------------userVerifications--------------------------------
message UserVerifications {
  int64 id = 1; //id
  int64 userId = 2; //userId
  string role = 3; //role
  string status = 4; //status
  string materials = 5; //materials
  string rejectReason = 6; //rejectReason
  int64 reviewedBy = 7; //reviewedBy
  int64 reviewedAt = 8; //reviewedAt
  int64 createdAt = 9; //createdAt
  int64 updatedAt = 10; //updatedAt
}

message AddUserVerificationsReq {
  int64 userId = 1; //userId
  string role = 2; //role
  string status = 3; //status
  string materials = 4; //materials
  string rejectReason = 5; //rejectReason
  int64 reviewedBy = 6; //reviewedBy
  int64 reviewedAt = 7; //reviewedAt
  int64 createdAt = 8; //createdAt
  int64 updatedAt = 9; //updatedAt
}

message AddUserVerificationsResp {
}

message UpdateUserVerificationsReq {
  int64 id = 1; //id
  optional int64 userId = 2; //userId
  optional string role = 3; //role
  optional string status = 4; //status
  optional string materials = 5; //materials
  optional string rejectReason = 6; //rejectReason
  int64 reviewedBy = 7; //reviewedBy
  int64 reviewedAt = 8; //reviewedAt
  int64 createdAt = 9; //createdAt
  int64 updatedAt = 10; //updatedAt
}

message UpdateUserVerificationsResp {
}

message DelUserVerificationsReq {
  int64 id = 1; //id
}

message DelUserVerificationsResp {
}

message GetUserVerificationsByIdReq {
  int64 id = 1; //id
}

message GetUserVerificationsByIdResp {
  UserVerifications userVerifications = 1; //userVerifications
}

message SearchUserVerificationsReq {
  int64 offset = 1; //offset
  int64 limit = 2; //limit
  int64 id = 3; //id
  int64 userId = 4; //userId
  string role = 5; //role
  string status = 6; //status
  string materials = 7; //materials
  string rejectReason = 8; //rejectReason
  int64 reviewedBy = 9; //reviewedBy
  int64 reviewedAt = 10; //reviewedAt
  int64 createdAt = 11; //createdAt
  int64 updatedAt = 12; //updatedAt
}

message SearchUserVerificationsResp {
  repeated UserVerifications userVerifications = 1; //userVerifications
}

message AddOrUpdateUserVerificationsReq {
  int64 userId = 1; // userId
  string role = 2;
  string material = 3; // material
}

message AddOrUpdateUserVerificationsResp {
  bool success = 1; // success
}

message ListUserVerificationsByUserIdReq {
  int64 userId = 1; // userId
}

message ListUserVerificationsByUserIdResp {
  repeated UserVerifications userVerifications = 1; // userVerifications
}


// ------------------------------------ 
// Rpc Func
// ------------------------------------ 

service user_verifications{ 

	 //-----------------------userVerifications----------------------- 
	 rpc AddUserVerifications(AddUserVerificationsReq) returns (AddUserVerificationsResp); 
	 rpc UpdateUserVerifications(UpdateUserVerificationsReq) returns (UpdateUserVerificationsResp); 
	 rpc DelUserVerifications(DelUserVerificationsReq) returns (DelUserVerificationsResp); 
	 rpc GetUserVerificationsById(GetUserVerificationsByIdReq) returns (GetUserVerificationsByIdResp); 
	 rpc SearchUserVerifications(SearchUserVerificationsReq) returns (SearchUserVerificationsResp);

   rpc AddOrUpdateUserVerifications(AddOrUpdateUserVerificationsReq) returns (AddOrUpdateUserVerificationsResp);
   rpc ListUserVerificationsByUserId(ListUserVerificationsByUserIdReq) returns (ListUserVerificationsByUserIdResp);
}
