lite-ts-activity
TypeScript icon, indicating that this package has built-in type declarations

11.14.1 • Public • Published

Version

代码

ActivityServiceBase - 活动服务

const service: ActivityServiceBase;

// 玩家数值
const res = await service.userValue;

// 关闭时间
const res = await service.closeOn;

// 隐藏时间
const res = await service.hideOn;

// 开启时间
const res = await service.openOn;

// 获取剩余时间
const uow: UnitOfWorkBase;
const res = await service.getRemainTime(uow);
  • ActivityConditionService - 条件
const enumItem: ActivityData;
const time: TimeBase;
const valueService: ValueService;
const factory: ActivityFactoryBase;
const nowTime: NowTimeBase;
const service: ActivityServiceBase = new ActivityConditionService(
    enumItem,
    time,
    valueService,
    factory,
    nowTime,
);
  • ActivityRangeService - 区间
const enumItem: ActivityData;
const time: TimeBase;
const valueService: ValueService;
const factory: ActivityFactoryBase;
const nowTime: NowTimeBase;
const service: ActivityServiceBase = new ActivityRangeService(
    enumItem,
    time,
    valueService,
    factory,
    nowTime,
);

ActivityFactoryBase - 活动工厂

const factory: ActivityFactoryBase;

// 玩家数据
const res = await factory.userEntry;

// 创建服务
const uow: UnitOfWorkBase;
const res = factory.build(uow, 视图编号);
  • ActivityRpcFactory - 基于rpc实现
const pc: RpcBase;
const enumFactory: EnumFactoryBase;
const nowTime: NowTimeBase;
const time: TimeBase;
const valueService: ValueService;
const factory: ActivityFactoryBase = new ActivityRpcFactory(
    rpc,
    enumFactory,
    nowTime,
    time,
    valueService,
    项目编号,
);

Readme

Keywords

Package Sidebar

Install

npm i lite-ts-activity

Weekly Downloads

2

Version

11.14.1

License

GPL-3.0

Unpacked Size

54.5 kB

Total Files

20

Last publish

Collaborators

  • ahl5esoft