first commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* © 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;
|
||||
};
|
||||
Reference in New Issue
Block a user