-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
4,882 additions
and
1,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,311 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema", | ||
"$id": "https://raw.githubusercontent.com/farmOS/farmOS.js/main/core_schemata/asset/animal.json", | ||
"title": "Animal asset", | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"format": "uuid" | ||
}, | ||
"type": { | ||
"const": "animal" | ||
}, | ||
"meta": { | ||
"type": "object" | ||
}, | ||
"attributes": { | ||
"description": "Entity attributes", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"title": "Name", | ||
"maxLength": 255, | ||
"description": "The name of the asset." | ||
}, | ||
"status": { | ||
"type": "string", | ||
"title": "Status", | ||
"maxLength": 255, | ||
"description": "Indicates the status of the asset.", | ||
"default": "active" | ||
}, | ||
"archived": { | ||
"type": "string", | ||
"title": "Timestamp", | ||
"format": "date-time", | ||
"description": "The time the asset was archived." | ||
}, | ||
"data": { | ||
"type": "string", | ||
"title": "Data", | ||
"maxLength": 255 | ||
}, | ||
"flag": { | ||
"type": "array", | ||
"title": "Flags", | ||
"description": "Add flags to enable better sorting and filtering of records.", | ||
"items": { | ||
"type": "string", | ||
"title": "Text value" | ||
} | ||
}, | ||
"id_tag": { | ||
"type": "array", | ||
"title": "ID tags", | ||
"description": "List any identification tags that this asset has. Use the fields below to describe the type, location, and ID of each.", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "ID of the tag" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"title": "Type of the tag" | ||
}, | ||
"location": { | ||
"type": "string", | ||
"title": "Location of the tag" | ||
} | ||
} | ||
} | ||
}, | ||
"notes": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "string", | ||
"title": "Text" | ||
}, | ||
"format": { | ||
"type": "string", | ||
"title": "Text format" | ||
} | ||
}, | ||
"required": [ | ||
"value" | ||
], | ||
"title": "Notes" | ||
}, | ||
"geometry": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "string", | ||
"title": "Geometry" | ||
}, | ||
"geo_type": { | ||
"type": "string", | ||
"title": "Geometry Type" | ||
}, | ||
"lat": {}, | ||
"lon": {}, | ||
"left": {}, | ||
"top": {}, | ||
"right": {}, | ||
"bottom": {}, | ||
"geohash": { | ||
"type": "string", | ||
"title": "Geohash" | ||
}, | ||
"latlon": { | ||
"type": "string", | ||
"title": "LatLong Pair" | ||
} | ||
}, | ||
"title": "Current geometry" | ||
}, | ||
"intrinsic_geometry": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "string", | ||
"title": "Geometry" | ||
}, | ||
"geo_type": { | ||
"type": "string", | ||
"title": "Geometry Type" | ||
}, | ||
"lat": {}, | ||
"lon": {}, | ||
"left": {}, | ||
"top": {}, | ||
"right": {}, | ||
"bottom": {}, | ||
"geohash": { | ||
"type": "string", | ||
"title": "Geohash" | ||
}, | ||
"latlon": { | ||
"type": "string", | ||
"title": "LatLong Pair" | ||
} | ||
}, | ||
"title": "Intrinsic geometry", | ||
"description": "Add geometry data to this asset to describe its intrinsic location. This will only be used if the asset is fixed." | ||
}, | ||
"is_location": { | ||
"type": "boolean", | ||
"title": "Is location", | ||
"description": "If this asset is a location, then other assets can be moved to it." | ||
}, | ||
"is_fixed": { | ||
"type": "boolean", | ||
"title": "Is fixed", | ||
"description": "If this asset is fixed, then it can have an intrinsic geometry. If the asset will move around, then it is not fixed and geometry will be determined by movement logs." | ||
}, | ||
"birthdate": { | ||
"type": "string", | ||
"title": "Birthdate", | ||
"format": "date-time" | ||
}, | ||
"is_castrated": { | ||
"type": "boolean", | ||
"title": "Castrated", | ||
"description": "Has this animal been castrated?" | ||
}, | ||
"nickname": { | ||
"type": "array", | ||
"title": "Nicknames", | ||
"description": "List any nicknames of this animal.", | ||
"items": { | ||
"type": "string", | ||
"title": "Text value", | ||
"maxLength": 255 | ||
} | ||
}, | ||
"sex": { | ||
"type": "string", | ||
"title": "Sex", | ||
"enum": [ | ||
"F", | ||
"M" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"status", | ||
"geometry" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"relationships": { | ||
"description": "Entity relationships", | ||
"properties": { | ||
"file": { | ||
"type": "array", | ||
"title": "Files", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "Resource ID", | ||
"format": "uuid", | ||
"maxLength": 128 | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"image": { | ||
"type": "array", | ||
"title": "Images", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "Resource ID", | ||
"format": "uuid", | ||
"maxLength": 128 | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"parent": { | ||
"type": "array", | ||
"title": "Parents", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "Resource ID", | ||
"format": "uuid", | ||
"maxLength": 128 | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"location": { | ||
"type": "array", | ||
"title": "Current location", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "Resource ID", | ||
"format": "uuid", | ||
"maxLength": 128 | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"animal_type": { | ||
"title": "Species/breed", | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "Resource ID", | ||
"format": "uuid", | ||
"maxLength": 128 | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"type": "object", | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
Oops, something went wrong.