Monorepo containing core modules of Zeichen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
901 B

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