var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var OrderSchema = new Schema({
    dmserver_id: String,
    user_new: String,
    date_new: String,
    trang_thai_tk: Number,
    kd_insert: Number,
    lan_gia_han: Number,
    ten_dvcs: String,
    dia_chi: String,
    server_name: String,
    hh_ctv_dl: String,
    pt_nguoigt: String,
    da_thu_tien_hd: String,
    da_thu_ho_so: String,
    ngay_hop_dong: String,
    id: String,
    index: String,
    dmkh_id: String,
    loai_kh: String,
    ms_thue: String,
    ten_kh: String,
    diachi_lh: String,
    co_quan_thue: String,
    tinh_thanh: String,
    nguoi_dai_dien: String,
    chuc_vu: String,
    sdt: String,
    email: String,
    website: String,
    stk: String,
    ngan_hang: String,
    nguoi_lien_he: String,
    sdt_nguoi_lien_he: String,
    email_nguoi_lien_he: String,
    so_luong_hd: String,
    choose: Number,
    ma_dvcs: String,
    ghi_chu: String,
    ngay_kich_hoat: String,
    trang_thai_db: String,
    end_user: String,
    is_trial: Boolean,
    date_expried: String,
    order_name: String,
    ma_giao_dich: String,
    total_price: {
        type: Number,
        default: 0
    },
    phi_khoi_tao: {
        type: Number,
        default: 0
    },
    gia_goi: {
        type: Number,
        default: 0
    },
    status: {
        type: Number,
        default: 0
    }
});

module.exports = mongoose.model('Order', OrderSchema);