This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #16 from hardingadonis/dev
Release Sprint 1
- Loading branch information
Showing
15 changed files
with
249 additions
and
1 deletion.
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,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: hardingadonis | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: hardingadonis | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,27 @@ | ||
name: 'Build with Maven' | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
name: 'Build on ${{ matrix.os }}' | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Set up JDK 8' | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
architecture: 'x64' | ||
|
||
- name: 'Build project with Maven' | ||
run: mvn verify |
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,37 @@ | ||
name: 'Release Sale Dock' | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Build with Maven] | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release: | ||
name: 'Release Sale Dock' | ||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Get version' | ||
id: get_version | ||
run: | | ||
chmod +x get_version.sh | ||
echo "version=$(./get_version.sh)" >> $GITHUB_OUTPUT | ||
- name: 'Release Sale Dock' | ||
uses: softprops/[email protected] | ||
with: | ||
name: 'Sale Dock - v${{ steps.get_version.outputs.version }}' | ||
tag_name: ${{ steps.get_version.outputs.version }} | ||
generate_release_notes: true |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"schedule": "daily", | ||
"ignoredFiles": [ | ||
], | ||
"compressWiki": "false", | ||
"minKBReduced": 0 | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,64 @@ | ||
CREATE TABLE `customer` ( | ||
`id` int PRIMARY KEY AUTO_INCREMENT COMMENT 'ID dùng để quản lý, tự động tăng', | ||
`code` varchar(255) UNIQUE COMMENT 'Mã khách hàng, sẽ hiện trên giao diện, ID thì không hiện', | ||
`name` varchar(255) NOT NULL, | ||
`email` varchar(255) NOT NULL, | ||
`address` varchar(255) NOT NULL, | ||
`created_at` TIMESTAMP DEFAULT null, | ||
`updated_at` TIMESTAMP DEFAULT null | ||
); | ||
|
||
CREATE TABLE `product` ( | ||
`id` int PRIMARY KEY AUTO_INCREMENT COMMENT 'ID dùng để quản lý, tự động tăng', | ||
`code` varchar(255) UNIQUE COMMENT 'Mã sản phẩm, sẽ hiện trên giao diện, ID thì không hiện', | ||
`name` varchar(255) NOT NULL, | ||
`description` TEXT, | ||
`price` REAL NOT NULL, | ||
`category_id` varchar(255) NOT NULL, | ||
`image_url` LONGTEXT, | ||
`created_at` TIMESTAMP DEFAULT null, | ||
`updated_at` TIMESTAMP DEFAULT null | ||
); | ||
|
||
CREATE TABLE `category` ( | ||
`id` int PRIMARY KEY AUTO_INCREMENT COMMENT 'ID dùng để quản lý, tự động tăng', | ||
`name` varchar(255) NOT NULL | ||
); | ||
|
||
CREATE TABLE `employee` ( | ||
`id` int PRIMARY KEY AUTO_INCREMENT COMMENT 'ID dùng để quản lý, tự động tăng', | ||
`code` varchar(255) UNIQUE COMMENT 'Mã nhân viên, sẽ hiện trên giao diện, dùng để đăng nhập, vd QE170001', | ||
`password` varchar(255) NOT NULL, | ||
`name` varchar(255) NOT NULL, | ||
`created_at` TIMESTAMP DEFAULT null, | ||
`updated_at` TIMESTAMP DEFAULT null | ||
); | ||
|
||
CREATE TABLE `order` ( | ||
`id` int PRIMARY KEY AUTO_INCREMENT COMMENT 'ID dùng để quản lý, tự động tăng', | ||
`code` varchar(255) UNIQUE, | ||
`employee_id` int NOT NULL, | ||
`customer_id` int NOT NULL, | ||
`status` ENUM ('pending', 'shipping', 'done', 'canceled') NOT NULL, | ||
`total` REAL NOT NULL, | ||
`note` TEXT DEFAULT null, | ||
`created_at` TIMESTAMP DEFAULT null, | ||
`updated_at` TIMESTAMP DEFAULT null | ||
); | ||
|
||
CREATE TABLE `order_detail` ( | ||
`order_id` int, | ||
`product_id` int, | ||
`quantity` int NOT NULL, | ||
PRIMARY KEY (`order_id`, `product_id`) | ||
); | ||
|
||
ALTER TABLE `order` ADD FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`); | ||
|
||
ALTER TABLE `order_detail` ADD FOREIGN KEY (`order_id`) REFERENCES `order` (`id`); | ||
|
||
ALTER TABLE `product` ADD FOREIGN KEY (`category_id`) REFERENCES `category` (`id`); | ||
|
||
ALTER TABLE `order_detail` ADD FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); | ||
|
||
ALTER TABLE `order` ADD FOREIGN KEY (`employee_id`) REFERENCES `employee` (`id`); |
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,7 @@ | ||
#!/bin/bash | ||
|
||
major_version=0 | ||
minor_version=0 | ||
path_version=1 | ||
|
||
echo "$major_version.$minor_version.$path_version" |
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,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.hardingadonis</groupId> | ||
<artifactId>saledock</artifactId> | ||
<version>0.0.1</version> | ||
<packaging>war</packaging> | ||
|
||
<name>Sale Dock</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax</groupId> | ||
<artifactId>javaee-web-api</artifactId> | ||
<version>7.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mysql</groupId> | ||
<artifactId>mysql-connector-j</artifactId> | ||
<version>8.0.33</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-core</artifactId> | ||
<version>5.6.15.Final</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.11.0</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>3.4.0</version> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
<outputDirectory>${project.basedir}/server/</outputDirectory> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
5 changes: 5 additions & 0 deletions
5
src/main/java/io/hardingadonis/saledock/controller/Controller.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,5 @@ | ||
package io.hardingadonis.saledock.controller; | ||
|
||
public class Controller { | ||
|
||
} |
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,5 @@ | ||
package io.hardingadonis.saledock.model; | ||
|
||
public class Model { | ||
|
||
} |
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,5 @@ | ||
package io.hardingadonis.saledock.utils; | ||
|
||
public class Utils { | ||
|
||
} |
Empty file.
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,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Context path="/saledock"/> |