Giải pháp chuyển đổi số trọn gói cho doanh nghiệp Việt

Tạo bảng carcategories.js - Xây dựng API backend quản lý Car bằng server nodejs

Xây dựng API backend quản lý Car bằng server nodejs

← Toàn bộ tài liệu


Bước 7.2: Tạo bảng carcategories.js

Bài 9/21 Xem dạng sách

Tại thư mục admin/apps/ecommerce/tables

Tạo file carcategories.js

 Nội dung file 

var table = require(`${path_root}/lib/mvc/tables/Table`);

class carcategories extends table {
constructor(req, res,next) {
super();
this._id = "";
this.name = "";
this.image= "";
this.note= "";
this.published=1;
this.created_date = new Date();
this.modify_date = new Date();
}
}

module.exports = carcategories;

Sơ đồ quan hệ các bảng

Table Name: {{table.name}}
Num Name Type
{{field_index+1}}
{{field.name}} {{field.type}}

Hỏi đáp

Gửi với tên {{comment_full_name}}

Chưa có câu hỏi nào cho bài này.

Zalo 0936.006.058 Hotline 0936.006.058