class SuperPrepend: s: Optional[str] = types.str.prepend('3432') l: Optional[list[str]] = types.listof(str).prepend('7788') cs: Optional[str] = types.str.prepend(lambda: '3432') cl: Optional[list[str]] = types.listof(str).prepend(lambda: '7788') ts: Optional[str] = types.str.prepend(types.default('3432')) tl: Optional[list[str]] = types.listof(str).prepend(types.default('7788'))
class SimpleCode: code: Optional[str] = types.str.length(4) min_code: Optional[str] = types.str.minlength(4) max_code: Optional[str] = types.str.maxlength(8) l_code: Optional[list[int]] = types.listof(int).length(4) l_min_code: Optional[list[int]] = types.listof(int).minlength(4) l_max_code: Optional[list[int]] = types.listof(int).maxlength(8) c_code: Optional[str] = types.str.length(lambda: 4) c_min_code: Optional[str] = types.str.minlength(lambda: 4) c_max_code: Optional[str] = types.str.maxlength(lambda: 8) cl_code: Optional[list[int]] = types.listof(int).length(lambda: 4) cl_min_code: Optional[list[int]] = types.listof(int).minlength(lambda: 4) cl_max_code: Optional[list[int]] = types.listof(int).maxlength(lambda: 8) t_code: Optional[str] = types.str.length(types.default(4)) t_min_code: Optional[str] = types.str.minlength(types.default(4)) t_max_code: Optional[str] = types.str.maxlength(types.default(8)) tl_code: Optional[list[int]] = types.listof(int).length(types.default(4)) tl_min_code: Optional[list[int]] = types.listof(int).minlength( types.default(4)) tl_max_code: Optional[list[int]] = types.listof(int).maxlength( types.default(8)) cd_code: Optional[str] = types.str.length(lambda: 4, lambda: 5) td_code: Optional[str] = types.str.length(types.default(4), types.default(4).add(1))
class LinkedOwner: id: str = types.readonly.str.primary.mongoid.required name: str companies: list[LinkedCompany] = types.listof('LinkedCompany') \ .linkedthru('owners').deny created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class LinkedBomb: id: str = types.readonly.str.primary.mongoid.required name: str soldiers: list[LinkedSoldier] = types.listof('LinkedSoldier') \ .linkedthru('bombs').cascade created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class User: id: int = types.int.primary.required name: str posts: list[Post] = types.nonnull.listof('Post').linkedby('user').required comments: list[Comment] = types.listof('Comment').linkedby('commenter') \ .required updated_at: datetime = types.datetime.tsupdated.required
class SuperInsertAt: s: Optional[str] = types.str.insertat(432, 3) l: Optional[list[str]] = types.listof(str).insertat('E', 1) cs: Optional[str] = types.str.insertat(lambda: 432, lambda: 3) ts: Optional[str] = types.str.insertat(types.default(432), types.default(3))
class MusicUser: id: str = types.readonly.str.primary.mongoid.required name: str music_products: list[MusicUser] = types.listof( MusicProduct).linkto.required created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class LinkedNotebook: id: str = types.readonly.str.primary.mongoid.required name: str notes: list[LinkedNote] = types.listof('LinkedNote').linkedby('notebook') \ .deny created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class LinkedCBuyer: id: str = types.readonly.str.primary.mongoid.required name: str orders: list[LinkedCOrder] = types.listof('LinkedCOrder').linkedby('user')\ .cascade created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class Comment: id: int = types.int.primary content: str post: Post = types.linkto.objof('Post').required parent: Optional[Comment] = types.linkto.objof('Comment') children: List[Comment] = types.listof('Comment').linkedby('parent').required commenter: User = types.linkto.objof('User').required
class HiphopSong: id: str = types.readonly.str.primary.mongoid.required name: str hiphop_singers: list[HiphopSinger] = types.listof( HiphopSinger).linkto.required created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class LinkedCompany: id: str = types.readonly.str.primary.mongoid.required name: str owners: list[LinkedOwner] = types.listof('LinkedOwner') \ .linkedthru('companies').cascade created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class Comment: id: int = types.int.primary.required content: str post: Post = types.linkto.objof('Post').required parent: Optional[Comment] = types.linkto.objof('Comment') children: list[Comment] = types.listof('Comment').linkedby('parent') \ .required commenter: User = types.linkto.objof('User').required updated_at: datetime = types.datetime.tsupdated.required
class IsPrefixOf: s_ipo: Optional[str] = types.str.isprefixof('unhappy') loi_ipo: Optional[list[int]] = types.listof(int).isprefixof( [1, 4, 5, 3, 2, 8]) los_ipo: Optional[list[str]] = types.listof(str).isprefixof( ['a', 'd', 'f', 'g']) c_ipo: Optional[str] = types.str.isprefixof(lambda: 'unhappy') c_loi_ipo: Optional[list[int]] = types.listof(int).isprefixof( lambda: [1, 4, 5, 3, 2, 8]) c_los_ipo: Optional[list[str]] = types.listof(str).isprefixof( lambda: ['a', 'd', 'f', 'g']) t_ipo: Optional[str] = types.str.isprefixof(types.default('unhappy')) t_loi_ipo: Optional[list[int]] = types.listof(int).isprefixof( types.default([1, 4, 5, 3, 2, 8])) t_los_ipo: Optional[list[str]] = types.listof(str).isprefixof( types.default(['a', 'd', 'f', 'g']))
class SuperPrefix: s_hp: Optional[str] = types.str.hasprefix('un') loi_hp: Optional[list[int]] = types.listof(int).hasprefix([1, 4, 5]) los_hp: Optional[list[str]] = types.listof(str).hasprefix(['a', 'd']) c_hp: Optional[str] = types.str.hasprefix(lambda: 'un') c_loi_hp: Optional[list[int]] = types.listof(int).hasprefix( lambda: [1, 4, 5]) c_los_hp: Optional[list[str]] = types.listof(str).hasprefix( lambda: ['a', 'd']) t_hp: Optional[str] = types.str.hasprefix(types.default('un')) t_loi_hp: Optional[list[int]] = types.listof(int).hasprefix( types.default([1, 4, 5])) t_los_hp: Optional[list[str]] = types.listof(str).hasprefix( types.default(['a', 'd'])) cs_hp: Optional[str] = types.str.hasprefix(lambda: 'un') ts_hp: Optional[str] = types.str.hasprefix(types.default('un'))
class SuperIterable: itsrp: Optional[str] = types.str.replace("abc", "ABC") itsr: Optional[str] = types.str.reverse() itl: Optional[list[Any]] = types.listof(types.any).reverse() itssub: Optional[str] = types.str.replacer("[0-9]", "ABC") c_itssub: Optional[str] = types.str.replacer(lambda: "[0-9]", lambda: "ABC") t_itssub: Optional[str] = types.str.replacer(types.default("[0-9]"), types.default("ABC")) itssp: Optional[list[str]] = types.split(".").listof(types.str) c_itssp: Optional[list[str]] = types.split(lambda: '.').listof(types.str) t_itssp: Optional[list[str]] = types.split(types.default('.')).listof( types.str) itsj: Optional[str] = types.join('-').str itsrpc: Optional[str] = types.str.replace(lambda: "abc", lambda: "ABC") itsrpt: Optional[str] = types.str.replace(types.default("abc"), types.default("ABC")) c_itsj: Optional[str] = types.join(lambda: '-') t_itsj: Optional[str] = types.join(types.default('-'))
class SuperSuffix: s_hs: Optional[str] = types.str.hassuffix('python') l_hs: Optional[list[str]] = types.listof(str).hassuffix(['dd', 'ee', 'ff']) c_hs: Optional[str] = types.str.hassuffix(lambda: 'python') c_l_hs: Optional[list[str]] = types.listof(str).hassuffix( lambda: ['dd', 'ee', 'ff']) t_hs: Optional[str] = types.str.hassuffix(types.default('python')) t_l_hs: Optional[list[str]] = types.listof(str).hassuffix( types.default(['dd', 'ee', 'ff'])) s_iso: Optional[str] = types.str.issuffixof('python') l_iso: Optional[list[str]] = types.listof(str).issuffixof(['ee', 'ff']) c_iso: Optional[str] = types.str.issuffixof(lambda: 'python') c_l_iso: Optional[list[str]] = types.listof(str).issuffixof( lambda: ['ee', 'ff']) t_iso: Optional[str] = types.str.issuffixof(types.default('python')) t_l_iso: Optional[list[str]] = types.listof(str).issuffixof( types.default(['ee', 'ff']))
class GSAuthor: id: str name: str paid_user: bool articles: list[GSArticle] = types.listof('GSArticle').linkedby('author') \ .required
class EvUserL: passwords: list[str] = types.listof( types.str.minlength(2).maxlength(4).transform( lambda s: s + '0x0x0x0x'))
class MusicProduct: id: str = types.readonly.str.primary.mongoid.required music_users: list[MusicProduct] = types.listof('MusicUser').linkedby( 'music_products') created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required
class DifficultEncodeLinkedThruB: id: str = types.readonly.str.primary.mongoid.required bval: str alinks: List[DifficultEncodeLinkedThruA] = types.listof( 'DifficultEncodeLinkedThruA').linkedthru('blinks')
class SuperOneOf: const: list[str] = types.listof(str).default(['abc', 'def', 'ghi']).required valconst: str | None = types.str.oneof(['abc', 'def', 'ghi']) valcallable: str | None = types.str.oneof(lambda o: o.const) valtypes: str | None = types.str.oneof(types.this.fval('const'))
class SuperPermissionUser: id: int = types.int.primary.required code: int = types.int.required articles: list[SuperPermissionArticle] = types.listof( 'SuperPermissionArticle').linkedby('user')
class Post: id: int = types.int.primary.required name: str user: User = types.linkto.objof('User').required comments: list[Comment] = types.listof('Comment').linkedby('post').required updated_at: datetime = types.datetime.tsupdated.required
class SuperFilter: list1: list[int] | None = types.listof(int).filter(lambda i: i % 2 == 0) list2: list[int] | None = types.listof(int).filter(types.mod(2).eq(0))
class LKAuthor: id: int = types.int.readonly.primary.default(nextid).required name: str articles: list[LKArticle] = types.listof('LKArticle').linkedby('author')
class SuperWrap: s: list[str] = types.listof(str).wrapintolist
class SuperMap: list1: list[int] | None = types.listof(int).map(lambda i: i + 1) list2: list[int] | None = types.listof(int).map(types.add(1))
class TypedList: name: Optional[str] list: list[int] = types.listof(types.int).required
class TodoListOwner: id: str = types.readonly.str.primary.mongoid.required todo_lists: list[TodoList] = types.listof('TodoList').linkedby( 'todo_list_owner') created_at: datetime = types.readonly.datetime.tscreated.required updated_at: datetime = types.readonly.datetime.tsupdated.required