This commit is contained in:
tamaina 2021-09-12 22:56:55 +09:00
parent 3d54fb24d5
commit 4dfebbd0fe
1 changed files with 2 additions and 4 deletions

View File

@ -1,14 +1,12 @@
import { EntityRepository, Repository } from 'typeorm';
import { Hashtag } from '@/models/entities/hashtag';
import { SchemaType } from '@/misc/schema';
export type PackedHashtag = SchemaType<typeof packedHashtagSchema>;
import { Packed } from '@/misc/schema';
@EntityRepository(Hashtag)
export class HashtagRepository extends Repository<Hashtag> {
public async pack(
src: Hashtag,
): Promise<PackedHashtag> {
): Promise<Packed<'Hashtag'>> {
return {
tag: src.name,
mentionedUsersCount: src.mentionedUsersCount,