Monorepo containing core modules of Zeichen.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
782 B

  1. import { UUIDV4, STRING, TEXT, DATE, } from 'sequelize'
  2. export default {
  3. tableName: 'notes',
  4. modelName: 'Note',
  5. options: {
  6. timestamps: true,
  7. paranoid: true,
  8. createdAt: 'createdAt',
  9. updatedAt: 'updatedAt',
  10. deletedAt: 'deletedAt',
  11. },
  12. rawAttributes: {
  13. id: {
  14. allowNull: true,
  15. primaryKey: true,
  16. type: UUIDV4,
  17. },
  18. title: {
  19. allowNull: false,
  20. type: STRING,
  21. },
  22. content: {
  23. allowNull: true,
  24. type: TEXT({ length: 'long', }),
  25. },
  26. folderId: {
  27. allowNull: true,
  28. type: UUIDV4,
  29. },
  30. createdAt: {
  31. allowNull: false,
  32. type: DATE,
  33. },
  34. updatedAt: {
  35. allowNull: false,
  36. type: DATE,
  37. },
  38. deletedAt: {
  39. allowNull: true,
  40. type: DATE,
  41. },
  42. },
  43. }