添加表单查询和调整表格字段以及功能

This commit is contained in:
Eamon
2026-03-26 15:27:52 +08:00
parent a9e9ddd04b
commit 453d687c4a
28 changed files with 3013 additions and 384 deletions

View File

@@ -1,3 +1,6 @@
import type { Resource } from "./resources"
import type { User } from "./user"
export type Batch = {
id: number
batch_no: string
@@ -8,4 +11,6 @@ export type Batch = {
count: string
resource_id: string
time: string
user?: User
resource?: Resource
}

View File

@@ -1,7 +1,18 @@
import type { Resource } from "./resources"
import type { Trade } from "./trade"
import type { User } from "./user"
export type Billing = {
id: string
bill_no: string
type: number
info: string
amount: number
actual: number
inner_no: string
created_at: Date
updated_at: Date
user: User
resource?: Resource
trade?: Trade
}

View File

@@ -1,3 +1,6 @@
import type { Resource } from "./resources"
import type { User } from "./user"
export type Channel = {
id: number
batch_no: string
@@ -12,4 +15,9 @@ export type Channel = {
created_at: Date
updated_at: Date
expired_at: Date
edge_id: number
edge_ref: string
ip: string
user?: User
resource?: Resource
}

28
src/models/cust.ts Normal file
View File

@@ -0,0 +1,28 @@
export type Cust = {
id: number
admin_id?: number
phone: string
admin?: Admin
has_password: boolean
username: string
email: string
name: string
avatar: string
status: number
balance: number
id_type: number
id_no: string
id_token: string
contact_qq: string
contact_wechat: string
last_login: Date
last_login_host: string
last_login_agent: string
last_login_ip: string
created_at: Date
updated_at: Date
}
export type Admin = {
name: string
password: string
}

View File

@@ -1,8 +1,56 @@
export type Resources = {
import type { ProductSku } from "./product_sku"
import type { User } from "./user"
type ResourceBase = {
id: number
user_id: number
resource_no: string
active: string
type: string
active: boolean
created_at: Date
updated_at: Date
deleted_at: Date | null
user: User
}
type ResourceShort = {
id: number
resource_id: number
type: number
live: number
quota: number
used: number
daily: number
last_at: Date | null
expire_at: Date
sku?: ProductSku
}
type ResourceLong = {
id: number
resource_id: number
type: number
live: number
quota: number
used: number
daily: number
last_at: Date | null
expire_at: Date
sku?: ProductSku
}
export type Resource<T extends 1 | 2 = 1 | 2> = ResourceBase &
(T extends 1
? {
type: 1
short: ResourceShort
}
: T extends 2
? {
type: 2
long: ResourceLong
}
: {})
export type Resources = Resource<1> | Resource<2>
export type ResourcesShort = ResourceShort
export type ResourcesLong = ResourceLong

View File

@@ -1,10 +1,16 @@
import type { User } from "./user"
export type Trade = {
id: number
inner_no: string
method: number
payment: string
platform: number
type: number
subject: string
status: number
created_at: Date
canceled_at: Date
updated_at: Date
user?: User
}

View File

@@ -20,6 +20,7 @@ export type User = {
last_login: Date
last_login_host: string
last_login_agent: string
last_login_ip: string
created_at: Date
updated_at: Date
}