From e8fef550d576aa3eba9d51ea70a3beeac6157ba5 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 14 Mar 2021 09:03:03 +0200 Subject: Renamed all models to have proper naming (from model-name.ts to model-name.model.ts), updated includes of services --- src/models/identity/user.model.ts | 100 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 src/models/identity/user.model.ts (limited to 'src/models/identity/user.model.ts') diff --git a/src/models/identity/user.model.ts b/src/models/identity/user.model.ts new file mode 100644 index 0000000..e0038e0 --- /dev/null +++ b/src/models/identity/user.model.ts @@ -0,0 +1,100 @@ +import { Guid } from 'guid-typescript'; +import { Language } from '../language'; +import { Technology } from '../technology'; +import { Friend } from './friend'; +import { Role } from './role'; + +export class User { + private _id : Guid; + private _lastName : string; + private _firstName : string; + private _userName : string; + private _email: string; + private _profilePictureURL : string; + private _languages: Language[]; + private _technologies: Technology[]; + private _roles: Role[]; + private _friends: Friend[]; + + constructor(id: Guid, userName: string, firstName: string, lastName: string, email: string, profilePictureURL: string, languages: Language[], technologies: Technology[], roles: Role[], friends: Friend[]) { + this.id = id; + this.userName = userName; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this._profilePictureURL = profilePictureURL; + this.languages = languages; + this.technologies = technologies; + this.roles = roles; + } + + public get id(): Guid { + return this._id; + } + public set id(v: Guid) { + this._id = v; + } + + public get userName(): string { + return this._userName; + } + public set userName(v: string) { + this._userName = v; + } + + public get firstName(): string { + return this._firstName; + } + public set firstName(v: string) { + this._firstName = v; + } + + public get lastName(): string { + return this._lastName; + } + public set lastName(v: string) { + this._lastName = v; + } + + public get email(): string { + return this._email; + } + public set email(v: string) { + this._email = v; + } + + public get profilePictureURL(): string { + return this._profilePictureURL; + } + public set profilePictureURL(v: string) { + this._profilePictureURL = v; + } + + public get languages(): Language[] { + return this._languages; + } + public set languages(v: Language[]) { + this._languages = v; + } + + public get technologies(): Technology[] { + return this._technologies; + } + public set technologies(v: Technology[]) { + this._technologies = v; + } + + public get roles(): Role[] { + return this._roles; + } + public set roles(v: Role[]) { + this._roles = v; + } + + public get friends(): Friend[] { + return this._friends; + } + public set friends(v: Friend[]) { + this._friends = v; + } +} -- cgit v1.2.3 From e3a8875e64c25a6e46380c4d003beac5953fd3e9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 14 Mar 2021 09:07:01 +0200 Subject: Fixed model imports of post and user models --- src/models/identity/user.model.ts | 8 ++++---- src/models/post.model.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/models/identity/user.model.ts') diff --git a/src/models/identity/user.model.ts b/src/models/identity/user.model.ts index e0038e0..e2f54a4 100644 --- a/src/models/identity/user.model.ts +++ b/src/models/identity/user.model.ts @@ -1,8 +1,8 @@ import { Guid } from 'guid-typescript'; -import { Language } from '../language'; -import { Technology } from '../technology'; -import { Friend } from './friend'; -import { Role } from './role'; +import { Language } from '../language.model'; +import { Technology } from '../technology.model'; +import { Friend } from './friend.model'; +import { Role } from './role.model'; export class User { private _id : Guid; diff --git a/src/models/post.model.ts b/src/models/post.model.ts index 8e58bea..e0fcd5b 100644 --- a/src/models/post.model.ts +++ b/src/models/post.model.ts @@ -1,6 +1,6 @@ import { Guid } from 'guid-typescript'; -import { Comment } from './comment'; -import { PostComment } from './post-comment'; +import { Comment } from './comment.model'; +import { PostComment } from './post-comment.model'; export class Post { private _postId: Guid; -- cgit v1.2.3