syntax = "proto3";

package fms;

import "google/protobuf/wrappers.proto";

option csharp_namespace = "CMSMicroservice.Protobuf.Protos.FMS";

service FileInfoContract
{
    rpc CreateNewFileInfo(CreateNewFileInfoRequest) returns (CreateNewFileInfoResponse);
    rpc DeleteFileInfo(DeleteFileInfoRequest) returns (DeleteFileInfoResponse);
}

message CreateNewFileInfoRequest
{
    string directory = 1;
    bytes file = 2;
    string mime = 3;
    bool is_base64 = 4;
    google.protobuf.StringValue file_name = 5;
}

message CreateNewFileInfoResponse
{
    int64 id = 1;
    string file = 2;
}

message DeleteFileInfoRequest
{
    int64 id = 1;
}

message DeleteFileInfoResponse
{
    bool success = 1;
}
