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

Tạo table cars - Xây dựng giao diện backend của hệ thống quản lý admin.adayroi.online

Xây dựng giao diện backend của hệ thống quản lý admin.adayroi.online

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


Bước 5.1: Tạo table cars

Bài 6/33 Xem dạng sách

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

Tạo file cars.js

Nội dung file

var table = require(`${path_root}/lib/mvc/tables/Table`);
class cars extends table{
constructor(req, res, next){
super(req, res, next);
this._id="";
this.name="";
this.year=0;
this.image="";
this.category_id="";
this.status="";
this.is_feature=0;
this.note="";
this.start_date=new Date();
this.end_date=new Date();
}
}
module.exports = cars;

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