entity

package
v0.0.0-...-7efc56f Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MonthlyResultKey

func MonthlyResultKey(year int32, month int32) string

Types

type Admin

type Admin struct {
	*user.Admin
}

func NewAdmin

func NewAdmin(a *user.Admin) *Admin

func (*Admin) Role

func (a *Admin) Role() Role

type Admins

type Admins []*Admin

func NewAdmins

func NewAdmins(as []*user.Admin) Admins

type Auth

type Auth struct {
	*user.Auth
}

func NewAuth

func NewAuth(a *user.Auth) *Auth

func (*Auth) Gender

func (a *Auth) Gender() Gender

func (*Auth) Role

func (a *Auth) Role() Role

type Book

type Book struct {
	*book.Book
}

func NewBook

func NewBook(b *book.Book) *Book

func (*Book) AuthorNameKanas

func (b *Book) AuthorNameKanas() []string

func (*Book) AuthorNames

func (b *Book) AuthorNames() []string

type Books

type Books []*Book

func NewBooks

func NewBooks(bs []*book.Book) Books

func (Books) Map

func (bs Books) Map() map[int64]*Book

type Bookshelf

type Bookshelf struct {
	*book.Bookshelf
}

func NewBookshelf

func NewBookshelf(b *book.Bookshelf) *Bookshelf

func (*Bookshelf) Status

func (b *Bookshelf) Status() BookshelfStatus

type BookshelfStatus

type BookshelfStatus int32

BookshelfStatus - 読書ステータス

const (
	BookshelfStatusNone    BookshelfStatus = 0 // 不明なステータス
	BookshelfStatusRead    BookshelfStatus = 1 // 読み終えた本
	BookshelfStatusReading BookshelfStatus = 2 // 読んでいる本
	BookshelfStatusStacked BookshelfStatus = 3 // 積読本
	BookshelfStatusWant    BookshelfStatus = 4 // 読みたい本
	BookshelfStatusRelease BookshelfStatus = 5 // 手放したい本
)

func NewBookshelfStatus

func NewBookshelfStatus(s book.BookshelfStatus) BookshelfStatus

func NewBookshelfStatusByValue

func NewBookshelfStatusByValue(key string) BookshelfStatus

func (BookshelfStatus) Name

func (s BookshelfStatus) Name() string

func (BookshelfStatus) Proto

type Bookshelves

type Bookshelves []*Bookshelf

func NewBookshelves

func NewBookshelves(bs []*book.Bookshelf) Bookshelves

func (Bookshelves) BookIDs

func (bs Bookshelves) BookIDs() []int64

type ChatMessage

type ChatMessage struct {
	*chat.Message
}

func NewChatMessage

func NewChatMessage(cm *chat.Message) *ChatMessage

type ChatRoom

type ChatRoom struct {
	*chat.Room
}

func NewChatRoom

func NewChatRoom(cr *chat.Room) *ChatRoom

type ChatRooms

type ChatRooms []*ChatRoom

func NewChatRooms

func NewChatRooms(crs []*chat.Room) ChatRooms

func (ChatRooms) UserIDs

func (crs ChatRooms) UserIDs() []string

type Follow

type Follow struct {
	*user.Follow
}

func NewFollow

func NewFollow(f *user.Follow) *Follow

type Follower

type Follower struct {
	*user.Follower
}

func NewFollower

func NewFollower(f *user.Follower) *Follower

type Followers

type Followers []*Follower

func NewFollowers

func NewFollowers(fs []*user.Follower) Followers

type Follows

type Follows []*Follow

func NewFollows

func NewFollows(fs []*user.Follow) Follows

type Gender

type Gender int32

Gender - 性別

const (
	GenderUnknown Gender = 0 // 未選択
	GenderMan     Gender = 1 // 男性
	GenderWoman   Gender = 2 // 女性
)

func NewGender

func NewGender(g user.Gender) Gender

func NewGenderByValue

func NewGenderByValue(key string) Gender

func (Gender) Name

func (g Gender) Name() string

func (Gender) Proto

func (g Gender) Proto() user.Gender

type MonthlyResult

type MonthlyResult struct {
	*book.MonthlyResult
}

func NewMonthlyResult

func NewMonthlyResult(r *book.MonthlyResult) *MonthlyResult

type MonthlyResults

type MonthlyResults []*MonthlyResult

func NewMonthlyResults

func NewMonthlyResults(rs []*book.MonthlyResult) MonthlyResults

func (MonthlyResults) Map

func (rs MonthlyResults) Map() map[string]*MonthlyResult

type OrderBy

type OrderBy int32

OrderBy - ソート順

const (
	OrderByAsc  OrderBy = 0 // 昇順
	OrderByDesc OrderBy = 1 // 降順
)

func NewOrderByByValue

func NewOrderByByValue(key string) OrderBy

func (OrderBy) Name

func (o OrderBy) Name() string

func (OrderBy) Proto

func (o OrderBy) Proto() user.OrderBy

type Review

type Review struct {
	*book.Review
}

func NewReview

func NewReview(r *book.Review) *Review

type Reviews

type Reviews []*Review

func NewReviews

func NewReviews(rs []*book.Review) Reviews

func (Reviews) BookIDs

func (rs Reviews) BookIDs() []int64

func (Reviews) UserIDs

func (rs Reviews) UserIDs() []string

type Role

type Role int32

Role - ユーザー権限

const (
	RoleUser      Role = 0 // ユーザー (default)
	RoleAdmin     Role = 1 // 管理者
	RoleDeveloper Role = 2 // 開発者
	RoleOperator  Role = 3 // 運用者
)

func NewRole

func NewRole(r user.Role) Role

func NewRoleByValue

func NewRoleByValue(key string) Role

func (Role) Name

func (r Role) Name() string

func (Role) Proto

func (r Role) Proto() user.Role

type User

type User struct {
	*user.User
}

func NewUser

func NewUser(u *user.User) *User

type UserProfile

type UserProfile struct {
	*user.UserProfile
}

func NewUserProfile

func NewUserProfile(p *user.UserProfile) *UserProfile

type Users

type Users []*User

func NewUsers

func NewUsers(us []*user.User) Users

func (Users) IsExists

func (us Users) IsExists(userIDs ...string) bool

func (Users) Map

func (us Users) Map() map[string]*User

Jump to

Keyboard shortcuts

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