690402:2046 fix correspondence ATG Gemini Flash
This commit is contained in:
@@ -35,7 +35,7 @@ services:
|
||||
# ใช้ Command นี้เพื่อตั้ง Password
|
||||
command: redis-server --requirepass "Center2025"
|
||||
ports:
|
||||
- '6379:6379'
|
||||
- '16379:6379'
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
networks:
|
||||
|
||||
@@ -130,24 +130,34 @@ export class DashboardService {
|
||||
.createQueryBuilder('log')
|
||||
.leftJoin('log.user', 'user')
|
||||
.select([
|
||||
'log.auditId',
|
||||
'log.action',
|
||||
'log.entityType',
|
||||
'log.entityId',
|
||||
'log.detailsJson',
|
||||
'log.createdAt',
|
||||
'user.username',
|
||||
'user.firstName',
|
||||
'user.lastName',
|
||||
])
|
||||
.orderBy('log.createdAt', 'DESC')
|
||||
.limit(limit)
|
||||
.getMany();
|
||||
|
||||
return logs.map((log) => ({
|
||||
id: log.auditId,
|
||||
action: log.action,
|
||||
entityType: log.entityType,
|
||||
entityId: log.entityId,
|
||||
details: log.detailsJson,
|
||||
createdAt: log.createdAt,
|
||||
username: log.user?.username,
|
||||
user: log.user
|
||||
? {
|
||||
username: log.user.username,
|
||||
firstName: log.user.firstName,
|
||||
lastName: log.user.lastName,
|
||||
}
|
||||
: undefined,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ export class GetActivityDto {
|
||||
* DTO สำหรับ Response ของ Activity Item
|
||||
*/
|
||||
export class ActivityItemDto {
|
||||
@ApiPropertyOptional({ description: 'ID ของ Activity' })
|
||||
id!: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Action ที่กระทำ' })
|
||||
action!: string;
|
||||
|
||||
@@ -37,6 +40,10 @@ export class ActivityItemDto {
|
||||
@ApiPropertyOptional({ description: 'วันที่กระทำ' })
|
||||
createdAt!: Date;
|
||||
|
||||
@ApiPropertyOptional({ description: 'ชื่อผู้ใช้' })
|
||||
username?: string;
|
||||
@ApiPropertyOptional({ description: 'ข้อมูลผู้ใช้' })
|
||||
user?: {
|
||||
username: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user