A person, i.e., an author, editor or other.
| 9 | |
| 10 | |
| 11 | class Person(BaseModel): |
| 12 | """A person, i.e., an author, editor or other.""" |
| 13 | |
| 14 | name: Annotated[ |
| 15 | str, |
| 16 | OptimadeField( |
| 17 | description="""Full name of the person, REQUIRED.""", |
| 18 | support=SupportLevel.MUST, |
| 19 | queryable=SupportLevel.OPTIONAL, |
| 20 | ), |
| 21 | ] |
| 22 | |
| 23 | firstname: Annotated[ |
| 24 | str | None, |
| 25 | OptimadeField( |
| 26 | description="""First name of the person.""", |
| 27 | support=SupportLevel.OPTIONAL, |
| 28 | queryable=SupportLevel.OPTIONAL, |
| 29 | ), |
| 30 | ] = None |
| 31 | |
| 32 | lastname: Annotated[ |
| 33 | str | None, |
| 34 | OptimadeField( |
| 35 | description="""Last name of the person.""", |
| 36 | support=SupportLevel.OPTIONAL, |
| 37 | queryable=SupportLevel.OPTIONAL, |
| 38 | ), |
| 39 | ] = None |
| 40 | |
| 41 | |
| 42 | class ReferenceResourceAttributes(EntryResourceAttributes): |
nothing calls this directly
no test coverage detected