update. 完成友链以及分类接口
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from ninja import Schema
|
||||
from datetime import datetime
|
||||
from typing import Optional, List
|
||||
|
||||
|
||||
class LinkCategorySchema(Schema):
|
||||
id: int
|
||||
name: str
|
||||
code: str
|
||||
order: int
|
||||
is_active: bool
|
||||
created_at: Optional[datetime] = None
|
||||
|
||||
|
||||
class FriendLinkSchema(Schema):
|
||||
id: int
|
||||
category_id: int
|
||||
name: str
|
||||
url: str
|
||||
order: int
|
||||
is_active: bool
|
||||
created_at: Optional[datetime] = None
|
||||
|
||||
|
||||
class LinkCategoryCreateSchema(Schema):
|
||||
name: str
|
||||
code: str
|
||||
order: int = 0
|
||||
is_active: bool = True
|
||||
|
||||
|
||||
class FriendLinkCreateSchema(Schema):
|
||||
category_id: int
|
||||
name: str
|
||||
url: str
|
||||
order: int = 0
|
||||
is_active: bool = True
|
||||
Reference in New Issue
Block a user