feat(user): add createdAt field to user model

- Add createdAt field to User struct and database schema
- Update all user queries to include createdAt field
- Document new field in API documentation
- Fix server online status flag timing
This commit is contained in:
2026-03-10 14:34:16 +08:00
parent a142fb17a8
commit f3fca7f07b
4 changed files with 27 additions and 16 deletions
+11 -2
View File
@@ -299,17 +299,26 @@ X-Timestamp: 1704067200000
{
"userID": 1,
"username": "admin",
"type": "superuser"
"type": "superuser",
"createdAt": "2024-01-01 12:00:00"
},
{
"userID": 2,
"username": "new_user",
"type": "admin"
"type": "admin",
"createdAt": "2024-01-02 14:30:00"
}
]
}
```
| Field | Type | Description |
|-------|------|-------------|
| userID | int | User ID |
| username | string | Username |
| type | string | User type: superuser, admin, visitor |
| createdAt | string | User creation time (YYYY-MM-DD HH:MM:SS format) |
---
## List Active Sessions