models

package
v0.0.0-...-420119a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2014 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	PerformDate int64
	Detail      string
	SourceAddr  string
}

This struct stores the activity from user

type Item

type Item struct {
	Id            bson.ObjectId `bson:"_id,omitempty"`
	Title         string
	Description   string
	Tags          string // seperated by comma, should be mapped with Tag model in database
	Condition     uint8  // percentage of status after depreciation
	Status        string // ([P]ending / [A]vailable / [H]old / [N]ot available...will be hidden) only avabile when it is posted by registered user
	Duration      int    // list duration. default 7 days
	Location      string // pickup location, free text, can be just district
	Handover      string // ([F]ace / [D]elivery) handover method
	Delivery      string // ([P]ost / [C]ourrier) delivery method if not handover
	ContactMethod string // free text for user
	Contact       string
	Email         string // mandatory. used for sending verification email. updating item status by replying email. contacting with request.
	Owner         uint   // owner ID if it is registered (optional subscription)
	PostDate      int64  // returned by time.Time.Now() unixepoch
	UpdateDate    int64  // returned by time.Time.Now() unixepoch
}

type PrivateMessage

type PrivateMessage struct {
	Owner   uint
	Message string
}

type Request

type Request struct {
	ItemId           uint
	ContactMethod    string
	Contact          string
	Email            string // mandatory for communication between owner and requestor
	ProposedDelivery string // proposed delivery method
	Offer            string // optional if any
}

type Tag

type Tag struct {
	Name string
}

* This class is used for catergorise item

type User

type User struct {
	Email    string // verified email address for logon authentication and contact
	Password string // should be a salted hash string
}

Jump to

Keyboard shortcuts

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