post_category.js 265 B

123456789101112
  1. 'use strict';
  2. const { Schema } = require('warehouse');
  3. module.exports = ctx => {
  4. const PostCategory = new Schema({
  5. post_id: {type: Schema.Types.CUID, ref: 'Post'},
  6. category_id: {type: Schema.Types.CUID, ref: 'Category'}
  7. });
  8. return PostCategory;
  9. };