Migrate actions,reducers and action types to TS #15
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user