New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@anannapha/pos

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anannapha/pos

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Install library

npm install https://gitlab.com/lattanapanya1/library-pos.git

Using model on other project

path.join( __dirname, "../../node_modules/@anannapha/pos/dist/entities/**/*.js" )

Using route on other project

import { addOnRouter, closeDayOrdersRouter, countStockRouter, countStockItemRouter, kitchenRouter, menuRouter, menuSeasoningRouter, menuCategoryRouter, menuTypeRouter, menuUnitRouter, menuIngredientRouter, orderRouter, outletRouter, outletTypeRouter, paymentRouter, promotionRouter, setMenuRouter, tableRouter } from "@anannapha/pos";

router.use( "/unit", unitRouter() ); ....

ການນຳໃຊ້ model ຂອງ library

ໃນກໍລະນີທີ່ model ຢູ່ໃນ library shared ແລ້ວແມ່ນສາມາດນຳໄປໃຊ້ໄດ້ກັບ library ອື່ນ ແລະ project ທີ່ເອີ້ນໃຊ້ທຸກ library

  • ຖ້າໃນກໍລະນີ project ທີ່ມີ model ທີ່ຊື່ຄືກັນກັບ library ແລະ ລາຍລະອຽດພື້ນຖານຄືກັນກັບຂອງ library ສາມາດເອີ້ນໃຊ້ model ຂອງ library ໄດ້ເລີຍ ໂດຍໃຊ້ວິທີການ (extends) ມາໃສ່ model project ທີ່ເອີ້ນໃຊ້. ສ່ວນຖ້າມີລາຍລະອຽດບາງສ່ວນຢາກເພີ່ມເຕີມໃສ່ ແຕ່ເວລາ synchronize ຕ້ອງເພີ່ມທັງ model ທີ່ຢູ່ໃນ library ແລະ model ທີ່ຢູ່ໃນ project ໃຫ້ກັບ entities:[EmployeeShared, Employee]

  • ໃນກໍລະນີທີ່ມີການ join model ຂອງ 2 model ໃນ library ແລະ ມາເອີ້ນໃຊ້ໃນ project ແລ້ວມີການ join ບາງ model ໃນ project ຕົວຢ່າງເຊັ້ນ

  • ໃນ project export class Employee extends EmployeeShared { @ManyToOne(() => EmployeeStatus, { nullable: true }) employee_status: EmployeeStatus; } export class User extends UserShared {} ເຊິ່ງເວລາເອີ່ນໃຊ້ model User ແມ່ນຈະເອີ່ນໃຊ້ model User ຂອງ project ສະນັ້ນຖ້າມີການ join ກັບ employee_status ຈະຕ້ອງ join 2 model export class User extends UserShared { @OneToOne(() => Employee, (employee) => employee.user) employee: Employee | null; }

FAQs

Package last updated on 15 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts