なんかもうめっちゃ変えた
This commit is contained in:
20
packages/backend/src/models/entities/UsedUsername.ts
Normal file
20
packages/backend/src/models/entities/UsedUsername.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user