File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11from easy .domain import BaseDomain
2+ from tests .demo_app .models import Event
23
34
45class EventDomain (BaseDomain ):
56 pass
7+
8+
9+ class EventBiz (EventDomain ):
10+ def __init__ (self , model = Event ):
11+ self .model = model
12+ super (EventBiz , self ).__init__ (self .model )
Original file line number Diff line number Diff line change 22
33from django .http import HttpRequest
44
5- from tests .demo_app .models import Event
5+ from tests .demo_app .domain import EventBiz
66
77if TYPE_CHECKING :
88 from ninja_extra .controllers .base import ControllerBase # pragma: no cover
1111
1212
1313class EventService (BaseService ):
14- def __init__ (self , model = Event ):
15- super ().__init__ (model = model )
14+ def __init__ (self , biz = EventBiz () ):
15+ super ().__init__ (biz . model )
1616
1717 @staticmethod
1818 async def prepare_create_event_data (data ):
You can’t perform that action at this time.
0 commit comments