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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. const Sequelize = require('sequelize');
  2. module.exports = function(sequelize, DataTypes) {
  3. return sequelize.define('wp_posts', {
  4. ID: {
  5. autoIncrement: true,
  6. type: DataTypes.BIGINT.UNSIGNED,
  7. allowNull: false,
  8. primaryKey: true
  9. },
  10. post_author: {
  11. type: DataTypes.BIGINT.UNSIGNED,
  12. allowNull: false,
  13. defaultValue: 0
  14. },
  15. post_date: {
  16. type: DataTypes.DATE,
  17. allowNull: false,
  18. defaultValue: "0000-00-00 00:00:00"
  19. },
  20. post_date_gmt: {
  21. type: DataTypes.DATE,
  22. allowNull: false,
  23. defaultValue: "0000-00-00 00:00:00"
  24. },
  25. post_content: {
  26. type: DataTypes.TEXT,
  27. allowNull: false
  28. },
  29. post_title: {
  30. type: DataTypes.TEXT,
  31. allowNull: false
  32. },
  33. post_excerpt: {
  34. type: DataTypes.TEXT,
  35. allowNull: false
  36. },
  37. post_status: {
  38. type: DataTypes.STRING(20),
  39. allowNull: false,
  40. defaultValue: "publish"
  41. },
  42. comment_status: {
  43. type: DataTypes.STRING(20),
  44. allowNull: false,
  45. defaultValue: "open"
  46. },
  47. ping_status: {
  48. type: DataTypes.STRING(20),
  49. allowNull: false,
  50. defaultValue: "open"
  51. },
  52. post_password: {
  53. type: DataTypes.STRING(255),
  54. allowNull: false,
  55. defaultValue: ""
  56. },
  57. post_name: {
  58. type: DataTypes.STRING(200),
  59. allowNull: false,
  60. defaultValue: ""
  61. },
  62. to_ping: {
  63. type: DataTypes.TEXT,
  64. allowNull: false
  65. },
  66. pinged: {
  67. type: DataTypes.TEXT,
  68. allowNull: false
  69. },
  70. post_modified: {
  71. type: DataTypes.DATE,
  72. allowNull: false,
  73. defaultValue: "0000-00-00 00:00:00"
  74. },
  75. post_modified_gmt: {
  76. type: DataTypes.DATE,
  77. allowNull: false,
  78. defaultValue: "0000-00-00 00:00:00"
  79. },
  80. post_content_filtered: {
  81. type: DataTypes.TEXT,
  82. allowNull: false
  83. },
  84. post_parent: {
  85. type: DataTypes.BIGINT.UNSIGNED,
  86. allowNull: false,
  87. defaultValue: 0
  88. },
  89. guid: {
  90. type: DataTypes.STRING(255),
  91. allowNull: false,
  92. defaultValue: ""
  93. },
  94. menu_order: {
  95. type: DataTypes.INTEGER,
  96. allowNull: false,
  97. defaultValue: 0
  98. },
  99. post_type: {
  100. type: DataTypes.STRING(20),
  101. allowNull: false,
  102. defaultValue: "post"
  103. },
  104. post_mime_type: {
  105. type: DataTypes.STRING(100),
  106. allowNull: false,
  107. defaultValue: ""
  108. },
  109. comment_count: {
  110. type: DataTypes.BIGINT,
  111. allowNull: false,
  112. defaultValue: 0
  113. }
  114. }, {
  115. sequelize,
  116. timestamps: false,
  117. });
  118. };