-
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.
- Loading branch information
Showing
122 changed files
with
2,430 additions
and
540 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
APP_PORT=3000 | ||
APP_API_URL_BACKEND_1=http://pc-2:8000 | ||
NEXT_PUBLIC_API_URL_BACKEND_ONE=http://pc-3:8000/api/v1 |
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ yarn-error.log* | |
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,6 +1,6 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
reactStrictMode: true | ||
} | ||
|
||
module.exports = nextConfig |
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 was deleted.
Oops, something went wrong.
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,23 @@ | ||
import ClientSetting from "@/settings/client_setting"; | ||
import axios, {AxiosInstance} from "axios"; | ||
import applyCaseMiddleware from 'axios-case-converter'; | ||
import Client from "./client"; | ||
|
||
class BackendOneClient extends Client { | ||
instance: AxiosInstance; | ||
|
||
clientSetting: ClientSetting; | ||
|
||
|
||
constructor() { | ||
super(); | ||
this.clientSetting = new ClientSetting(); | ||
this.instance = axios.create({ | ||
baseURL: this.clientSetting.backendOneClientApiV1Url, | ||
}); | ||
this.instance = applyCaseMiddleware(this.instance); | ||
} | ||
|
||
} | ||
|
||
export default BackendOneClient; |
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 @@ | ||
import {AxiosInstance} from "axios"; | ||
import ClientSetting from "@/settings/client_setting"; | ||
|
||
|
||
abstract class Client { | ||
abstract instance: AxiosInstance; | ||
|
||
abstract clientSetting: ClientSetting; | ||
|
||
|
||
} | ||
|
||
export default Client; |
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,26 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class Account extends Entity { | ||
id: string; | ||
roleId: string; | ||
name: string; | ||
email: string; | ||
password: string; | ||
description: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, roleId: string, name: string, email: string, password: string, description: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.roleId = roleId; | ||
this.name = name; | ||
this.email = email; | ||
this.password = password; | ||
this.description = description; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default Account; |
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 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class AccountPermissionMap extends Entity { | ||
id: string; | ||
accountId: string; | ||
permissionId: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, accountId: string, permissionId: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.accountId = accountId; | ||
this.permissionId = permissionId; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default AccountPermissionMap; |
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 @@ | ||
abstract class Entity { | ||
|
||
} | ||
|
||
export default Entity; |
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,24 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class File extends Entity { | ||
id: string; | ||
name: string; | ||
description: string; | ||
extension: string; | ||
content: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, name: string, description: string, extension: string, content: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.name = name; | ||
this.description = description; | ||
this.extension = extension; | ||
this.content = content; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default 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,26 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class InventoryControl extends Entity { | ||
id: string; | ||
accountId: string; | ||
itemId: string; | ||
quantityBefore: number; | ||
quantityAfter: number; | ||
timestamp: Date; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, accountId: string, itemId: string, quantityBefore: number, quantityAfter: number, timestamp: Date, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.accountId = accountId; | ||
this.itemId = itemId; | ||
this.quantityBefore = quantityBefore; | ||
this.quantityAfter = quantityAfter; | ||
this.timestamp = timestamp; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default InventoryControl; |
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 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class Item extends Entity { | ||
id: string; | ||
permissionId: string; | ||
code: string; | ||
name: string; | ||
description: string; | ||
combinationMaxQuantity: number; | ||
combinationMinQuantity: number; | ||
quantity: number; | ||
unitName: string; | ||
unitSellPrice: number; | ||
unitCostPrice: number; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, permissionId: string, code: string, name: string, description: string, combinationMaxQuantity: number, combinationMinQuantity: number, quantity: number, unitName: string, unitSellPrice: number, unitCostPrice: number, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.permissionId = permissionId; | ||
this.code = code; | ||
this.name = name; | ||
this.description = description; | ||
this.combinationMaxQuantity = combinationMaxQuantity; | ||
this.combinationMinQuantity = combinationMinQuantity; | ||
this.quantity = quantity; | ||
this.unitName = unitName; | ||
this.unitSellPrice = unitSellPrice; | ||
this.unitCostPrice = unitCostPrice; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
} | ||
|
||
export default Item; |
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 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class ItemCombinationMap extends Entity { | ||
id: string; | ||
superItemId: string; | ||
subItemId: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, superItemId: string, subItemId: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.superItemId = superItemId; | ||
this.subItemId = subItemId; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default ItemCombinationMap; |
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 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class ItemFileMap extends Entity { | ||
id: string; | ||
itemId: string; | ||
fileId: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, itemId: string, fileId: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.itemId = itemId; | ||
this.fileId = fileId; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default ItemFileMap; |
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 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class Permission extends Entity { | ||
id: string; | ||
name: string; | ||
description: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, name: string, description: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.name = name; | ||
this.description = description; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default Permission; |
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 @@ | ||
import Entity from "@/models/entities/entity"; | ||
|
||
class Role extends Entity { | ||
id: string; | ||
name: string; | ||
description: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
|
||
constructor(id: string, name: string, description: string, createdAt: Date, updatedAt: Date) { | ||
super(); | ||
this.id = id; | ||
this.name = name; | ||
this.description = description; | ||
this.createdAt = createdAt; | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
||
export default Role; |
Oops, something went wrong.