门店账户多账号
This commit is contained in:
@@ -109,6 +109,11 @@ export enum PartnerStaffRole {
|
||||
PROMOTER = 'PROMOTER',
|
||||
}
|
||||
|
||||
export enum StoreStaffRole {
|
||||
MANAGER = 'MANAGER',
|
||||
CASHIER = 'CASHIER',
|
||||
}
|
||||
|
||||
export enum CityPartnerScopeType {
|
||||
CITY_WIDE = 'CITY_WIDE',
|
||||
DISTRICT = 'DISTRICT',
|
||||
|
||||
@@ -15,5 +15,6 @@ export * from './partner-log';
|
||||
export * from './promo';
|
||||
export * from './hq-permissions';
|
||||
export * from './partner';
|
||||
export * from './shop';
|
||||
export * from './city-partner';
|
||||
export * from './city-warehouse';
|
||||
|
||||
@@ -63,6 +63,9 @@ export interface PartnerLeaderboardResponse {
|
||||
export interface PartnerStorePhoneAvailableResponse {
|
||||
available: boolean;
|
||||
message?: string;
|
||||
/** 该手机号已是主账号时绑定的门店数;>0 时拓店需二次确认 */
|
||||
existingStoreCount?: number;
|
||||
needConfirm?: boolean;
|
||||
}
|
||||
|
||||
export interface PartnerWeeklyReportPeriod {
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
import type { AccountStatus, StoreStaffRole } from './enums';
|
||||
|
||||
export interface ShopStoreOption {
|
||||
storeId: string;
|
||||
name: string;
|
||||
status: string;
|
||||
district?: string;
|
||||
address?: string;
|
||||
}
|
||||
|
||||
export interface ShopAccountMe {
|
||||
id: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
isPrimary: boolean;
|
||||
staffRole?: StoreStaffRole | null;
|
||||
permissions?: string[];
|
||||
primaryAccountId?: string;
|
||||
hasWechat?: boolean;
|
||||
}
|
||||
|
||||
export interface ShopMe {
|
||||
account: ShopAccountMe;
|
||||
store: ShopStoreOption | null;
|
||||
stores: ShopStoreOption[];
|
||||
/** @deprecated use account + store; kept for older H5 clients during rollout */
|
||||
id?: string;
|
||||
storeId?: string;
|
||||
name?: string;
|
||||
phone?: string;
|
||||
}
|
||||
|
||||
export interface ShopLoginResponse {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
actorType: string;
|
||||
actorId: string;
|
||||
phoneVerified: boolean;
|
||||
account: ShopAccountMe;
|
||||
stores: ShopStoreOption[];
|
||||
store?: ShopStoreOption | null;
|
||||
/** populated after select-store (or auto when single store) */
|
||||
selectedStoreId?: string;
|
||||
}
|
||||
|
||||
export interface SelectShopStoreRequest {
|
||||
storeId: string;
|
||||
}
|
||||
|
||||
export interface ShopStaffItem {
|
||||
id: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
staffRole: StoreStaffRole;
|
||||
permissions?: string[];
|
||||
status: AccountStatus;
|
||||
storeIds: string[];
|
||||
stores: ShopStoreOption[];
|
||||
lastLoginAt?: string;
|
||||
}
|
||||
|
||||
export interface CreateShopStaffRequest {
|
||||
phone: string;
|
||||
name: string;
|
||||
storeIds: string[];
|
||||
staffRole?: StoreStaffRole;
|
||||
permissions?: string[];
|
||||
}
|
||||
|
||||
export interface UpdateShopStaffRequest {
|
||||
name?: string;
|
||||
staffRole?: StoreStaffRole;
|
||||
permissions?: string[];
|
||||
status?: AccountStatus;
|
||||
storeIds?: string[];
|
||||
}
|
||||
|
||||
export const STORE_STAFF_ROLE_LABELS: Record<StoreStaffRole, string> = {
|
||||
MANAGER: '店长',
|
||||
CASHIER: '收银员',
|
||||
};
|
||||
|
||||
/** Default permissions for store sub-accounts (首版). */
|
||||
export const STORE_STAFF_DEFAULT_PERMISSIONS = ['redeem', 'records'] as const;
|
||||
Reference in New Issue
Block a user