syntax = "proto3";
import "view.proto";

message App {
    string id = 1;
    string workspace_id = 2;
    string name = 3;
    string desc = 4;
    RepeatedView belongings = 5;
    int64 version = 6;
    int64 modified_time = 7;
    int64 create_time = 8;
}
message RepeatedApp {
    repeated App items = 1;
}
message CreateAppPayload {
    string workspace_id = 1;
    string name = 2;
    string desc = 3;
    ColorStyle color_style = 4;
}
message ColorStyle {
    string theme_color = 1;
}
message CreateAppParams {
    string workspace_id = 1;
    string name = 2;
    string desc = 3;
    ColorStyle color_style = 4;
}
message AppId {
    string value = 1;
}
message UpdateAppPayload {
    string app_id = 1;
    oneof one_of_name { string name = 2; };
    oneof one_of_desc { string desc = 3; };
    oneof one_of_color_style { ColorStyle color_style = 4; };
    oneof one_of_is_trash { bool is_trash = 5; };
}
message UpdateAppParams {
    string app_id = 1;
    oneof one_of_name { string name = 2; };
    oneof one_of_desc { string desc = 3; };
    oneof one_of_color_style { ColorStyle color_style = 4; };
    oneof one_of_is_trash { bool is_trash = 5; };
}
