diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 20:07:54 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 20:07:54 +0200 |
commit | b0f9f39ed70299a208d1b388c72de8b7f3510cb7 (patch) | |
tree | 4b7d388125265533ac2f6d4bf457d018617e1db6 /server/models/user/user-interface.ts | |
parent | e7dbeae8d915cdf4470ceb51c2724b04148b30b5 (diff) | |
download | PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.gz PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.zst PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.zip |
Begin user quota
Diffstat (limited to 'server/models/user/user-interface.ts')
-rw-r--r-- | server/models/user/user-interface.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/user/user-interface.ts b/server/models/user/user-interface.ts index 0b97a8f6d..8974a9a97 100644 --- a/server/models/user/user-interface.ts +++ b/server/models/user/user-interface.ts | |||
@@ -11,6 +11,7 @@ export namespace UserMethods { | |||
11 | 11 | ||
12 | export type ToFormattedJSON = (this: UserInstance) => FormattedUser | 12 | export type ToFormattedJSON = (this: UserInstance) => FormattedUser |
13 | export type IsAdmin = (this: UserInstance) => boolean | 13 | export type IsAdmin = (this: UserInstance) => boolean |
14 | export type IsAbleToUploadVideo = (this: UserInstance, videoFile: Express.Multer.File) => Promise<boolean> | ||
14 | 15 | ||
15 | export type CountTotal = () => Promise<number> | 16 | export type CountTotal = () => Promise<number> |
16 | 17 | ||
@@ -31,6 +32,7 @@ export interface UserClass { | |||
31 | isPasswordMatch: UserMethods.IsPasswordMatch, | 32 | isPasswordMatch: UserMethods.IsPasswordMatch, |
32 | toFormattedJSON: UserMethods.ToFormattedJSON, | 33 | toFormattedJSON: UserMethods.ToFormattedJSON, |
33 | isAdmin: UserMethods.IsAdmin, | 34 | isAdmin: UserMethods.IsAdmin, |
35 | isAbleToUploadVideo: UserMethods.IsAbleToUploadVideo, | ||
34 | 36 | ||
35 | countTotal: UserMethods.CountTotal, | 37 | countTotal: UserMethods.CountTotal, |
36 | getByUsername: UserMethods.GetByUsername, | 38 | getByUsername: UserMethods.GetByUsername, |
@@ -42,11 +44,13 @@ export interface UserClass { | |||
42 | } | 44 | } |
43 | 45 | ||
44 | export interface UserAttributes { | 46 | export interface UserAttributes { |
47 | id?: number | ||
45 | password: string | 48 | password: string |
46 | username: string | 49 | username: string |
47 | email: string | 50 | email: string |
48 | displayNSFW?: boolean | 51 | displayNSFW?: boolean |
49 | role: UserRole | 52 | role: UserRole |
53 | videoQuota: number | ||
50 | } | 54 | } |
51 | 55 | ||
52 | export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> { | 56 | export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> { |