feat: 配置了部分数据库内容

This commit is contained in:
2025-10-01 08:31:47 +00:00
parent dcd0a13f73
commit 1507bc220a
3 changed files with 139 additions and 27 deletions
+20 -16
View File
@@ -23,24 +23,28 @@
//convert: the value can be changed by a function call before it is stored into database or
//after it is read from database
"convert": {
"enabled": false,
"items":[{
"table": "user",
"column": "password",
"method": {
//after_db_read: name of the method which is called after reading from database, signature: void([const] std::shared_ptr [&])
"after_db_read": "decrypt_password",
//before_db_write: name of the method which is called before writing to database, signature: void([const] std::shared_ptr [&])
"before_db_write": "encrypt_password"
},
"includes": [
"\"file_local_search_path.h\"","<file_in_global_search_path.h>"
]
}]
"enabled": false,
"items": [
{
"table": "user",
"column": "password",
"method": {
//after_db_read: name of the method which is called after reading from database, signature: void([const] std::shared_ptr [&])
"after_db_read": "decrypt_password",
//before_db_write: name of the method which is called before writing to database, signature: void([const] std::shared_ptr [&])
"before_db_write": "encrypt_password"
},
"includes": [
"\"file_local_search_path.h\"",
"<file_in_global_search_path.h>"
]
}
]
},
"relationships": {
"enabled": false,
"items": [{
"items": [
{
"type": "has one",
"original_table_name": "products",
"original_table_alias": "product",
@@ -101,4 +105,4 @@
// generate_base_only: false by default. Set to true to avoid overwriting custom subclasses.
"generate_base_only": false
}
}
}