aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user/user-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-04 20:07:54 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-04 20:07:54 +0200
commitb0f9f39ed70299a208d1b388c72de8b7f3510cb7 (patch)
tree4b7d388125265533ac2f6d4bf457d018617e1db6 /server/models/user/user-interface.ts
parente7dbeae8d915cdf4470ceb51c2724b04148b30b5 (diff)
downloadPeerTube-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.ts4
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
44export interface UserAttributes { 46export 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
52export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> { 56export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> {