Exemple #1
0
class Person(ApplicationRecord):
    name = japi.Attribute()
    age = japi.Attribute()

    company = japi.BelongsTo()
    tags = japi.HasMany()
    pets = japi.HasMany()
Exemple #2
0
class Post(japi.Model):
    site = 'http://test.com'

    basic = True

    title = japi.Attribute()
    body = japi.Attribute()

    creator = japi.BelongsTo(class_name='Author')
    comments = japi.HasMany()
    rating = japi.HasOne()
Exemple #3
0
class ResponseCode(ApplicationRecord):
    code = japi.Attribute()
Exemple #4
0
class Admin(ApplicationRecord):
    name = japi.Attribute()
Exemple #5
0
class Toy(ApplicationRecord):
    name = japi.Attribute()
Exemple #6
0
class Pet(ApplicationRecord):
    name = japi.Attribute()

    toys = japi.HasMany()
Exemple #7
0
class Company(ApplicationRecord):
    name = japi.Attribute()
Exemple #8
0
class Rating(japi.Model):
    stars = japi.Attribute()
Exemple #9
0
class State(japi.Model):
    name = japi.Attribute()
Exemple #10
0
class Author(japi.Model):
    name = japi.Attribute()

    state = japi.BelongsTo()
Exemple #11
0
class Comment(japi.Model):
    text = japi.Attribute()

    author = japi.BelongsTo()