wonbinchoi2353 / kiosk_project Goto Github PK
View Code? Open in Web Editor NEWcrud practice project
crud practice project
PORT 변수가 class 외부에 선언되어 있기 때문에 파라미터로 넘기지 않아도 참조가 가능할것 같네요. 큰건 아니지만 참고차 말씀드려요 후발대에서 배운 클로저를 기억하면 되겠습니다
Line 32 in 5d3b902
itemType을 JSON.stringify 하지 않고 constance에 선언된 object 그대로 가져다 쓰는게 더 명확할것 같아요 예를 들면 다음과 같이요
const itemTypeString = itemType
// 알맞은 타입을 지정해주세요
if (!itemType[type]) {
throw new Error("알맞은 타입을 지정해주세요.");
}
kiosk_project/services/item.service.js
Lines 15 to 20 in 5d3b902
[총평]
원빈님 예전보다 많이 성장하고 있음이 보이네요. 일단 layered architecture에 맞게 잘 구성해주셨고 app.js를 보면 코드를 깔끔히 정리하려는 시도도 하신것으로 보여요. 요구사항은 모두 구현되었고 특히 order부분에 트랜잭션을 사용해보시려고 한 점이 좋았네요. 그리고 에러도 컨트롤러 단에서 모두 처리하려는 시도도 해주셨구요. 구현 방식이 좋냐 틀리냐를 떠나서 좋은 시도들을 많이 하셨다고 생각됩니다. 잘하셨고 고생하셨습니다.
created_at: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW,
},
updated_at: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW,
},
모델에서 생성 시간과 수정 시간을 만들 때 타입과 기본값을 같게 만들었는데 시간이 다르게 나온다면 프로퍼티 이름을 인식하는 방식?
마이그레이션 파일이 생성될 때 자동으로 만들어지는데 변수명 케이스는 어떻게 하는 게 좋을까?
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
original: Error: Unknown column 'createdAt' in 'field list'
스네이크 케이스를 쓰면 오류가 생긴다?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.