-
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 #41 from Transmatter/development
progress 2 backup
- Loading branch information
Showing
38 changed files
with
739 additions
and
263 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM openjdk:17-alpine | ||
RUN addgroup -S spring && adduser -S spring -G spring | ||
RUN mkdir logs | ||
VOLUME /logs | ||
RUN apk add tzdata | ||
EXPOSE 8080 8443 | ||
|
||
ENV JAVA_PROFILE dev-release | ||
ARG DEPENDENCY=target/dependency | ||
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib | ||
COPY ${DEPENDENCY}/META-INF /app/META-INF | ||
COPY ${DEPENDENCY}/BOOT-INF/classes /app | ||
|
||
ENTRYPOINT ["java" , "-Dspring.profiles.active=${JAVA_PROFILE}",\ | ||
"-cp","app:app/lib/*","transmatter.platform.administration.AdministrationApplication"] |
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,17 @@ | ||
version: '3.8' | ||
services: | ||
db: | ||
image: mysql | ||
command: --default-authentication-plugin=mysql_native_password | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: 1590 | ||
phpmyadmin: | ||
image: phpmyadmin | ||
restart: always | ||
ports: | ||
- 9000:80 | ||
environment: | ||
PMA_HOST: db | ||
MYSQL_ROOT_PASSWORD: 1590 |
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
19 changes: 15 additions & 4 deletions
19
src/main/java/transmatter/platform/administration/content/entity/Content.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,31 +1,42 @@ | ||
package transmatter.platform.administration.content.entity; | ||
|
||
import com.mysema.query.annotations.QueryEntity; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
import org.springframework.lang.Nullable; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@QueryEntity | ||
@Document | ||
public class Content { | ||
@Id | ||
String id; | ||
|
||
String source; | ||
String author; | ||
String public_date; | ||
String publicDate; | ||
String title; | ||
String content; | ||
String type; | ||
String category; | ||
List<Image> images; | ||
List<Comment> comment; | ||
|
||
@Builder.Default | ||
ContentStatus approveStatus = ContentStatus.NA; | ||
|
||
@Builder.Default | ||
ContentType type = ContentType.NA; | ||
|
||
@Nullable | ||
String approvedDate; | ||
|
||
@Nullable | ||
String approvedBy; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/transmatter/platform/administration/content/entity/ContentRequest.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 transmatter.platform.administration.content.entity; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ContentRequest { | ||
String title; | ||
String content; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/transmatter/platform/administration/content/entity/ContentStatus.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 transmatter.platform.administration.content.entity; | ||
|
||
public enum ContentStatus { | ||
NA("ไม่"),APPROVE("รองรับ"),NOT_APPROVE("ไม่รองรับ"); | ||
|
||
String thaiName; | ||
ContentStatus(String thaiName){ | ||
this.thaiName = thaiName; | ||
} | ||
|
||
public String getThaiName() { | ||
return thaiName; | ||
} | ||
} |
Oops, something went wrong.