syntax = "proto3";
option go_package = "./pb";

package pb;

import "models/model_user_ticket_log.proto";
import "models/rpc_messages.proto";

// 工单日志服务
service UserTicketLogService {
	// 创建日志
	rpc createUserTicketLog(CreateUserTicketLogRequest) returns (CreateUserTicketLogResponse);

	// 删除日志
	rpc deleteUserTicketLog(DeleteUserTicketLogRequest) returns (RPCSuccess);

	// 查询日志数量
	rpc countUserTicketLogs(CountUserTicketLogsRequest) returns (RPCCountResponse);

	// 列出单页日志
	rpc listUserTicketLogs(ListUserTicketLogsRequest) returns (ListUserTicketLogsResponse);
}

// 创建日志
message CreateUserTicketLogRequest {
	int64 userTicketId = 1;
	string status = 2;
	string comment = 3;
}

message CreateUserTicketLogResponse {
	int64 userTicketLogId = 1;
}

// 删除日志
message DeleteUserTicketLogRequest {
	int64 userTicketLogId = 1;
}

// 查询日志数量
message CountUserTicketLogsRequest {
	int64 userTicketId = 1;
}

// 列出单页日志
message ListUserTicketLogsRequest {
	int64 userTicketId = 1;
	int64 offset = 2;
	int64 size = 3;
}

message ListUserTicketLogsResponse {
	repeated UserTicketLog userTicketLogs = 1;
}