File

apps/api/src/entities/profile.entity.ts

Index

Properties

Properties

birthday
Type : Date
Decorators :
@Column('date')
id
Type : number
Decorators :
@PrimaryGeneratedColumn('increment')
occupation
Type : string
Decorators :
@Column()
phone
Type : string
Decorators :
@Column()
user
Type : UserEntity
Decorators :
@OneToOne(type => UserEntity)
@JoinColumn()
website
Type : string
Decorators :
@Column()
import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  OneToOne,
  JoinColumn
} from 'typeorm'

import { UserEntity } from './user.entity'

@Entity('profiles')
export class ProfileEntity {
  @PrimaryGeneratedColumn('increment')
  id: number

  @Column()
  phone: string

  @Column('date')
  birthday: Date

  @Column()
  website: string

  @Column()
  occupation: string

  @OneToOne(type => UserEntity)
  @JoinColumn()
  user: UserEntity
}

results matching ""

    No results matching ""