models

package
v0.0.0-...-69a2112 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const COLLECTION = "projects"

Variables

This section is empty.

Functions

func Collection

func Collection(d *mgo.Database) *mgo.Collection

func FindRef

func FindRef(d *mgo.Database, ref *mgo.DBRef) *mgo.Query

Types

type Project

type Project struct {
	Id    bson.ObjectId `bson:"_id,omitempty"`
	Name  string        `bson:"name"`
	Users mgo.DBRef     `bson:"users"`
	Todos []mgo.DBRef   `bson:"todos"`
}

type ProjectList

type ProjectList struct {
	Id       bson.ObjectId     `bson:"_id,omitempty"`
	Name     string            `bson:"name"`
	Users    []string          `bson:"users"`
	Projects []ProjectListItem `bson:"projects"`
}

type ProjectListItem

type ProjectListItem struct {
	Id   string `bson:"id"`
	Name string `bson:"name"`
}

type ProjectListResponse

type ProjectListResponse struct {
	Id   string
	Name string
}

func FindProjectListByTeamId

func FindProjectListByTeamId(d *mgo.Database, HexTeamId string) []ProjectListResponse

get project list (API_P001)

type Team

type Team struct {
	Id       bson.ObjectId `bson:"_id,omitempty"`
	Name     string        `bson:"name"`
	Users    []string      `bson:"users"`
	Projects []string      `bson:"projects"`
}

type TeamList

type TeamList struct {
	Id   bson.ObjectId `bson:"_id,omitempty"`
	Name string        `bson:"name"`
}

type TeamListResponse

type TeamListResponse struct {
	Id   string
	Name string
}

func FindTeamList

func FindTeamList(d *mgo.Database) []TeamListResponse

get team list (API_G001)

type Todo

type Todo struct {
	Id       bson.ObjectId `bson:"_id,omitempty"`
	AuthorId string        `bson:"author_id"`
	Title    string        `bson:"title"`
	CDate    string        `bson:"c_date"`
	SSDate   string        `bson:"s_s_date"`
	SFDate   string        `bson:"s_f_date"`
	FDate    string        `bson:"f_date"`
	Finished bool          `bson:"finished"`
}

type TodoListResponse

type TodoListResponse struct {
	Id         string
	AuthorName string
	Title      string
	CDate      string
	SSDate     string
	SFDate     string
	FDate      string
	Finished   string
}

func FindTodoListByProjectId

func FindTodoListByProjectId(d *mgo.Database, projectId string) []TodoListResponse

get todo list (API_T001)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL