class Person(ApplicationRecord): name = japi.Attribute() age = japi.Attribute() company = japi.BelongsTo() tags = japi.HasMany() pets = japi.HasMany()
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()
class ResponseCode(ApplicationRecord): code = japi.Attribute()
class Admin(ApplicationRecord): name = japi.Attribute()
class Toy(ApplicationRecord): name = japi.Attribute()
class Pet(ApplicationRecord): name = japi.Attribute() toys = japi.HasMany()
class Company(ApplicationRecord): name = japi.Attribute()
class Rating(japi.Model): stars = japi.Attribute()
class State(japi.Model): name = japi.Attribute()
class Author(japi.Model): name = japi.Attribute() state = japi.BelongsTo()
class Comment(japi.Model): text = japi.Attribute() author = japi.BelongsTo()