2023-07-27 05:31:52 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2019-07-22 01:15:00 +00:00
|
|
|
import { PrimaryColumn, Entity, Column } from 'typeorm';
|
|
|
|
|
2023-08-16 08:51:28 +00:00
|
|
|
@Entity('used_username')
|
|
|
|
export class MiUsedUsername {
|
2019-07-22 01:15:00 +00:00
|
|
|
@PrimaryColumn('varchar', {
|
|
|
|
length: 128,
|
|
|
|
})
|
|
|
|
public username: string;
|
|
|
|
|
|
|
|
@Column('timestamp with time zone')
|
|
|
|
public createdAt: Date;
|
|
|
|
|
2023-08-16 08:51:28 +00:00
|
|
|
constructor(data: Partial<MiUsedUsername>) {
|
2019-07-22 01:15:00 +00:00
|
|
|
if (data == null) return;
|
|
|
|
|
|
|
|
for (const [k, v] of Object.entries(data)) {
|
|
|
|
(this as any)[k] = v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|