import { Injectable } from '@nestjs/common' ; import { CreateArticleDto } from '../form/create_article.dto' ; import { ArticleEntity } from '../entities/article.entity' ; import { UpdateArticleDto } from '../form/update_article.dto' ; @ Injectable ( ) export class ArticleService { constructor ( ) { } createArticle ( createArticleDto , userId ) { return ArticleEntity . createArticle ( createArticleDto , userId ) ; } updateArticle ( updateArticleDto , userId ) { return ArticleEntity . updateArticle ( updateArticleDto , userId ) ; } deleteArticle ( articleId , userId ) { return ArticleEntity . deleteArticle ( articleId , userId ) ; } getArticle ( userId , articleId , title , secret ? ) { return ArticleEntity . getArticle ( articleId , userId , title , secret ) ; } getList ( page , size , userId , secret ? , categoryId ? , tagId ? , order ? , title ? ) { return ArticleEntity . getList ( page , size , userId , secret , categoryId , tagId , order , title ) ; } search ( title , page , size , userId , secret ? ) { return ArticleEntity . search ( title , page , size , userId , secret ) ; } }