Compare commits

..

No commits in common. "aff39f3e31c5dc2ca90b5227250273e24ed5c803" and "57a61daa6695b25a9f40e0f50ab4de0ffad24896" have entirely different histories.

1 changed files with 1 additions and 0 deletions

View File

@ -95,6 +95,7 @@ class BorrowRecordSerializer(CustomModelSerializer):
create_by_name = serializers.CharField(source='create_by.name', read_only=True)
belong_dept_name = serializers.CharField(source='belong_dept.name', read_only=True)
files = serializers.PrimaryKeyRelatedField(queryset=FileRecord.objects.all(), many=True, write_only=True, label="借阅文件")
file_detail = FileRecordSerializer(source='borrow_file', many=True, read_only=True, label="借阅文件详情")
class Meta:
model = BorrowRecord
fields = '__all__'