|
- import { UUIDV4, STRING, TEXT, DATE, } from 'sequelize'
-
- export default {
- tableName: 'notes',
- modelName: 'Note',
- options: {
- timestamps: true,
- paranoid: true,
- createdAt: 'createdAt',
- updatedAt: 'updatedAt',
- deletedAt: 'deletedAt',
- },
- rawAttributes: {
- id: {
- allowNull: true,
- primaryKey: true,
- type: UUIDV4,
- },
- title: {
- allowNull: false,
- type: STRING,
- },
- content: {
- allowNull: true,
- type: TEXT({ length: 'long', }),
- },
- folderId: {
- allowNull: true,
- type: UUIDV4,
- },
- createdAt: {
- allowNull: false,
- type: DATE,
- },
- updatedAt: {
- allowNull: false,
- type: DATE,
- },
- deletedAt: {
- allowNull: true,
- type: DATE,
- },
- },
- }
|