feat: wechat login

This commit is contained in:
ilhamtahir committed 2024-11-18 19:19:58 +08:00
1 parent 3283d94ea4
commit 3cb55e20d5
13 files changed
+181 -12

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { Column, Entity, JoinTable, ManyToOne } from 'typeorm';
import { BaseEntity } from './base.entity';
import { User } from './user.entity';
@Entity()
export class UserBind extends BaseEntity {
@ManyToOne(() => User, (user) => user.binds, {
onDelete: 'CASCADE',
})
@JoinTable({
name: 'user_id',
})
user: User;
@Column()
type: string; // 绑定类型,例如 'wechat', 'email'
@Column()
bindId: string; // 对应绑定表(如 WechatUser)的主键
}