Migrate actions,reducers and action types to TS #15
This commit is contained in:
48
app/domain/circles/circle.ts
Normal file
48
app/domain/circles/circle.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
import { User } from "domain/users";
|
||||
|
||||
export class Circle extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Circle identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public id?: string | null;
|
||||
|
||||
/**
|
||||
* Circle creation date time
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Circle
|
||||
*/
|
||||
public creationDate?: number;
|
||||
|
||||
/**
|
||||
* Circle owner identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Circle
|
||||
*/
|
||||
public ownerId?: string | null;
|
||||
|
||||
/**
|
||||
* Circle name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public name: string;
|
||||
|
||||
/**
|
||||
* The users in a circle
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public users: {[userId:string]: User};
|
||||
|
||||
|
||||
|
||||
}
|
||||
7
app/domain/circles/index.ts
Normal file
7
app/domain/circles/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import {Circle} from './circle';
|
||||
import {UserFollower} from './userFollower';
|
||||
|
||||
export {
|
||||
Circle,
|
||||
UserFollower
|
||||
}
|
||||
40
app/domain/circles/userFollower.ts
Normal file
40
app/domain/circles/userFollower.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class UserFollower extends BaseDomain {
|
||||
|
||||
|
||||
/**
|
||||
* Circle creation date time
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Circle
|
||||
*/
|
||||
public creationDate?: number;
|
||||
|
||||
/**
|
||||
* User full name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UserFollower
|
||||
*/
|
||||
public fullName: string;
|
||||
|
||||
/**
|
||||
* Avatar URL address
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UserFollower
|
||||
*/
|
||||
public avatar: string;
|
||||
|
||||
/**
|
||||
* If following user approved {true} or not {false}
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @memberof UserFollower
|
||||
*/
|
||||
public approved: Boolean;
|
||||
|
||||
|
||||
|
||||
}
|
||||
61
app/domain/comments/comment.ts
Normal file
61
app/domain/comments/comment.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class Comment extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Post identifier that comment belong to
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public postId: string;
|
||||
|
||||
/**
|
||||
* Comment text
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public text: string;
|
||||
|
||||
/**
|
||||
* Comment score
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public score: number;
|
||||
|
||||
/**
|
||||
* Comment creation date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public creationDate:number;
|
||||
|
||||
/**
|
||||
* Comment owner full name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public userDisplayName: string;
|
||||
|
||||
/**
|
||||
* Comment owner avater address
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public userAvatar: string;
|
||||
|
||||
/**
|
||||
* Comment owner identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Comment
|
||||
*/
|
||||
public userId: string;
|
||||
|
||||
}
|
||||
5
app/domain/comments/index.ts
Normal file
5
app/domain/comments/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import {Comment} from './comment';
|
||||
|
||||
export {
|
||||
Comment
|
||||
}
|
||||
69
app/domain/imageGallery/image.ts
Normal file
69
app/domain/imageGallery/image.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class Image extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Image identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Image
|
||||
*/
|
||||
public id?: string | null;
|
||||
|
||||
/**
|
||||
* Image creation date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Image
|
||||
*/
|
||||
public creationDate: number;
|
||||
|
||||
/**
|
||||
* Image delete date
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Image
|
||||
*/
|
||||
public deleteDate: string;
|
||||
|
||||
/**
|
||||
* Image URL address
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Image
|
||||
*/
|
||||
public URL: string;
|
||||
|
||||
/**
|
||||
* Image folder name with image name {folderName/imageName}
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Image
|
||||
*/
|
||||
public fullPath: string;
|
||||
|
||||
/**
|
||||
* Image owner identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Image
|
||||
*/
|
||||
public ownerUserId: string;
|
||||
|
||||
/**
|
||||
* Last edit date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Image
|
||||
*/
|
||||
public lastEditDate: number;
|
||||
|
||||
/**
|
||||
* If the image was deleted {true} or not {false}
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @memberof Image
|
||||
*/
|
||||
public deleted: Boolean;
|
||||
|
||||
}
|
||||
5
app/domain/imageGallery/index.ts
Normal file
5
app/domain/imageGallery/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Image } from "./image";
|
||||
|
||||
export {
|
||||
Image
|
||||
}
|
||||
5
app/domain/notifications/index.ts
Normal file
5
app/domain/notifications/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import {Notification} from './notification';
|
||||
|
||||
export {
|
||||
Notification
|
||||
}
|
||||
45
app/domain/notifications/notification.ts
Normal file
45
app/domain/notifications/notification.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class Notification extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Description of notification
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Notification
|
||||
*/
|
||||
public description: string;
|
||||
|
||||
/**
|
||||
* The URL which notification refer to
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Notification
|
||||
*/
|
||||
public url: string;
|
||||
|
||||
/**
|
||||
* The identifier of the user who makes the notification
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Notification
|
||||
*/
|
||||
public notifierUserId: string;
|
||||
|
||||
/**
|
||||
* The identifier of the user who receive the notification
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Notification
|
||||
*/
|
||||
public notifyRecieverUserId: string;
|
||||
|
||||
/**
|
||||
* If the notification is seen {true} or not {false}
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @memberof Notification
|
||||
*/
|
||||
public isSeen: Boolean;
|
||||
|
||||
}
|
||||
5
app/domain/posts/index.ts
Normal file
5
app/domain/posts/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import {Post} from './post';
|
||||
|
||||
export {
|
||||
Post
|
||||
}
|
||||
158
app/domain/posts/post.ts
Normal file
158
app/domain/posts/post.ts
Normal file
@@ -0,0 +1,158 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class Post extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Post identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public id?: string | null;
|
||||
|
||||
/**
|
||||
* The identifier of post type
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public postTypeId: number;
|
||||
|
||||
/**
|
||||
* The post creation date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public creationDate:number;
|
||||
|
||||
/**
|
||||
* The post delete date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public deleteDate: number;
|
||||
|
||||
/**
|
||||
* The score of post
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public score: number;
|
||||
|
||||
/**
|
||||
* Post view count
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public viewCount: number;
|
||||
|
||||
/**
|
||||
* The text of post
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public body: string;
|
||||
|
||||
/**
|
||||
* The identifier of post owner
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public ownerUserId: string;
|
||||
|
||||
/**
|
||||
* Full name of post owner
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public ownerDisplayName: string;
|
||||
|
||||
/**
|
||||
* Avatar address of post owner
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public ownerAvatar: string;
|
||||
|
||||
/**
|
||||
* Last post edit date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public lastEditDate: number;
|
||||
|
||||
/**
|
||||
* Post tags
|
||||
*
|
||||
* @type {string[]}
|
||||
* @memberof Post
|
||||
*/
|
||||
public tags: string[];
|
||||
|
||||
/**
|
||||
* Numeber of comment on the post
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Post
|
||||
*/
|
||||
public commentCounter: number;
|
||||
|
||||
/**
|
||||
* The address of image on the post
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public image: string;
|
||||
|
||||
/**
|
||||
* Post image full path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public imageFullPath: string;
|
||||
|
||||
/**
|
||||
* The adress of video on the post
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Post
|
||||
*/
|
||||
public video: string;
|
||||
|
||||
/**
|
||||
* If writing comment is disabled {true} or not {false}
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @memberof Post
|
||||
*/
|
||||
public disableComments: Boolean;
|
||||
|
||||
/**
|
||||
* If sharing post is disabled {true} or not {false}
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @memberof Post
|
||||
*/
|
||||
public disableSharing: Boolean;
|
||||
|
||||
/**
|
||||
* If the post is deleted {true} or not false
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @memberof Post
|
||||
*/
|
||||
public deleted: Boolean;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import User from './user';
|
||||
import {User} from './user';
|
||||
import {Profile} from './profile';
|
||||
|
||||
export {
|
||||
User
|
||||
User,
|
||||
Profile
|
||||
}
|
||||
45
app/domain/users/profile.ts
Normal file
45
app/domain/users/profile.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class Profile extends BaseDomain {
|
||||
|
||||
/**
|
||||
* User avatar address
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Profile
|
||||
*/
|
||||
public avatar: string;
|
||||
|
||||
/**
|
||||
* User email
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Profile
|
||||
*/
|
||||
public email: string;
|
||||
|
||||
/**
|
||||
* User full name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Profile
|
||||
*/
|
||||
public fullName: string;
|
||||
|
||||
/**
|
||||
* The banner address of user profile
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Profile
|
||||
*/
|
||||
public banner: string;
|
||||
|
||||
/**
|
||||
* User tag line
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Profile
|
||||
*/
|
||||
public tagLine: string;
|
||||
|
||||
}
|
||||
@@ -1,13 +1,30 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
class User extends BaseDomain {
|
||||
export class User extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Full name of user
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public fullName: string;
|
||||
|
||||
/**
|
||||
* User avatar address
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public avatar: string;
|
||||
|
||||
/**
|
||||
* Email of the user
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public email: string;
|
||||
public email?: string | null;
|
||||
|
||||
/**
|
||||
* Password of the user
|
||||
@@ -15,7 +32,7 @@ class User extends BaseDomain {
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public password: string;
|
||||
public password?: string | null;
|
||||
|
||||
/**
|
||||
* User identifier
|
||||
@@ -23,8 +40,14 @@ class User extends BaseDomain {
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
public userId: string;
|
||||
public userId?: string | null;
|
||||
|
||||
}
|
||||
|
||||
export default User;
|
||||
/**
|
||||
* User creation date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
public creationDate: number;
|
||||
|
||||
}
|
||||
5
app/domain/votes/index.ts
Normal file
5
app/domain/votes/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import {Vote} from './vote';
|
||||
|
||||
export {
|
||||
Vote
|
||||
}
|
||||
53
app/domain/votes/vote.ts
Normal file
53
app/domain/votes/vote.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { BaseDomain } from "domain/common";
|
||||
|
||||
export class Vote extends BaseDomain {
|
||||
|
||||
/**
|
||||
* Vote identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Vote
|
||||
*/
|
||||
public id?: string | null;
|
||||
|
||||
/**
|
||||
* Post identifire which vote on
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Vote
|
||||
*/
|
||||
public postId: string;
|
||||
|
||||
/**
|
||||
* Vote date
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Vote
|
||||
*/
|
||||
public creationDate: number;
|
||||
|
||||
/**
|
||||
* Voter full name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Vote
|
||||
*/
|
||||
public userDisplayName: string;
|
||||
|
||||
/**
|
||||
* Avatar of voter
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Vote
|
||||
*/
|
||||
public userAvatar: string;
|
||||
|
||||
/**
|
||||
* Voter identifier
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Vote
|
||||
*/
|
||||
public userId: string;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user