Добавил сортировку по свежести
This commit is contained in:
parent
844f1697e7
commit
b48e6d11b7
|
|
@ -31,6 +31,7 @@ export class BlacklistService {
|
||||||
{ steam_nickname: { [Op.substring]: text } },
|
{ steam_nickname: { [Op.substring]: text } },
|
||||||
{ comment: { [Op.substring]: text } },
|
{ comment: { [Op.substring]: text } },
|
||||||
),
|
),
|
||||||
|
order: [['createdAt', 'ASC'] as const],
|
||||||
});
|
});
|
||||||
return this.groupRecordsByLink(foundRecords);
|
return this.groupRecordsByLink(foundRecords);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Column, Model, Table } from 'sequelize-typescript';
|
import { Column, DataType, Model, Table } from 'sequelize-typescript';
|
||||||
|
|
||||||
@Table
|
@Table
|
||||||
export class BlacklistReport extends Model {
|
export class BlacklistReport extends Model {
|
||||||
|
|
@ -28,4 +28,10 @@ export class BlacklistReport extends Model {
|
||||||
|
|
||||||
@Column({ defaultValue: false })
|
@Column({ defaultValue: false })
|
||||||
declare smurf: boolean;
|
declare smurf: boolean;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: DataType.DATE,
|
||||||
|
field: 'createdAt', // или 'created_at', если в БД имя через подчеркивание
|
||||||
|
})
|
||||||
|
declare createdAt: Date;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue