forked from Sanders/TelegaBot
Add cache logic
This commit is contained in:
@@ -7,8 +7,22 @@ import lombok.RequiredArgsConstructor;
|
||||
@RequiredArgsConstructor
|
||||
@Data
|
||||
public class BookCreationCache {
|
||||
|
||||
public enum CreationState {
|
||||
ADDING_TITLE,
|
||||
ADDING_AUTHOR,
|
||||
ADDING_RATING
|
||||
}
|
||||
|
||||
private String title;
|
||||
private String author;
|
||||
private Integer rating;
|
||||
private CreationState creationState = CreationState.ADDING_TITLE;
|
||||
|
||||
public CreationState getCreationState() {
|
||||
return creationState;
|
||||
}
|
||||
|
||||
public void setCreationState(CreationState creationState) {
|
||||
this.creationState = creationState;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package ru.cathub.telegabot;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
|
||||
Reference in New Issue
Block a user