Move all firbase dependencies from actions layer to firebaseService layer (#13)

This commit is contained in:
Qolzam
2017-10-12 17:47:26 +07:00
parent c82826bdd4
commit 0785c38d42
48 changed files with 1305 additions and 796 deletions

View File

@@ -1,61 +1,69 @@
import { BaseDomain } from 'domain/common'
export class Comment extends BaseDomain {
/**
* Post identifier that comment belong to
*
* Comment identifier
*
* @type {string}
* @memberof Comment
*/
public postId: string
public id?: string | null
/**
* Comment text
*
* @type {string}
* @memberof Comment
*/
public text: string
/**
* Post identifier that comment belong to
*
* @type {string}
* @memberof Comment
*/
public postId: string
/**
* Comment score
*
* @type {number}
* @memberof Comment
*/
public score: number
/**
* Comment text
*
* @type {string}
* @memberof Comment
*/
public text: string
/**
* Comment creation date
*
* @type {number}
* @memberof Comment
*/
public creationDate:number
/**
* Comment score
*
* @type {number}
* @memberof Comment
*/
public score: number
/**
* Comment owner full name
*
* @type {string}
* @memberof Comment
*/
public userDisplayName: string
/**
* Comment creation date
*
* @type {number}
* @memberof Comment
*/
public creationDate: number
/**
* Comment owner avater address
*
* @type {string}
* @memberof Comment
*/
public userAvatar: string
/**
* Comment owner full name
*
* @type {string}
* @memberof Comment
*/
public userDisplayName: string
/**
* Comment owner identifier
*
* @type {string}
* @memberof Comment
*/
public userId: string
}
/**
* Comment owner avater address
*
* @type {string}
* @memberof Comment
*/
public userAvatar: string
/**
* Comment owner identifier
*
* @type {string}
* @memberof Comment
*/
public userId: string
}

View File

@@ -1,45 +1,43 @@
export class SocialError{
constructor(code: string, description: string){
this._code = code
this._description = description
this._isError = true
}
export class SocialError {
/**
* Error code
*
*
* @type {string}
* @memberof SocialError
*/
private _code : string
public get code() : string {
return this._code
}
private _code: string
public get code (): string {
return this._code
}
/**
* Error description
*
* Error message
*
* @type {string}
* @memberof SocialError
*/
private _description : string
public get description() : string {
return this._description
}
private _message: string
public get message (): string {
return this._message
}
/**
* If is error {true} if not {false}
*
*
* @type {Boolean}
* @memberof SocialError
*/
private _isError : Boolean
public get isError() : Boolean {
return this._isError
}
}
private _isError: Boolean
public get isError (): Boolean {
return this._isError
}
constructor (code: string, message: string) {
this._code = code
this._message = message
this._isError = true
}
}

View File

@@ -4,66 +4,66 @@ export class Image extends BaseDomain {
/**
* Image identifier
*
*
* @type {string}
* @memberof Image
*/
public id?: string | null
public id?: string | null
/**
* Image creation date
*
*
* @type {number}
* @memberof Image
*/
public creationDate: number
public creationDate: number
/**
* Image delete date
*
*
* @type {string}
* @memberof Image
*/
public deleteDate: string
public deleteDate: string
/**
* Image URL address
*
*
* @type {string}
* @memberof Image
*/
public URL: string
public URL: string
/**
* Image folder name with image name {folderName/imageName}
*
*
* @type {string}
* @memberof Image
*/
public fullPath: string
public fullPath: string
/**
* Image owner identifier
*
*
* @type {string}
* @memberof Image
*/
public ownerUserId: string
public ownerUserId: string
/**
* Last edit date
*
*
* @type {number}
* @memberof Image
*/
public lastEditDate: number
public lastEditDate: number
/**
* If the image was deleted {true} or not {false}
*
*
* @type {Boolean}
* @memberof Image
*/
public deleted: Boolean
}
public deleted: Boolean
}

View File

@@ -1,45 +1,45 @@
import { BaseDomain } from 'domain/common'
export class Notification extends BaseDomain {
/**
* Description of notification
*
*
* @type {string}
* @memberof Notification
*/
public description: string
public description: string
/**
* The URL which notification refer to
*
*
* @type {string}
* @memberof Notification
*/
public url: string
public url: string
/**
* The identifier of the user who makes the notification
*
*
* @type {string}
* @memberof Notification
*/
public notifierUserId: string
public notifierUserId: string
/**
* The identifier of the user who receive the notification
*
*
* @type {string}
* @memberof Notification
*/
public notifyRecieverUserId: string
public notifyRecieverUserId: string
/**
* If the notification is seen {true} or not {false}
*
*
* @type {Boolean}
* @memberof Notification
*/
public isSeen: Boolean
}
public isSeen: Boolean
}