♻️ I have no idea what I have done

This commit is contained in:
2025-07-15 01:54:27 +08:00
parent a03b8d1cac
commit 3c11c4f3be
35 changed files with 1761 additions and 930 deletions

View File

@@ -86,4 +86,19 @@ public abstract class GrpcTypeHelper
_ => JsonConvert.DeserializeObject(JsonConvert.SerializeObject(value, SerializerSettings))
};
}
public static Value ConvertObjectToValue(object? obj)
{
return obj switch
{
string s => Value.ForString(s),
int i => Value.ForNumber(i),
long l => Value.ForNumber(l),
float f => Value.ForNumber(f),
double d => Value.ForNumber(d),
bool b => Value.ForBool(b),
null => Value.ForNull(),
_ => Value.ForString(JsonConvert.SerializeObject(obj, SerializerSettings)) // fallback to JSON string
};
}
}

View File

@@ -159,7 +159,7 @@ message Relationship {
string related_id = 2;
optional Account account = 3;
optional Account related = 4;
int32 type = 5;
int32 status = 5;
google.protobuf.Timestamp created_at = 6;
google.protobuf.Timestamp updated_at = 7;
}
@@ -218,8 +218,8 @@ service AccountService {
rpc GetRelationship(GetRelationshipRequest) returns (GetRelationshipResponse) {}
rpc HasRelationship(GetRelationshipRequest) returns (google.protobuf.BoolValue) {}
rpc ListFriends(ListUserRelationshipSimpleRequest) returns (ListUserRelationshipSimpleResponse) {}
rpc ListBlocked(ListUserRelationshipSimpleRequest) returns (ListUserRelationshipSimpleResponse) {}
rpc ListFriends(ListRelationshipSimpleRequest) returns (ListRelationshipSimpleResponse) {}
rpc ListBlocked(ListRelationshipSimpleRequest) returns (ListRelationshipSimpleResponse) {}
}
// ActionLogService provides operations for action logs
@@ -396,10 +396,10 @@ message GetRelationshipResponse {
optional Relationship relationship = 1;
}
message ListUserRelationshipSimpleRequest {
message ListRelationshipSimpleRequest {
string account_id = 1;
}
message ListUserRelationshipSimpleResponse {
message ListRelationshipSimpleResponse {
repeated string accounts_id = 1;
}