Skip to content
Snippets Groups Projects
schema.py 753 B
Newer Older
from yams.buildobjs import EntityType, RelationDefinition

from cubicweb.schema import WorkflowableEntityType

# Worklowable entity type to check the container structure ignores
# workflow-related rtypes.
class Agent(WorkflowableEntityType):
    """An agent (eg. person, group, software or physical artifact)."""


class OnlineAccount(EntityType):
    """An online account"""


class account(RelationDefinition):
    """Indicates an account held by an agent"""
    subject = 'Agent'
    object = 'OnlineAccount'
    cardinality = '*1'
    composite = 'subject'


class Group(EntityType):
    """A collection of individual agents"""


class member(RelationDefinition):
    """Indicates a member of a Group."""
    subject = 'Group'
    object = 'Agent'