mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 12:57:31 -07:00
14148f6c4a
Resolve #7779
20 lines
388 B
TypeScript
20 lines
388 B
TypeScript
import { PrimaryColumn, Entity, Column } from 'typeorm';
|
|
|
|
@Entity()
|
|
export class UsedUsername {
|
|
@PrimaryColumn('varchar', {
|
|
length: 128,
|
|
})
|
|
public username: string;
|
|
|
|
@Column('timestamp with time zone')
|
|
public createdAt: Date;
|
|
|
|
constructor(data: Partial<UsedUsername>) {
|
|
if (data == null) return;
|
|
|
|
for (const [k, v] of Object.entries(data)) {
|
|
(this as any)[k] = v;
|
|
}
|
|
}
|
|
}
|