fix: 补充CRUD自动生成端点的created_at/updated_at时间戳

This commit is contained in:
Hermes Agent 2026-06-17 17:57:22 +08:00
parent 6bf45a2dfc
commit bbaa51fcef
6 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,12 @@ if not userorgid:
}
}
ns['org_id'] = userorgid
ns['created_at'] = timestampstr()
ns['updated_at'] = timestampstr()
user_id = await get_user()
if user_id:
ns['created_by'] = user_id
db = DBPools()
dbname = get_module_dbname('product_management')

View File

@ -18,6 +18,7 @@ if not userorgid:
}
}
ns['org_id'] = userorgid
ns['updated_at'] = timestampstr()

View File

@ -23,6 +23,8 @@ if not userorgid:
}
}
ns['org_id'] = userorgid
ns['created_at'] = timestampstr()
ns['updated_at'] = timestampstr()
db = DBPools()
dbname = get_module_dbname('product_management')

View File

@ -18,6 +18,7 @@ if not userorgid:
}
}
ns['org_id'] = userorgid
ns['updated_at'] = timestampstr()

View File

@ -37,6 +37,8 @@ if not userorgid:
}
}
ns['org_id'] = userorgid
ns['created_at'] = timestampstr()
ns['updated_at'] = timestampstr()
db = DBPools()
dbname = get_module_dbname('product_management')

View File

@ -32,6 +32,7 @@ if not userorgid:
}
}
ns['org_id'] = userorgid
ns['updated_at'] = timestampstr()