Files
Zumri-Backend/app/models/upload/upload.model.js
T
Isuru Bimsara 81d0e65686 first commit
2026-08-14 22:46:02 +05:30

55 lines
1.2 KiB
JavaScript

/**
* © 2026 Niolla. All rights reserved.
*
* This file is part of the Niolla software project and is intended for internal use only.
* Unauthorized copying, modification, distribution, or disclosure of this file,
* via any medium, is strictly prohibited without written permission from Niolla.
*
* For inquiries, contact: support@niolla.lk
*/
// app/models/upload.model.js
module.exports = (sequelize, DataTypes) => {
const upload = sequelize.define(
"upload",
{
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true,
},
file_path: {
type: DataTypes.STRING,
allowNull: false,
},
file_type: {
type: DataTypes.STRING,
allowNull: false,
},
file_size: {
type: DataTypes.INTEGER,
allowNull: false,
},
original_name: {
type: DataTypes.STRING,
allowNull: false,
},
use_for: {
type: DataTypes.STRING,
allowNull: false,
},
uploaded_by: {
type: DataTypes.STRING,
allowNull: false,
},
},
{
tableName: "uploads",
timestamps: true,
},
);
return upload;
};