mirror of
https://git.suyu.dev/suyu/website.git
synced 2025-12-30 11:14:39 +01:00
30 lines
483 B
TypeScript
30 lines
483 B
TypeScript
import type { Role } from "$types/db";
|
|
import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
|
|
@Entity()
|
|
export class SuyuUser extends BaseEntity {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column("text")
|
|
username: string;
|
|
|
|
@Column("text")
|
|
displayName: string;
|
|
|
|
@Column("text")
|
|
avatarUrl: string;
|
|
|
|
@Column("json")
|
|
roles: Role[];
|
|
|
|
@Column("text", {
|
|
select: false,
|
|
})
|
|
apiKey: string;
|
|
|
|
@Column("text", {
|
|
select: false,
|
|
})
|
|
email: string;
|
|
}
|