Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile 99.99% #14

Merged
merged 4 commits into from
Nov 13, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'develop' into develop
  • Loading branch information
sru-thy committed Nov 13, 2021
commit 7268c7a9fe4145552106f5f98c99ddfb0c8e4110
11 changes: 10 additions & 1 deletion src/profile/entities/profile.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,14 @@ export default class Profile {
//connection on posts and profile
@OneToMany(()=>Posts, (post)=>post.profile)
posts:Posts[]

//connection on post and profile
@OneToMany(()=>Comments, (comment)=>comment.profile)
comments:Comments[]

@OneToOne(() => User, user => user.profile) // specify inverse side as a second parameter
user: User;

}
export class ProfileSwagger extends Profile {}
export class ProfileSwagger extends Profile {}

6 changes: 5 additions & 1 deletion src/profile/profile.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ import Profile from './entities/profile.entity';
import Connections from './entities/connections.entity';
import Skills from './entities/skills.entity';
import Experience from './entities/experience.entity';
import Company from '../company/entities/company.entity';
import { Posts } from 'src/posts/entity/post.entity';
import { Comments } from 'src/comments/entities/comment.entity';
import User from 'src/user/entities/user.entity';

@Module({
imports:[ TypeOrmModule.forFeature([ Profile,Connections,Skills,Experience ])],
imports:[ TypeOrmModule.forFeature([ Profile,Connections,Skills,Experience,Company,Posts,Comments,User ])],
controllers: [ProfileController],
providers: [ProfileService]
})
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.