
Protocol Buffers
How ApiHug use protocol buffers to define Database Entity
Customization
Since Milestone of 2024-05-10
Project module {modile}-proto src/resources/hope-wire.json define:
{
"persistence": {
"identifyType": "LONG",
"tenantType": "LONG",
"format": "CAMEL",
"upper": "UPPER"
}
}
Format:
DEFAULT: as old framework, convert to SNAKE styleCAMEL: myVariableNameSNAKE: my_variable_nameUpper:
DEFAULT:as old framework, convert to UPPER styleUPPER: name -> NAMELOWER: NAME -> nameCAPITALIZE: userName -> UserNamehope.common.persistence.plugin.NameMappingStrategy client plugin to rename the column name.case 3, the column will always be MY_USER_NAME as manually set as: name: "MY_USER_NAME";
string user_name = 1 [(hope.persistence.column) = {
name: "MY_USER_NAME",
description: "name of the account",
nullable: FALSE,
updatable: FALSE,
length: {
value: 32
},
type: VARCHAR
}];