]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/actor/sql/shared/actor-follow-table-attributes.ts
Support studio transcoding in peertube runner
[github/Chocobozzz/PeerTube.git] / server / models / actor / sql / shared / actor-follow-table-attributes.ts
CommitLineData
eb66ee88
C
1import { Memoize } from '@server/helpers/memoize'
2import { ServerModel } from '@server/models/server/server'
3import { ActorModel } from '../../actor'
4import { ActorFollowModel } from '../../actor-follow'
5import { ActorImageModel } from '../../actor-image'
6
bae61627
C
7export class ActorFollowTableAttributes {
8
eb66ee88 9 @Memoize()
bae61627 10 getFollowAttributes () {
eb66ee88 11 return ActorFollowModel.getSQLAttributes('ActorFollowModel').join(', ')
bae61627
C
12 }
13
eb66ee88 14 @Memoize()
bae61627 15 getActorAttributes (actorTableName: string) {
eb66ee88 16 return ActorModel.getSQLAttributes(actorTableName, `${actorTableName}.`).join(', ')
bae61627
C
17 }
18
eb66ee88 19 @Memoize()
bae61627 20 getServerAttributes (actorTableName: string) {
eb66ee88 21 return ServerModel.getSQLAttributes(`${actorTableName}->Server`, `${actorTableName}.Server.`).join(', ')
bae61627
C
22 }
23
eb66ee88 24 @Memoize()
bae61627 25 getAvatarAttributes (actorTableName: string) {
eb66ee88 26 return ActorImageModel.getSQLAttributes(`${actorTableName}->Avatars`, `${actorTableName}.Avatars.`).join(', ')
bae61627
C
27 }
28}