1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-23 19:19:05 +09:00
misskey/src/models/entities/used-username.ts
2019-07-22 10:15:00 +09:00

21 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;
}
}
}