diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-06 19:10:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-06 19:10:10 +0900 |
| commit | 03e86ec05216d49f9a1af5dd92f0fa12f2da4825 (patch) | |
| tree | 9257b5d2d0abc626187a9ba9640097bc5624d158 /src/api/models/post.ts | |
| parent | chore(package): update @types/serve-favicon to version 2.2.29 (diff) | |
| parent | Merge pull request #870 from syuilo/greenkeeper/@types/multer-1.3.5 (diff) | |
| download | misskey-03e86ec05216d49f9a1af5dd92f0fa12f2da4825.tar.gz misskey-03e86ec05216d49f9a1af5dd92f0fa12f2da4825.tar.bz2 misskey-03e86ec05216d49f9a1af5dd92f0fa12f2da4825.zip | |
Merge branch 'master' into greenkeeper/@types/serve-favicon-2.2.29
Diffstat (limited to 'src/api/models/post.ts')
| -rw-r--r-- | src/api/models/post.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/api/models/post.ts b/src/api/models/post.ts index baab63f991..7584ce182d 100644 --- a/src/api/models/post.ts +++ b/src/api/models/post.ts @@ -1,3 +1,5 @@ +import * as mongo from 'mongodb'; + import db from '../../db/mongodb'; export default db.get('posts') as any; // fuck type definition @@ -5,3 +7,16 @@ export default db.get('posts') as any; // fuck type definition export function isValidText(text: string): boolean { return text.length <= 1000 && text.trim() != ''; } + +export type IPost = { + _id: mongo.ObjectID; + channel_id: mongo.ObjectID; + created_at: Date; + media_ids: mongo.ObjectID[]; + reply_id: mongo.ObjectID; + repost_id: mongo.ObjectID; + poll: {}; // todo + text: string; + user_id: mongo.ObjectID; + app_id: mongo.ObjectID; +}; |