+
+ static listAndCountAccountUrlsByVideoId (rateType: VideoRateType, videoId: number, start: number, count: number, t?: Transaction) {
+ const query = {
+ start,
+ count,
+ where: {
+ videoId,
+ type: rateType
+ },
+ transaction: t,
+ include: [
+ {
+ attributes: [ 'actorId' ],
+ model: AccountModel.unscoped(),
+ required: true,
+ include: [
+ {
+ attributes: [ 'url' ],
+ model: ActorModel.unscoped(),
+ required: true
+ }
+ ]
+ }
+ ]
+ }
+
+ return AccountVideoRateModel.findAndCountAll(query)
+ }