-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from TTG-Club/feature/create-species-v2
Создание видов
- Loading branch information
Showing
42 changed files
with
979 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
package club.ttg.dnd5.dto.base; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.time.Instant; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
public abstract class BaseDTO { | ||
private String url; | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonProperty(value = "image") | ||
private String imageUrl; | ||
public abstract class BaseDTO extends BaseUrl { | ||
@JsonProperty(value = "name") | ||
private NameBasedDTO nameBasedDTO = new NameBasedDTO(); | ||
private String description; | ||
@JsonProperty(value = "source") | ||
private SourceResponse sourceDTO = new SourceResponse(); | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
private List<String> gallery = new ArrayList<>(); | ||
private Instant updatedAt; | ||
private String userId; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package club.ttg.dnd5.dto.base; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
public abstract class BaseUrl { | ||
private String url; | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonProperty(value = "image") | ||
private String imageUrl; | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
private List<String> gallery = new ArrayList<>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package club.ttg.dnd5.dto.base; | ||
|
||
import java.util.ArrayList; | ||
|
||
public interface HasNameResponse { | ||
String getName(); | ||
String getEnglish(); | ||
String getAlternative(); | ||
ArrayList<String> getAlternative(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/club/ttg/dnd5/dto/base/create/CreateBaseDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package club.ttg.dnd5.dto.base.create; | ||
|
||
import club.ttg.dnd5.dto.base.BaseUrl; | ||
import club.ttg.dnd5.dto.base.NameBasedDTO; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public abstract class CreateBaseDTO extends BaseUrl { | ||
@JsonProperty(value = "name") | ||
private NameBasedDTO nameBasedDTO = new NameBasedDTO(); | ||
private String description; | ||
@JsonProperty(value = "source") | ||
private SourceReference sourceDTO = new SourceReference(); | ||
private String userId; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/club/ttg/dnd5/dto/base/create/SourceReference.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package club.ttg.dnd5.dto.base.create; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@RequiredArgsConstructor | ||
@AllArgsConstructor | ||
public class SourceReference { | ||
@JsonProperty(namespace = "url") | ||
private String url; | ||
private int page; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 11 additions & 4 deletions
15
src/main/java/club/ttg/dnd5/dto/species/MovementAttributes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
package club.ttg.dnd5.dto.species; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.*; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@RequiredArgsConstructor | ||
@AllArgsConstructor | ||
public class MovementAttributes{ | ||
private int base = 30; | ||
private final int base; | ||
private int fly; | ||
private int climb; | ||
private int swim; | ||
|
||
public MovementAttributes() { | ||
this.base = 30; | ||
fly = -1; | ||
climb = -1; | ||
swim = -1; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/club/ttg/dnd5/dto/species/SpeciesCreateFeatureDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package club.ttg.dnd5.dto.species; | ||
|
||
import club.ttg.dnd5.dto.base.NameBasedDTO; | ||
import club.ttg.dnd5.dto.base.create.SourceReference; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class SpeciesCreateFeatureDto { | ||
private NameBasedDTO name = new NameBasedDTO(); | ||
private String description; | ||
private SourceReference source = new SourceReference(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.