Compare commits

..

14 Commits

Author SHA1 Message Date
TakahashiNg 5a72c9f9e3 feat: add inventory entity, service, test
Release package / release (push) Successful in 1m37s
2026-03-24 14:53:31 +00:00
gitea-actions 942e13ced9 chore: release [ci skip] 2026-03-24 09:57:41 +00:00
TakahashiNg 5a0092c711 Merge branch 'dev-eatery-service' of http://host.docker.internal:9780/takahashi/backend into dev-eatery-service
Release package / release (push) Successful in 1m22s
2026-03-24 09:56:28 +00:00
TakahashiNg 1229cec774 chore: add test 2026-03-24 09:56:27 +00:00
gitea-actions f614d5572d chore: release [ci skip] 2026-03-24 09:22:17 +00:00
TranHuuDanh 37bf5de999 chore: add test
Release package / release (push) Successful in 2m25s
2026-03-24 09:20:02 +00:00
TakahashiNg 1f36994661 chore: better entity 2026-03-24 07:24:10 +00:00
gitea-actions 1af8c04e32 chore: release [ci skip] 2026-03-24 06:58:22 +00:00
TakahashiNg 30fc547604 chore: update
Release package / release (push) Successful in 2m2s
2026-03-24 06:56:12 +00:00
gitea-actions dbda2f5491 chore: release [ci skip] 2026-03-23 14:48:20 +00:00
TakahashiNg 2ac755ddca Merge branch 'dev-eatery-service' of http://host.docker.internal:9780/takahashi/backend into dev-eatery-service
Release package / release (push) Successful in 1m12s
2026-03-23 14:47:08 +00:00
TakahashiNg 4f014e03ca chore: update 2026-03-23 14:46:42 +00:00
gitea-actions 81f58a52bf chore: release [ci skip] 2026-03-23 14:12:44 +00:00
TakahashiNg f5b66d9bb8 chore(eatery): init service
Release package / release (push) Successful in 2m15s
2026-03-23 14:10:38 +00:00
13 changed files with 21 additions and 99 deletions
-36
View File
@@ -1,36 +0,0 @@
name: Java CI with Maven
on:
push:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: "25"
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Test all modules
run: ./mvnw -B clean verify -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
if: failure()
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
-7
View File
@@ -1,10 +1,3 @@
# [1.1.0-dev.1](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.0.0...v1.1.0-dev.1) (2026-03-24)
### Features
* add inventory entity, service, test ([5a72c9f](https://git.demonkernel.io.vn/FoodSurf/backend/commit/5a72c9f9e38cd9f00fe3884d9ddc52675324bd31))
# [1.0.0-dev.21](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.0.0-dev.20...v1.0.0-dev.21) (2026-03-23)
+3 -8
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.1.0-dev.1</version>
<version>1.0.0-dev.21</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -48,11 +48,6 @@
<artifactId>lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-panache</artifactId>
@@ -148,8 +143,8 @@
<configuration>
<argLine>@{argLine}</argLine>
<systemPropertyVariables>
<native.image.path>
${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<native.image.path
>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager
>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
@@ -30,7 +30,7 @@ public abstract class UserModel extends BaseEntity {
@Transactional
public void signup(String name, String phone, String rawPassword) {
// Check existed user
UserModel existedUser = find("phone", phone).firstResult();
UserModel existedUser = UserModel.find("phone", phone).firstResult();
if (existedUser != null) throw new BadRequestException("ExistedUser");
@@ -1,13 +1,13 @@
# Database
# Cấu hình Database
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=postgres
quarkus.datasource.password=password
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/postgres
# Tự động tạo bảng từ Entity (chỉ dùng cho môi trường dev)
quarkus.hibernate-orm.database.generation=update
# Docker
## URL của Gitea Registry (thường là gitea.yourdomain.com)
# URL của Gitea Registry (thường là gitea.yourdomain.com)
quarkus.container-image.registry=git.demonkernel.io.vn
quarkus.container-image.group=foodsurf
quarkus.container-image.name=account-service
@@ -16,9 +16,4 @@ quarkus.container-image.build=true
quarkus.container-image.builder=docker
# Redis
quarkus.redis.hosts=redis://localhost:6379
# Dependency
quarkus.index-dependency.lib.group-id=com.drinkool
quarkus.index-dependency.lib.artifact-id=lib
quarkus.redis.hosts=redis://localhost:6379
@@ -1,25 +1,22 @@
package com.drinkool.models;
package com.drinkool;
import static org.junit.jupiter.api.Assertions.*;
import com.drinkool.entities.CustomerEntity;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.persistence.*;
import jakarta.transaction.Transactional;
import java.util.*;
import org.junit.jupiter.api.Test;
@Entity
@Table
class TestUserEntity extends UserModel {}
@QuarkusTest
public class UserModelTest {
class CustomerSignupTest {
@Test
// @TestIransaction
@Transactional
public void testSignupSuccess() {
//dang nhap thanh cong
TestUserEntity user = new TestUserEntity();
CustomerEntity user = new CustomerEntity();
String phone =
"+8477" + String.format("%07d", (new Random()).nextInt(10000000));
String password = "02092006Danh";
@@ -30,7 +27,7 @@ public class UserModelTest {
assertEquals(phone, user.phone);
assertNotNull(user.hashedPassword, "password phai hash");
TestUserEntity savedUser = TestUserEntity.find(
CustomerEntity savedUser = CustomerEntity.find(
"phone",
phone
).firstResult();
@@ -1,9 +0,0 @@
# Database
%test.quarkus.datasource.db-kind=h2
%test.quarkus.datasource.jdbc.url=jdbc:h2:mem:test_db;DB_CLOSE_DELAY=-1
%test.quarkus.hibernate-orm.database.generation=drop-and-create
# Docker
%test.quarkus.container-image.build=false
%test.quarkus.container-image.push=false
+1 -6
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.1.0-dev.1</version>
<version>1.0.0-dev.21</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -48,11 +48,6 @@
<artifactId>lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
@@ -1,9 +1,2 @@
# Quarkus
quarkus.http.host=0.0.0.0
# Database
# Database
%test.quarkus.datasource.db-kind=h2
%test.quarkus.datasource.jdbc.url=jdbc:h2:mem:test_db;DB_CLOSE_DELAY=-1
%test.quarkus.hibernate-orm.database.generation=drop-and-create
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.1.0-dev.1</version>
<version>1.0.0-dev.21</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.1.0-dev.1</version>
<version>1.0.0-dev.21</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -1,8 +1,7 @@
package com.drinkool.dtos;
public class AddInventory {
public String name;
public int quantity;
public String unit;
public String name;
public int quantity;
public String unit;
}
+1 -1
View File
@@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.1.0-dev.1</version>
<version>1.0.0-dev.21</version>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>17</maven.compiler.source>