initial push
This commit is contained in:
40
backend/models/Annotation.js
Normal file
40
backend/models/Annotation.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../database/database.js');
|
||||
|
||||
|
||||
const Annotation = sequelize.define('Annotation', {
|
||||
annotation_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
},
|
||||
image_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
x: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: false,
|
||||
},
|
||||
y: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: false,
|
||||
},
|
||||
height: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: false,
|
||||
},
|
||||
width: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: false,
|
||||
},
|
||||
Label: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
}, {
|
||||
tableName: 'annotation',
|
||||
timestamps: false,
|
||||
});
|
||||
|
||||
module.exports = Annotation;
|
||||
Reference in New Issue
Block a user