1import {Entity, PrimaryGeneratedColumn, Column} from "typeorm";
2
3export class Name {
4 @Column()
5 first: string;
6
7 @Column()
8 last: string;
9}
10
11@Entity()
12export class User {
13 @PrimaryGeneratedColumn()
14 id: string;
15
16 @Column(type => Name)
17 name: Name;
18}