Skip to content

Commit

Permalink
feat: 事务注解增加数据源选项
Browse files Browse the repository at this point in the history
  • Loading branch information
qile222 committed Jul 24, 2023
1 parent 9e6a6a2 commit cd359f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { ContextProto } from '@eggjs/core-decorator';
import { ContextHello } from '../base/ContextHello';
import { AbstractContextHello } from '../base/AbstractContextHello';
import { ContextHelloType } from '../base/FooType';

@ContextProto()
@ContextHello('WRONG_ENUM')
@ContextHello('WRONG_ENUM' as ContextHelloType)
export class BarContextHello extends AbstractContextHello {
id = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { ContextProto } from '@eggjs/core-decorator';
import { ContextHello } from '../base/ContextHello';
import { ContextHelloType } from '../base/FooType';

@ContextProto()
@ContextHello(ContextHelloType.FOO)
export class BarContextHello {
id = 0;

helloWrong(): string {
return `hello, bar(context:${this.id++})`;
}
}

ContextProto()(BarContextHello)
ContextHello(ContextHelloType.FOO)(BarContextHello as any);

0 comments on commit cd359f1

Please sign in to comment.