1 import { Memoize } from '@server/helpers/memoize'
2 import { AccountModel } from '@server/models/account/account'
3 import { ActorModel } from '@server/models/actor/actor'
4 import { ActorImageModel } from '@server/models/actor/actor-image'
5 import { ServerModel } from '@server/models/server/server'
6 import { VideoCommentModel } from '../../video-comment'
8 export class VideoCommentTableAttributes {
11 getVideoCommentAttributes () {
12 return VideoCommentModel.getSQLAttributes('VideoCommentModel').join(', ')
16 getAccountAttributes () {
17 return AccountModel.getSQLAttributes('Account', 'Account.').join(', ')
21 getVideoAttributes () {
23 `"Video"."id" AS "Video.id"`,
24 `"Video"."uuid" AS "Video.uuid"`,
25 `"Video"."name" AS "Video.name"`
30 getActorAttributes () {
31 return ActorModel.getSQLAPIAttributes('Account->Actor', `Account.Actor.`).join(', ')
35 getServerAttributes () {
36 return ServerModel.getSQLAttributes('Account->Actor->Server', `Account.Actor.Server.`).join(', ')
40 getAvatarAttributes () {
41 return ActorImageModel.getSQLAttributes('Account->Actor->Avatars', 'Account.Actor.Avatars.id').join(', ')