Models - acmucsd-projects/green-team-backend GitHub Wiki

Models

BitByteTree

A tree that represents the network of connections of bits and bytes.

{
	"id": Integer,
	"name": String,
	"points": Integer,
	"root_id": Integer (foreign key to BitByteNode),
	"year": Integer (default as current year)
	"profile_picture_url": String,
	"description": String,
	"nodes": BitByteNode[]
}

BitByteTreeSimple

A tree that represents the network of connections of bits and bytes without any nodes attached to it.

{
	"id": Integer,
	"name": String,
	"points": Integer,
	"root_id": Integer (foreign key to BitByteNode),
	"year": Integer (default as current year)
	"profile_picture_url": String,
	"description": String
}

BitByteNode

An individual node that represents either a bit or a byte. A byte is determined if it has at least one child, and a bit is a node with no children.

{
	"id": Integer,
	"name": String,
	"username": String,
	"major": String,
	"college": String,
	"class_year": Integer,
	"tree_name": String,
	"quarter_joined": String,
	"linkedin": String,
	"facebook": String,
	"instagram": String,
	"profile_url": String,
	"opt_in": Boolean
}