This repository has been archived by the owner on Nov 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcfe69f
commit 28e31dd
Showing
6 changed files
with
87 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Field, ID, ObjectType } from '@nestjs/graphql' | ||
|
||
@ObjectType() | ||
export class PostItemModel { | ||
@Field(() => ID) | ||
public readonly _id: string | ||
|
||
@Field() | ||
public readonly posterUrl: string | ||
|
||
@Field() | ||
public readonly title: string | ||
|
||
@Field() | ||
public readonly summary: string | ||
|
||
@Field() | ||
public readonly content: string | ||
|
||
@Field(() => [String]) | ||
public readonly tags: string[] | ||
|
||
@Field() | ||
public readonly lastModifiedDate: Date | ||
|
||
@Field() | ||
public readonly like: number | ||
|
||
@Field() | ||
public readonly pv: number | ||
|
||
@Field() | ||
public readonly isPublic: boolean | ||
|
||
@Field() | ||
public readonly createdAt: Date | ||
|
||
@Field() | ||
public readonly updatedAt: Date | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Field, ObjectType } from '@nestjs/graphql' | ||
import { PostItemModel } from './post.model' | ||
|
||
@ObjectType() | ||
export class TagsModel { | ||
@Field(() => [String]) | ||
public readonly tags: string[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters