Skip to content

Commit

Permalink
added orderBy, search, total count
Browse files Browse the repository at this point in the history
  • Loading branch information
miqayelsrapionyan committed Sep 12, 2023
1 parent 2d09497 commit a2ab106
Show file tree
Hide file tree
Showing 11 changed files with 312 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/GPBMetadata/Proto/Translation.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions build/TranslationPackage/OrderBy.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 60 additions & 6 deletions build/TranslationPackage/TranslationItem.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions build/TranslationPackage/TranslationItems.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions build/TranslationPackage/TranslationQuery.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions proto/translation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ message TranslationQuery {
string resource_id = 3;
int32 page = 4;
int32 first = 5;
string key = 6;
OrderBy order_by = 7;
}

message TranslationItem {
Expand All @@ -22,10 +24,18 @@ message TranslationItem {
string language_code = 4;
string resource = 5;
string resource_id = 6;
string created_at = 7;
map<string, string> params = 8;
string editor = 7;
string created_at = 8;
string updated_at = 9;
map<string, string> params = 10;
}

message OrderBy {
string column = 1;
string order = 2;
}

message TranslationItems {
repeated TranslationItem items = 1;
int32 total = 2;
}
11 changes: 11 additions & 0 deletions src/Enums/ColumnEnum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

namespace Uc\TranslationAppSdk\Enums;

enum ColumnEnum: string
{
case KEY = 'key';
case CREATED_AT = 'created_at';
}
11 changes: 11 additions & 0 deletions src/Enums/OrderByEnum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

namespace Uc\TranslationAppSdk\Enums;

enum OrderByEnum: string
{
case ASC = 'asc';
case DESC = 'desc';
}
Loading

0 comments on commit a2ab106

Please sign in to comment.