feat: add backend-mock app

This commit is contained in:
vben
2024-06-30 14:09:44 +08:00
parent c58aa26dbf
commit ca1cad0cd3
71 changed files with 3420 additions and 735 deletions

View File

@@ -0,0 +1,5 @@
class RefreshTokenDto {
refreshToken: string;
}
export { RefreshTokenDto };

View File

@@ -0,0 +1,34 @@
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
class UserEntity {
@PrimaryGeneratedColumn()
id: number;
/**
* 密码
*/
@Column()
password: string;
/**
* 真实姓名
*/
@Column()
realName: string;
/**
* 角色
*/
@Column('text', {
transformer: {
from: (value: string) => JSON.parse(value),
to: (value: string[]) => JSON.stringify(value),
},
})
roles: string[];
/**
* 用户名
*/
@Column({ unique: true })
username: string;
}
export { UserEntity };