1
This commit is contained in:
+548
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<script type="module" crossorigin src="/assets/index-C4H6x_-U.js"></script>
|
<script type="module" crossorigin src="/assets/index-BkihHMzy.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ const creditSubjectOptions = [
|
|||||||
{ value: 'analysis', label: '分析积分' },
|
{ value: 'analysis', label: '分析积分' },
|
||||||
{ value: 'split', label: '切片积分' },
|
{ value: 'split', label: '切片积分' },
|
||||||
{ value: 'admin_adjust', label: '管理员调整' },
|
{ value: 'admin_adjust', label: '管理员调整' },
|
||||||
|
{ value: 'team_internal', label: '团队内部转移' },
|
||||||
{ value: 'recharge', label: '充值积分' },
|
{ value: 'recharge', label: '充值积分' },
|
||||||
{ value: 'unknown', label: '历史未知' },
|
{ value: 'unknown', label: '历史未知' },
|
||||||
];
|
];
|
||||||
@@ -81,6 +82,7 @@ const chargeKindOptions = [
|
|||||||
{ value: 'video_analysis', label: '视频分析' },
|
{ value: 'video_analysis', label: '视频分析' },
|
||||||
{ value: 'video_split', label: '视频切片' },
|
{ value: 'video_split', label: '视频切片' },
|
||||||
{ value: 'admin_adjust', label: '管理员调整' },
|
{ value: 'admin_adjust', label: '管理员调整' },
|
||||||
|
{ value: 'team_internal', label: '团队内部转移' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const sourceModuleOptions = [
|
const sourceModuleOptions = [
|
||||||
@@ -91,6 +93,7 @@ const sourceModuleOptions = [
|
|||||||
{ value: 'shot_replicate', label: '拆镜复刻' },
|
{ value: 'shot_replicate', label: '拆镜复刻' },
|
||||||
{ value: 'admin', label: '后台管理' },
|
{ value: 'admin', label: '后台管理' },
|
||||||
{ value: 'payment', label: '支付充值' },
|
{ value: 'payment', label: '支付充值' },
|
||||||
|
{ value: 'team', label: '团队管理' },
|
||||||
{ value: 'unknown', label: '历史未知' },
|
{ value: 'unknown', label: '历史未知' },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -129,6 +132,7 @@ const billingSceneOptions = [
|
|||||||
{ value: 'recharge', label: '充值' },
|
{ value: 'recharge', label: '充值' },
|
||||||
{ value: 'admin_adjust', label: '管理员调整' },
|
{ value: 'admin_adjust', label: '管理员调整' },
|
||||||
{ value: 'refund', label: '回退' },
|
{ value: 'refund', label: '回退' },
|
||||||
|
{ value: 'team_internal_transfer', label: '团队内部转账' },
|
||||||
{ value: 'unknown', label: '历史未知' },
|
{ value: 'unknown', label: '历史未知' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class CreditRecordChargeKind(str, Enum):
|
|||||||
RECHARGE = "recharge"
|
RECHARGE = "recharge"
|
||||||
REFUND = "refund"
|
REFUND = "refund"
|
||||||
ADMIN_ADJUST = "admin_adjust"
|
ADMIN_ADJUST = "admin_adjust"
|
||||||
|
TEAM_INTERNAL = "team_internal"
|
||||||
UNKNOWN = "unknown"
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
|
|
||||||
@@ -43,6 +44,7 @@ class CreditRecordSubject(str, Enum):
|
|||||||
RECHARGE = "recharge"
|
RECHARGE = "recharge"
|
||||||
REFUND = "refund"
|
REFUND = "refund"
|
||||||
ADMIN_ADJUST = "admin_adjust"
|
ADMIN_ADJUST = "admin_adjust"
|
||||||
|
TEAM_INTERNAL = "team_internal"
|
||||||
UNKNOWN = "unknown"
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
|
|
||||||
@@ -63,6 +65,7 @@ class CreditRecordSourceModule(str, Enum):
|
|||||||
SHOT_REPLICATE = "shot_replicate"
|
SHOT_REPLICATE = "shot_replicate"
|
||||||
PAYMENT = "payment"
|
PAYMENT = "payment"
|
||||||
ADMIN = "admin"
|
ADMIN = "admin"
|
||||||
|
TEAM = "team"
|
||||||
UNKNOWN = "unknown"
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
|
|
||||||
@@ -105,6 +108,7 @@ class CreditRecordBillingScene(str, Enum):
|
|||||||
RECHARGE = "recharge"
|
RECHARGE = "recharge"
|
||||||
ADMIN_ADJUST = "admin_adjust"
|
ADMIN_ADJUST = "admin_adjust"
|
||||||
REFUND = "refund"
|
REFUND = "refund"
|
||||||
|
TEAM_INTERNAL_TRANSFER = "team_internal_transfer"
|
||||||
UNKNOWN = "unknown"
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
|
|
||||||
@@ -124,6 +128,7 @@ CREDIT_RECORD_SUBJECT_LABELS = {
|
|||||||
CreditRecordSubject.RECHARGE.value: "充值积分",
|
CreditRecordSubject.RECHARGE.value: "充值积分",
|
||||||
CreditRecordSubject.REFUND.value: "回退积分",
|
CreditRecordSubject.REFUND.value: "回退积分",
|
||||||
CreditRecordSubject.ADMIN_ADJUST.value: "管理员调整",
|
CreditRecordSubject.ADMIN_ADJUST.value: "管理员调整",
|
||||||
|
CreditRecordSubject.TEAM_INTERNAL.value: "团队内部转移",
|
||||||
CreditRecordSubject.UNKNOWN.value: "历史未知",
|
CreditRecordSubject.UNKNOWN.value: "历史未知",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,6 +143,7 @@ CREDIT_RECORD_CHARGE_KIND_LABELS = {
|
|||||||
CreditRecordChargeKind.RECHARGE.value: "充值",
|
CreditRecordChargeKind.RECHARGE.value: "充值",
|
||||||
CreditRecordChargeKind.REFUND.value: "回退",
|
CreditRecordChargeKind.REFUND.value: "回退",
|
||||||
CreditRecordChargeKind.ADMIN_ADJUST.value: "管理员调整",
|
CreditRecordChargeKind.ADMIN_ADJUST.value: "管理员调整",
|
||||||
|
CreditRecordChargeKind.TEAM_INTERNAL.value: "团队内部转移",
|
||||||
CreditRecordChargeKind.UNKNOWN.value: "历史未知",
|
CreditRecordChargeKind.UNKNOWN.value: "历史未知",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,6 +159,7 @@ CREDIT_RECORD_SOURCE_MODULE_LABELS = {
|
|||||||
CreditRecordSourceModule.SHOT_REPLICATE.value: "拆镜复刻",
|
CreditRecordSourceModule.SHOT_REPLICATE.value: "拆镜复刻",
|
||||||
CreditRecordSourceModule.PAYMENT.value: "支付充值",
|
CreditRecordSourceModule.PAYMENT.value: "支付充值",
|
||||||
CreditRecordSourceModule.ADMIN.value: "后台管理",
|
CreditRecordSourceModule.ADMIN.value: "后台管理",
|
||||||
|
CreditRecordSourceModule.TEAM.value: "团队管理",
|
||||||
CreditRecordSourceModule.UNKNOWN.value: "历史未知",
|
CreditRecordSourceModule.UNKNOWN.value: "历史未知",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,5 +198,6 @@ CREDIT_RECORD_BILLING_SCENE_LABELS = {
|
|||||||
CreditRecordBillingScene.RECHARGE.value: "充值",
|
CreditRecordBillingScene.RECHARGE.value: "充值",
|
||||||
CreditRecordBillingScene.ADMIN_ADJUST.value: "管理员调整",
|
CreditRecordBillingScene.ADMIN_ADJUST.value: "管理员调整",
|
||||||
CreditRecordBillingScene.REFUND.value: "回退",
|
CreditRecordBillingScene.REFUND.value: "回退",
|
||||||
|
CreditRecordBillingScene.TEAM_INTERNAL_TRANSFER.value: "团队内部转账",
|
||||||
CreditRecordBillingScene.UNKNOWN.value: "历史未知",
|
CreditRecordBillingScene.UNKNOWN.value: "历史未知",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ from fastapi import HTTPException
|
|||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
|
from app.enums.credit_record import (
|
||||||
|
CreditRecordBillingScene,
|
||||||
|
CreditRecordChargeKind,
|
||||||
|
CreditRecordSubject,
|
||||||
|
CreditRecordSourceModule,
|
||||||
|
)
|
||||||
from app.enums.team import TeamStatus
|
from app.enums.team import TeamStatus
|
||||||
from app.enums.user import UserType
|
from app.enums.user import UserType
|
||||||
from app.models.team import Team
|
from app.models.team import Team
|
||||||
@@ -185,10 +191,10 @@ async def transfer_credits_to_member(
|
|||||||
meta = CreditRecordMeta(
|
meta = CreditRecordMeta(
|
||||||
owner_type="team_internal_transfer",
|
owner_type="team_internal_transfer",
|
||||||
owner_id=xfer_id,
|
owner_id=xfer_id,
|
||||||
charge_kind="team_internal",
|
charge_kind=CreditRecordChargeKind.TEAM_INTERNAL.value,
|
||||||
credit_subject="team_internal",
|
credit_subject=CreditRecordSubject.TEAM_INTERNAL.value,
|
||||||
source_module="team",
|
source_module=CreditRecordSourceModule.TEAM.value,
|
||||||
billing_scene="team_internal_transfer",
|
billing_scene=CreditRecordBillingScene.TEAM_INTERNAL_TRANSFER.value,
|
||||||
)
|
)
|
||||||
return meta
|
return meta
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user