]>
Commit | Line | Data |
---|---|---|
eb66ee88 C |
1 | import { logger } from '@server/helpers/logger' |
2 | import { Memoize } from '@server/helpers/memoize' | |
3 | import { ServerModel } from '@server/models/server/server' | |
4 | import { ActorModel } from '../../actor' | |
5 | import { ActorFollowModel } from '../../actor-follow' | |
6 | import { ActorImageModel } from '../../actor-image' | |
7 | ||
bae61627 C |
8 | export class ActorFollowTableAttributes { |
9 | ||
eb66ee88 | 10 | @Memoize() |
bae61627 | 11 | getFollowAttributes () { |
eb66ee88 C |
12 | logger.error('coucou') |
13 | ||
14 | return ActorFollowModel.getSQLAttributes('ActorFollowModel').join(', ') | |
bae61627 C |
15 | } |
16 | ||
eb66ee88 | 17 | @Memoize() |
bae61627 | 18 | getActorAttributes (actorTableName: string) { |
eb66ee88 | 19 | return ActorModel.getSQLAttributes(actorTableName, `${actorTableName}.`).join(', ') |
bae61627 C |
20 | } |
21 | ||
eb66ee88 | 22 | @Memoize() |
bae61627 | 23 | getServerAttributes (actorTableName: string) { |
eb66ee88 | 24 | return ServerModel.getSQLAttributes(`${actorTableName}->Server`, `${actorTableName}.Server.`).join(', ') |
bae61627 C |
25 | } |
26 | ||
eb66ee88 | 27 | @Memoize() |
bae61627 | 28 | getAvatarAttributes (actorTableName: string) { |
eb66ee88 | 29 | return ActorImageModel.getSQLAttributes(`${actorTableName}->Avatars`, `${actorTableName}.Avatars.`).join(', ') |
bae61627 C |
30 | } |
31 | } |