/**
* 订单状态表
*/
'use strict'

module.exports = function (db, DataTypes) {
	return db.define('oproductprocess', {
		product_id: {type: DataTypes.STRING, field: 'product_id', allowNull: true, comment:'产品ID' },
		// name: { type: DataTypes.STRING(200), field: 'name', allowNull: false, defaultValue:"", comment:'产品名称'},
		// status: {type: DataTypes.STRING, field: 'status', allowNull: true, comment:'状态' },
		func: { type: DataTypes.STRING, field: 'func', allowNull: false, comment:'状态执行方法名称'},
		next_status: {type: DataTypes.STRING, field: 'next_status', allowNull: true, comment:'下一个状态'},
		name1: { type: DataTypes.STRING, field: 'name1', allowNull: true, comment:'状态1'},
		name2: {type: DataTypes.STRING, field: 'name2', allowNull: true, comment:'状态2' },
		name3: { type: DataTypes.STRING, field: 'name3', allowNull: true, comment:'状态3'},
		name4: {type: DataTypes.STRING, field: 'name4', allowNull: true, comment:'状态4' },
		sort: {type: DataTypes.INTEGER, field: 'sort', allowNull: false, defaultValue:1, comment:'排序' }
	},
	{
		underscored: true,
    paranoid: true,
    version: true,
		tableName: 'o_product_process',
		comment: '产品状态表',
	});
}

