add order and pay support
This commit is contained in:
1 parent
cfea244d28
commit
2ca68e2559
20 files changed
+490
-118
No files matched your search
@@ -1,21 +1,23 @@
|
||||
import { IService } from '../service';
|
||||
import { IApplication } from '../application';
|
||||
|
||||
export const ORDER_STATE_PENDING = 'Pending';
|
||||
export const ORDER_STATE_PAID = 'Paid';
|
||||
export const ORDER_STATE_EXPIRED = 'Expired';
|
||||
export const ORDER_STATE_FAILED = 'Failed';
|
||||
export enum OrderState {
|
||||
PENDING = 'Pending',
|
||||
PAID = 'Paid',
|
||||
EXPIRED = 'Expired',
|
||||
FAILED = 'Failed'
|
||||
}
|
||||
|
||||
export interface IOrder {
|
||||
id?: string;
|
||||
description?: string;
|
||||
state?: typeof ORDER_STATE_PENDING | typeof ORDER_STATE_PAID | typeof ORDER_STATE_EXPIRED | typeof ORDER_STATE_FAILED;
|
||||
state?: OrderState;
|
||||
price?: number;
|
||||
amount?: number;
|
||||
user_id?: number;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
service?: IService;
|
||||
service_id?: string;
|
||||
application?: IApplication;
|
||||
application_id?: string;
|
||||
wechatpay_url?: string;
|
||||
alipay_url?: string;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ export interface IOrderQuery {
|
||||
user_id?: string;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
ordering: string;
|
||||
}
|
||||
|
||||
class OrderService {
|
||||
|
||||
Reference in new issue
Block a user