You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
897 B
43 lines
897 B
/* eslint-disable*/
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Vehicle = sequelize.define("vehicle", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "vehicle_id_uindex"
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
count: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: "0",
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "count",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "vehicle",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.Vehicle = Vehicle;
|
|
return Vehicle;
|
|
};
|