You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
tryFullStack/backend/src/profiles/profile.entity.ts

18 lines
483 B

import { TimestampedEntity } from 'src/common/entities/timestamped.entity';
import { User } from 'src/users/user.entity';
import { Column, Entity, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
export class Profile extends TimestampedEntity {
@PrimaryGeneratedColumn()
id: number;
@Column({ nullable: true })
bio?: string;
@Column({ nullable: true })
avatarUrl?: string;
@OneToOne(() => User, (user) => user.profile)
user: User;
}