增加索引
This commit is contained in:
parent
ea9ded11b9
commit
ca77bcf74c
@ -2,6 +2,7 @@ package com.red.circle.other.infra.database.mongo.document;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
@ -16,6 +17,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
@Document(collection = "rocket_launch_history")
|
||||
@CompoundIndex(name = "idx_room_date_launch", def = "{'roomId': 1, 'date': 1, 'launchTime': -1}")
|
||||
public class RocketHistoryDocument {
|
||||
|
||||
@Id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user