Atualizando backend de usuários para conter informações de contato
This commit is contained in:
42
src/models/SocialInformation.ts
Normal file
42
src/models/SocialInformation.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
JoinColumn,
|
||||
PrimaryColumn,
|
||||
OneToOne,
|
||||
} from 'typeorm';
|
||||
|
||||
import User from './User';
|
||||
|
||||
@Entity('socialInformation')
|
||||
class Social {
|
||||
@PrimaryGeneratedColumn('increment')
|
||||
id_social: string;
|
||||
|
||||
@OneToOne(() => User)
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
user: User;
|
||||
|
||||
@Column()
|
||||
phone: string;
|
||||
|
||||
@Column()
|
||||
whatsapp: string;
|
||||
|
||||
@Column()
|
||||
facebook: string;
|
||||
|
||||
@Column()
|
||||
telegram: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
}
|
||||
|
||||
export default Social;
|
||||
Reference in New Issue
Block a user