server/test/datacomputed/schema.py
changeset 9969 0f64ef873f7a
parent 9964 f4a3ee05cf9d
child 9970 671bbfed459b
equal deleted inserted replaced
9968:50f046bf0e50 9969:0f64ef873f7a
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 
    18 
    19 from yams.buildobjs import EntityType, RelationDefinition, ComputedRelation
    19 from yams.buildobjs import EntityType, RelationDefinition, ComputedRelation, Int
    20 
    20 
    21 
    21 
    22 class Employee(EntityType):
    22 class Employee(EntityType):
    23     pass
    23     pass
    24 
    24 
    34 
    34 
    35 
    35 
    36 class Company(EntityType):
    36 class Company(EntityType):
    37     pass
    37     pass
    38 
    38 
    39 
       
    40 class Note(EntityType):
    39 class Note(EntityType):
    41     pass
    40     note = Int()
    42 
    41 
    43 
    42 
    44 class concerns(RelationDefinition):
    43 class concerns(RelationDefinition):
    45     subject = 'Note'
    44     subject = 'Note'
    46     object = 'Employee'
    45     object = 'Employee'