feat: Implement draft version of getBillingAndUsage query
This commit is contained in:
@@ -10,6 +10,7 @@ import bcrypt from 'bcrypt';
|
||||
import crypto from 'crypto';
|
||||
import PaymentPlan from './payment-plan.ee';
|
||||
import UsageData from './usage-data.ee';
|
||||
import Subscription from './subscription.ee';
|
||||
|
||||
class User extends Base {
|
||||
id!: string;
|
||||
@@ -26,6 +27,7 @@ class User extends Base {
|
||||
executions?: Execution[];
|
||||
paymentPlan?: PaymentPlan;
|
||||
usageData?: UsageData;
|
||||
subscription?: Subscription;
|
||||
|
||||
static tableName = 'users';
|
||||
|
||||
@@ -99,6 +101,14 @@ class User extends Base {
|
||||
to: 'users.id',
|
||||
},
|
||||
},
|
||||
subscription: {
|
||||
relation: Base.HasOneRelation,
|
||||
modelClass: Subscription,
|
||||
join: {
|
||||
from: 'subscriptions.user_id',
|
||||
to: 'users.id',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
login(password: string) {
|
||||
|
Reference in New Issue
Block a user