16 lines
309 B
TypeScript
16 lines
309 B
TypeScript
type CustomerProfile = {
|
|
telegramId: number;
|
|
};
|
|
|
|
export class BaseService {
|
|
protected customer: CustomerProfile;
|
|
|
|
constructor(customer: CustomerProfile) {
|
|
if (!customer?.telegramId) {
|
|
throw new Error('Invalid customer profile: telegramId required');
|
|
}
|
|
|
|
this.customer = customer;
|
|
}
|
|
}
|