Sfoglia il codice sorgente

优化收入记录实体中的索引,合并并重命名索引以提升查询性能。

wuyi 3 mesi fa
parent
commit
5721cd04a9
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/entities/income-records.entity.ts

+ 2 - 2
src/entities/income-records.entity.ts

@@ -19,8 +19,8 @@ export enum OrderType {
 @Entity()
 @Index('idx_agent_date_type', ['agentId', 'createdAt', 'incomeType'])
 @Index('idx_user_date', ['userId', 'createdAt'])
-@Index('idx_del_flag', ['delFlag'])
-@Index('idx_status', ['status'])
+@Index('idx_agent_date_del_type', ['agentId', 'createdAt', 'delFlag', 'incomeType'])
+@Index('idx_user_date_del', ['userId', 'createdAt', 'delFlag'])
 export class IncomeRecords {
   @PrimaryGeneratedColumn()
   id: number