refactor UserMeta type definitions to deprecate obsolete fields and standardize structure
```
This commit is contained in:
louiscklaw
2025-05-15 11:10:40 +08:00
parent 7f8f8824a7
commit e523f80123

View File

@@ -1,5 +1,38 @@
// src/db/UserMetas/type.d.ts
//
// RULES: sorting direction for user meta lists
import type { BillingAddress } from '@/components/dashboard/user_meta/type.d'; import type { BillingAddress } from '@/components/dashboard/user_meta/type.d';
export interface DBUserMeta {
name: string;
//
// NOTE: obslete "avatar" and use "avatar_file"
avatar?: string;
avatar_file?: string;
//
email: string;
phone: string;
quota: number;
company: string;
//
// billingAddress: BillingAddress[] | [];
expand: { billingAddress?: BillingAddress[] };
// status is obsoleted, replace by state
status: 'pending' | 'active' | 'blocked';
state: 'pending' | 'active' | 'blocked';
//
timezone: string;
language: string;
currency: string;
//
id: string;
created: string;
updated?: string;
collectionId: string;
}
// UserMeta type definitions // UserMeta type definitions
export interface UserMeta { export interface UserMeta {
id: string; id: string;