@Table()
export class Post {
@PrimaryGeneratedColumn()
id: number;
@OneToOne(type => Members, member=>member.post)
@JoinColumn({ name: "member_id" })
member: Members;
// this is optional:
// @Column({ type: "int", nullable: true })
// memberId: number;
@Column()
comment:string;
}