+ static loadByAccountAndVideoOrUrl (accountId: number, videoId: number, url: string, transaction?: Transaction) {
+ const options: FindOptions = {
+ where: {
+ [ Op.or]: [
+ {
+ accountId,
+ videoId
+ },
+ {
+ url
+ }
+ ]
+ }
+ }
+ if (transaction) options.transaction = transaction
+
+ return AccountVideoRateModel.findOne(options)
+ }
+