Giter Club home page Giter Club logo

kiosk_project's People

Contributors

wonbinchoi2353 avatar

Watchers

 avatar

kiosk_project's Issues

코드리뷰

  1. PORT 변수가 class 외부에 선언되어 있기 때문에 파라미터로 넘기지 않아도 참조가 가능할것 같네요. 큰건 아니지만 참고차 말씀드려요 후발대에서 배운 클로저를 기억하면 되겠습니다

    server.openServer(app, PORT);

  2. itemType을 JSON.stringify 하지 않고 constance에 선언된 object 그대로 가져다 쓰는게 더 명확할것 같아요 예를 들면 다음과 같이요

    const itemTypeString = itemType

    // 알맞은 타입을 지정해주세요
    if (!itemType[type]) {
      throw new Error("알맞은 타입을 지정해주세요.");
    }

const itemTypeString = JSON.stringify(itemType);
// 알맞은 타입을 지정해주세요
if (!itemTypeString.includes(type)) {
throw new Error("알맞은 타입을 지정해주세요.");
}

  1. 만약 item에서 name이 동일한게 없어야 한다면, 즉 unique함을 만족해야 한다면 item테이블의 name 컬럼에 unique index를 사용하는 방법도 있습니다. 참고 부탁드려요

[총평]
원빈님 예전보다 많이 성장하고 있음이 보이네요. 일단 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'
스네이크 케이스를 쓰면 오류가 생긴다?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.