mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
Implement Genre Management with CRUD Operations
- Add `Genre` entity with JPA annotations and database mapping. - Create repository, service, and delegate handlers for Genre CRUD operations. - Register handlers (`create_genre`, `get_genres`, `get_genre_by_id`, `update_genre`, `delete_genre`) in `DelegateActionManager`. - Introduce Protobuf definitions for Genre messages. - Update `DatabaseManager` to expose `EntityManager`. - Enhance `DelegateActionManager` constructor to use `EntityManager` for handler initialization.
This commit is contained in:
parent
ba53d4d8c4
commit
7b61b2071e
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option java_package = "com.mediamanager.protocol.messages";
|
||||
option java_outer_classname = "GenreMessages";
|
||||
|
||||
package mediamanager.messages;
|
||||
|
||||
message Genre {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message CreateGenreRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message CreateGenreResponse {
|
||||
Genre genre = 1;
|
||||
}
|
||||
|
||||
message GetGenresRequest {
|
||||
|
||||
}
|
||||
|
||||
message GetGenresResponse {
|
||||
repeated Genre genres = 1;
|
||||
}
|
||||
|
||||
message GetGenreByIdRequest {
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message GetGenreByIdResponse {
|
||||
Genre genre = 1;
|
||||
}
|
||||
|
||||
message UpdateGenreRequest {
|
||||
int32 id = 1;
|
||||
string name = 2; // Novo nome
|
||||
}
|
||||
|
||||
message UpdateGenreResponse {
|
||||
Genre genre = 1; // Genre atualizado
|
||||
}
|
||||
|
||||
message DeleteGenreRequest {
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteGenreResponse {
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user