Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename dlr.proto to book.proto and Update Content #31

Open
Feyzanrs opened this issue Jul 10, 2024 · 0 comments · Fixed by #32
Open

Rename dlr.proto to book.proto and Update Content #31

Feyzanrs opened this issue Jul 10, 2024 · 0 comments · Fixed by #32
Assignees
Labels
Be medium priority Important issues to be addressed soon waiting topic Issue is waiting for a topic label

Comments

@Feyzanrs
Copy link
Member

Feyzanrs commented Jul 10, 2024

Following recent changes in our project, there is a need to rename dlr.proto to book.proto and update its contents. This modification spans a wide range, from service names to message types.

Old Structure:

  • Service Name: DlrSvc
  • Messages: Dlr, Dlrs, DlrFilter
  • Enums: DlrStatus, DlrType, DlrSortField

New Structure:

  • Service Name: BookSvc
  • Messages: Page, Pages, PageFilter
  • Enums: PageStatus, PageType, PageSortField

Files to update
op-be-shared\pkg\proto\model\dlr.proto

Updated file

syntax = "proto3";

option go_package = "github.com/octoposprime/op-be-shared/pkg/proto/pb/book";
import "google/protobuf/timestamp.proto";

service BookSvc {
    rpc GetPagesByFilter(PageFilter) returns (Pages) {}
    rpc CreatePage(Page) returns(Page)  {}
    rpc DeletePage(Page) returns (Page) {}
    rpc UpdatePageBase(Page) returns (Page) {}
    rpc UpdatePageCore(Page) returns (Page) {}
    rpc UpdatePageStatus(Page) returns (Page) {}
}

message Pages {
    repeated Page pages = 1;
    int64 totalRows = 2;
}

message Page {
    string id = 1;
    string pageData = 2;
    PageType pageType = 3;
    PageStatus pageStatus = 4;
    repeated string tags = 5;
    google.protobuf.Timestamp createdAt = 80;
    google.protobuf.Timestamp updatedAt = 81;

    string createdBy = 100;
    string updatedBy = 101;
    string deletedBy = 102;
}

message PageFilter {
    optional string id = 1;
    optional PageType pageType = 2;
    optional PageStatus pageStatus = 3;
    repeated string tags = 4;

    optional google.protobuf.Timestamp createdAtFrom = 80;
    optional google.protobuf.Timestamp createdAtTo = 81;
    optional google.protobuf.Timestamp updatedAtFrom = 82;
    optional google.protobuf.Timestamp updatedAtTo = 84;

    optional string searchText = 95;
    optional string sortType = 96;
    optional PageSortField sortField = 97;
    optional int32 limit = 98;
    optional int32 offset = 99;
}

enum PageStatus{
    PageStatusNONE = 0;
    PageStatusACTIVE = 1;
    PageStatusINACTIVE = 2;
}

enum PageType{
    PageTypeNONE = 0;
}

enum PageSortField{
    PageSortFieldNONE = 0;
    PageSortFieldId = 1;
    PageSortFieldCreatedAt = 2;
    PageSortFieldUpdatedAt = 3;
}
@octopos-prime octopos-prime added Be medium priority Important issues to be addressed soon waiting topic Issue is waiting for a topic label labels Jul 10, 2024
@Sddilora Sddilora self-assigned this Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Be medium priority Important issues to be addressed soon waiting topic Issue is waiting for a topic label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants