location route
NO validation no middleware to auth
This commit is contained in:
44
Database/model/locationModel.js
Normal file
44
Database/model/locationModel.js
Normal file
@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
const { Sequelize, DataTypes } = require("sequelize");
|
||||
const { sequelize } = require("../mySQL");
|
||||
|
||||
sequelize.sync();
|
||||
const locationModel = sequelize.define(
|
||||
"location",
|
||||
{
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
},
|
||||
name: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
length: 10,
|
||||
},
|
||||
added_by: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
length: 10,
|
||||
},
|
||||
description: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
length: 100,
|
||||
},
|
||||
createdAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
},
|
||||
updatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = { locationModel };
|
Reference in New Issue
Block a user