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

Tạo bảng carcategories - 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.2: Tạo bảng carcategories

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

Tại thư mục 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(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 = 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