2014-06-28 23:07:34 +08:00
|
|
|
package info
|
|
|
|
|
|
|
|
import (
|
2014-09-02 15:45:44 +08:00
|
|
|
"gopkg.in/mgo.v2/bson"
|
2014-06-28 23:07:34 +08:00
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type File struct {
|
|
|
|
FileId bson.ObjectId `bson:"_id,omitempty"` //
|
|
|
|
UserId bson.ObjectId `bson:"UserId"`
|
|
|
|
AlbumId bson.ObjectId `bson:"AlbumId"`
|
|
|
|
Name string `Name` // file name
|
|
|
|
Title string `Title` // file name or user defined for search
|
2014-09-19 17:18:53 +08:00
|
|
|
Size int64 `Size` // file size (byte)
|
|
|
|
Type string `Type` // file type, "" = image, "doc" = word
|
|
|
|
Path string `Path` // the file path
|
2014-06-28 23:07:34 +08:00
|
|
|
IsDefaultAlbum bool `IsDefaultAlbum`
|
|
|
|
CreatedTime time.Time `CreatedTime`
|
2014-09-19 17:18:53 +08:00
|
|
|
|
|
|
|
FromFileId bson.ObjectId `bson:"FromFileId,omitempty"` // copy from fileId, for collaboration
|
2014-06-28 23:07:34 +08:00
|
|
|
}
|