OCA_Backend/api/models/service.js
2022-01-22 19:06:44 +05:30

31 lines
782 B
JavaScript

'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class service extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
service.init({
categoryId: DataTypes.INTEGER,
subcategoryId: DataTypes.INTEGER,
name: DataTypes.STRING,
price: DataTypes.DOUBLE,
salePrice: DataTypes.DOUBLE,
description: DataTypes.STRING,
status: DataTypes.INTEGER,
createdBy: DataTypes.INTEGER,
updateBy: DataTypes.INTEGER
}, {
sequelize,
modelName: 'service',
});
return service;
};