first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
from rest_framework import serializers
|
||||
|
||||
from .models import IrrigationMethod
|
||||
|
||||
|
||||
class IrrigationMethodSerializer(serializers.ModelSerializer):
|
||||
"""سریالایزر خروجی / ورودی برای IrrigationMethod."""
|
||||
|
||||
class Meta:
|
||||
model = IrrigationMethod
|
||||
fields = [
|
||||
"id",
|
||||
"name",
|
||||
"category",
|
||||
"description",
|
||||
"water_efficiency_percent",
|
||||
"water_pressure_required",
|
||||
"flow_rate",
|
||||
"coverage_area",
|
||||
"soil_type",
|
||||
"climate_suitability",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
]
|
||||
read_only_fields = ["id", "created_at", "updated_at"]
|
||||
Reference in New Issue
Block a user