|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import * as ColumnTypes from '../utilities/ColumnTypes'
-
- const Note: ColumnTypes.Model = {
- modelName: 'Note',
- tableName: 'notes',
- options: {
- timestamps: true,
- paranoid: true,
- createdAt: 'createdAt',
- updatedAt: 'updatedAt',
- deletedAt: 'deletedAt',
- },
- attributes: {
- id: {
- allowNull: true,
- primaryKey: true,
- type: ColumnTypes.UUIDV4,
- },
- title: {
- allowNull: false,
- type: ColumnTypes.STRING,
- },
- content: {
- allowNull: true,
- type: ColumnTypes.TEXT({ length: 'long', }),
- },
- folderId: {
- allowNull: true,
- type: ColumnTypes.UUIDV4,
- },
- createdAt: {
- allowNull: false,
- type: ColumnTypes.DATE,
- },
- updatedAt: {
- allowNull: false,
- type: ColumnTypes.DATE,
- },
- deletedAt: {
- allowNull: true,
- type: ColumnTypes.DATE,
- },
- },
- }
-
- export default Note
|