This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/api/models/functions.js

39 lines
858 B
JavaScript
Raw Normal View History

const Sequelize = require('sequelize');
const sequelize = require('../assets/utils/database');
module.exports = sequelize.define('function', {
title: {
type: Sequelize.STRING,
allowNull: false,
},
slug: {
type: Sequelize.STRING,
allowNull: false,
},
description: {
type: Sequelize.STRING,
allowNull: false
},
image: {
type: Sequelize.STRING,
2020-03-25 16:23:43 +01:00
allowNull: false,
defaultValue: "/images/functions/default.png"
},
type: {
type: Sequelize.STRING,
allowNull: false
},
article: {
type: Sequelize.TEXT,
allowNull: true
},
utilizationForm: {
2020-05-13 19:37:24 +02:00
type: Sequelize.TEXT,
allowNull: true
},
isOnline: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: 0
}
});