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