{
"id": "am.noz.at.spl.defaultSplit",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"schemaVersion",
"name",
"rule",
"createdAt",
"updatedAt"
],
"properties": {
"name": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"maxGraphemes": 80
},
"rule": {
"refs": [
"lex:am.noz.at.spl.defaultSplit#equalSplit",
"lex:am.noz.at.spl.defaultSplit#percentSplit",
"lex:am.noz.at.spl.defaultSplit#sharesSplit"
],
"type": "union",
"closed": true
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"updatedAt": {
"type": "string",
"format": "datetime"
},
"schemaVersion": {
"type": "integer",
"const": 1
}
}
},
"description": "A reusable split rule for a group or recurring expense."
},
"equalSplit": {
"type": "object",
"required": [
"participants"
],
"properties": {
"participants": {
"type": "array",
"items": {
"type": "string",
"format": "did"
},
"maxLength": 250,
"minLength": 1
}
}
},
"sharesSplit": {
"type": "object",
"required": [
"allocations"
],
"properties": {
"allocations": {
"type": "array",
"items": {
"ref": "lex:am.noz.at.spl.defaultSplit#shareAllocation",
"type": "ref"
},
"maxLength": 250,
"minLength": 1
}
}
},
"percentSplit": {
"type": "object",
"required": [
"allocations"
],
"properties": {
"allocations": {
"type": "array",
"items": {
"ref": "lex:am.noz.at.spl.defaultSplit#percentAllocation",
"type": "ref"
},
"maxLength": 250,
"minLength": 1
}
}
},
"shareAllocation": {
"type": "object",
"required": [
"did",
"shares"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"shares": {
"type": "integer",
"maximum": 1000000,
"minimum": 1
}
}
},
"percentAllocation": {
"type": "object",
"required": [
"did",
"partsPerMillion"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"partsPerMillion": {
"type": "integer",
"maximum": 1000000,
"minimum": 0
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}