diff options
| author | Kamen Mladenov <kamen.d.mladenov@protonmail.com> | 2021-04-09 19:55:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-09 19:55:59 +0300 |
| commit | f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3 (patch) | |
| tree | 83b88a773bb7dc053bb3aced35bce302264ec925 /src/models/post.model.ts | |
| parent | bcd88af53b1a920d728ec98b45daa9ac2e2c0917 (diff) | |
| parent | c13889759d70687de6833c505221c203f65fedb8 (diff) | |
| download | DevHive-Angular-f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3.tar DevHive-Angular-f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3.tar.gz DevHive-Angular-f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3.zip | |
Second Stage: Complete
Diffstat (limited to 'src/models/post.model.ts')
| -rw-r--r-- | src/models/post.model.ts | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/models/post.model.ts b/src/models/post.model.ts new file mode 100644 index 0000000..9751c26 --- /dev/null +++ b/src/models/post.model.ts @@ -0,0 +1,90 @@ +import { Guid } from 'guid-typescript'; +import { Comment } from './comment.model'; +import { PostComment } from './post-comment.model'; + +export class Post { + private _postId: Guid; + private _creatorFirstName: string; + private _creatorLastName: string; + private _creatorUsername: string; + private _message: string; + private _timeCreated: Date; + private _comments: PostComment[]; + private _fileURLs: string[]; + private _currentRating: number; + + constructor(postId: Guid, creatorFirstName: string, creatorLastName: string, creatorUsername: string, message: string, timeCreated: Date, comments: PostComment[], fileURLs: string[], currentRating: number) { + this.postId = postId; + this.creatorFirstName = creatorFirstName; + this.creatorLastName = creatorLastName; + this.creatorUsername = creatorUsername; + this.message = message; + this.timeCreated = timeCreated; + this.comments = comments; + this.fileURLs = fileURLs; + this.currentRating = currentRating; + } + + public get postId(): Guid { + return this._postId; + } + public set postId(v: Guid) { + this._postId = v; + } + + public get creatorFirstName(): string { + return this._creatorFirstName; + } + public set creatorFirstName(v: string) { + this._creatorFirstName = v; + } + + public get creatorLastName(): string { + return this._creatorLastName; + } + public set creatorLastName(v: string) { + this._creatorLastName = v; + } + + public get creatorUsername(): string { + return this._creatorUsername; + } + public set creatorUsername(v: string) { + this._creatorUsername = v; + } + + public get message(): string { + return this._message; + } + public set message(v: string) { + this._message = v; + } + + public get timeCreated(): Date { + return this._timeCreated; + } + public set timeCreated(v: Date) { + this._timeCreated = v; + } + + public get comments(): PostComment[] { + return this._comments; + } + public set comments(v: PostComment[]) { + this._comments = v; + } + + public get fileURLs(): string[] { + return this._fileURLs; + } + public set fileURLs(v: string[]) { + this._fileURLs = v; + } + + public get currentRating(): number { + return this._currentRating; + } + public set currentRating(v: number) { + this._currentRating = v; + } +} |
