1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-09 03:13:57 +09:00
cherrypick/packages/backend/src/models/UsedUsername.ts

26 lines
511 B
TypeScript
Raw Normal View History

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