Documentation
¶
Index ¶
- type Auth
- type AuthAccessTokenClaims
- type AuthRefreshTokenClaims
- type AuthToken
- type Badge
- type Category
- type Item
- type ItemCategory
- type ItemCreate
- type ItemFilter
- type ItemUpdate
- type Mail
- type MailCc
- type Notification
- type NotificationTarget
- type Order
- type OrderCreate
- type OrderCustomer
- type OrderCustomerCreate
- type OrderCustomerFilter
- type OrderFee
- type OrderFilter
- type OrderItem
- type OrderStatus
- type OrderUpdate
- type Payment
- type PaymentBankCode
- type PaymentBankType
- type PaymentChannel
- type PaymentStatus
- type Stock
- type StockCreate
- type StockFilter
- type StockUpdate
- type Store
- type StoreBadge
- type StoreBadgeUpdate
- type StoreCreate
- type StoreFilter
- type StoreUpdate
- type User
- type UserCreate
- type UserFilter
- type UserUpdate
- type UserVerifyStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthAccessTokenClaims ¶
type AuthRefreshTokenClaims ¶
type Badge ¶
type Badge struct { Id primitive.ObjectID `json:"id,omitempty" bson:"id,omitempty"` Slug string `json:"slug,omitempty" bson:"slug,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` Icon *string `json:"icon,omitempty" bson:"icon,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
type Item ¶
type Item struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` StoreId string `json:"store_id,omitempty" bson:"store_id,omitempty"` Slug string `json:"slug,omitempty" bson:"slug,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` Price int `json:"price,omitempty" bson:"price,omitempty"` Categories []ItemCategory `json:"categories" bson:"categories"` StockCount *int `json:"stock_count" bson:"stock_count,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
type ItemCategory ¶
type ItemCreate ¶
type ItemCreate struct { StoreId string `validate:"required,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` Name string `validate:"required,min=3" json:"name,omitempty" bson:"name,omitempty"` Description string `validate:"required,min=8" json:"description,omitempty" bson:"description,omitempty"` Categories []ItemCategory `json:"categories,omitempty" bson:"categories,omitempty"` Price int `validate:"required,min=1000" json:"price,omitempty" bson:"price,omitempty"` }
type ItemFilter ¶
type ItemFilter struct { Id string `validate:"omitempty,mongodb" json:"id,omitempty" bson:"_id,omitempty"` StoreId string `validate:"omitempty,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` Slug string `validate:"omitempty,min=3,lowercase" json:"slug,omitempty" bson:"slug,omitempty"` }
type ItemUpdate ¶
type ItemUpdate struct { StoreId string `validate:"omitempty,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` Slug string `validate:"omitempty,min=3,lowercase" json:"slug,omitempty" bson:"slug,omitempty"` Name string `validate:"omitempty,min=3" json:"name,omitempty" bson:"name,omitempty"` Description string `validate:"omitempty,min=8" json:"description,omitempty" bson:"description,omitempty"` Categories []ItemCategory `json:"categories,omitempty" bson:"categories,omitempty"` Price int `validate:"omitempty,min=1000" json:"price,omitempty" bson:"price,omitempty"` }
type Notification ¶
type NotificationTarget ¶
type Order ¶
type Order struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Code string `json:"code,omitempty" bson:"code,omitempty"` StoreId string `json:"store_id,omitempty" bson:"store_id,omitempty"` Items []OrderItem `json:"items,omitempty" bson:"items,omitempty"` PaymentBankType PaymentBankType `json:"payment_bank_type,omitempty" bson:"payment_bank_type,omitempty"` PaymentBankCode PaymentBankCode `json:"payment_bank_code,omitempty" bson:"payment_bank_code,omitempty"` Payment *Payment `json:"payment,omitempty" bson:"payment,omitempty"` Fees []OrderFee `json:"fees,omitempty" bson:"fees,omitempty"` Customer *OrderCustomer `json:"customer,omitempty" bson:"customer,omitempty"` Subtotal int `json:"subtotal,omitempty" bson:"subtotal,omitempty"` Status OrderStatus `json:"status,omitempty" bson:"status,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
type OrderCreate ¶
type OrderCreate struct { StoreId string `validate:"required,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` Items []OrderItem `validate:"required,min=1" json:"items,omitempty" bson:"items,omitempty"` Customer *OrderCustomerCreate `validate:"required" json:"customer,omitempty" bson:"customer,omitempty"` PaymentBankType PaymentBankType `validate:"required" json:"payment_bank_type,omitempty" bson:"payment_bank_type,omitempty"` PaymentBankCode PaymentBankCode `validate:"required" json:"payment_bank_code,omitempty" bson:"payment_bank_code,omitempty"` }
type OrderCustomer ¶
type OrderCustomerCreate ¶
type OrderCustomerFilter ¶
type OrderFilter ¶
type OrderFilter struct { Id string `validate:"omitempty,mongodb" json:"id,omitempty" bson:"_id,omitempty"` Code string `validate:"omitempty" json:"code,omitempty" bson:"code,omitempty"` StoreId string `validate:"omitempty,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` Customer *OrderCustomerFilter `validate:"omitempty" json:"customer,omitempty" bson:"customer,omitempty"` }
type OrderItem ¶
type OrderItem struct { ItemId string `validate:"required,mongodb" json:"item_id,omitempty" bson:"item_id,omitempty"` Name string `validate:"omitempty,min=3" json:"name,omitempty" bson:"name,omitempty"` Price int `validate:"omitempty" json:"price,omitempty" bson:"price,omitempty"` Quantity int `validate:"required,min=1" json:"quantity,omitempty" bson:"quantity,omitempty"` }
type OrderStatus ¶
type OrderStatus string
NOT_CONFIRMED, PENDING, PROCESSED, CANCELLED, FAILED, DONE
type OrderUpdate ¶
type OrderUpdate struct {
Status OrderStatus `json:"status,omitempty" bson:"status,omitempty"`
}
type Payment ¶
type Payment struct { Id string `json:"id,omitempty"` LinkId string `json:"link_id,omitempty"` Status PaymentStatus `json:"status,omitempty"` PaymentChannel *PaymentChannel `json:"payment_channel,omitempty"` }
type PaymentChannel ¶
type PaymentStatus ¶
type PaymentStatus string
NOT_CONFIRMED, PENDING, PROCESSED, CANCELLED, FAILED, DONE
type Stock ¶
type Stock struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` StoreId string `json:"store_id,omitempty" bson:"store_id,omitempty"` ItemId string `json:"item_id,omitempty" bson:"item_id,omitempty"` Separator string `json:"separator,omitempty" bson:"separator,omitempty"` Contents *string `json:"contents" bson:"contents,omitempty"` Count int `json:"count,omitempty" bson:"count,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
type StockCreate ¶
type StockCreate struct { StoreId string `validate:"required,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` ItemId string `validate:"required,mongodb" json:"item_id,omitempty" bson:"item_id,omitempty"` Separator string `validate:"required" json:"separator,omitempty" bson:"separator,omitempty"` Contents string `json:"contents,omitempty" bson:"contents,omitempty"` }
type StockFilter ¶
type StockFilter struct { Id string `json:"id,omitempty" bson:"_id,omitempty"` StoreId string `validate:"omitempty,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` ItemId string `validate:"omitempty,mongodb" json:"item_id,omitempty" bson:"item_id,omitempty"` Separator string `validate:"omitempty" json:"separator,omitempty" bson:"separator,omitempty"` }
type StockUpdate ¶
type StockUpdate struct { StoreId string `validate:"omitempty,mongodb" json:"store_id,omitempty" bson:"store_id,omitempty"` ItemId string `validate:"omitempty,mongodb" json:"item_id,omitempty" bson:"item_id,omitempty"` Separator string `validate:"omitempty" json:"separator,omitempty" bson:"separator,omitempty"` Contents string `json:"contents,omitempty" bson:"contents,omitempty"` }
type Store ¶
type Store struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Slug string `json:"slug,omitempty" bson:"slug"` Name string `json:"name,omitempty" bson:"name"` Description string `json:"description,omitempty" bson:"description"` AuthorID string `json:"author_id,omitempty" bson:"author_id"` Logo string `json:"logo,omitempty" bson:"logo,omitempty"` Banner string `json:"banner,omitempty" bson:"banner,omitempty"` Badges []*StoreBadge `json:"badges" bson:"badges"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at"` UpdatedAt *time.Time `json:"updated_at,omitempty" bson:"updated_at"` }
type StoreBadge ¶
type StoreBadgeUpdate ¶
type StoreBadgeUpdate struct {
BadgeID string `validate:"omitempty,mongodb" json:"badge_id,omitempty" bson:"badge_id"`
}
type StoreCreate ¶
type StoreCreate struct { Slug string `validate:"required,min=3,lowercase" json:"slug,omitempty" bson:"slug"` Name string `validate:"required,min=3" json:"name,omitempty" bson:"name"` Description string `validate:"required,min=8" json:"description,omitempty" bson:"description"` AuthorID string `validate:"required,mongodb" json:"author_id,omitempty" bson:"author_id"` Logo string `validate:"omitempty,url" json:"logo,omitempty" bson:"logo"` Banner string `validate:"omitempty,url" json:"banner,omitempty" bson:"banner"` }
type StoreFilter ¶
type StoreUpdate ¶
type StoreUpdate struct { Slug string `validate:"omitempty,min=3,lowercase" json:"slug,omitempty" bson:"slug"` Name string `validate:"omitempty,min=3" json:"name,omitempty" bson:"name"` Description string `validate:"omitempty,min=8" json:"description,omitempty" bson:"description"` AuthorID string `validate:"omitempty,mongodb" json:"author_id,omitempty" bson:"author_id"` Logo string `validate:"omitempty,url" json:"logo,omitempty" bson:"logo"` Banner string `validate:"omitempty,url" json:"banner,omitempty" bson:"banner"` Badges []StoreBadgeUpdate `json:"badges,omitempty" bson:"badges"` }
type User ¶
type User struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Username string `json:"username,omitempty" bson:"username"` FullName string `json:"full_name,omitempty" bson:"full_name"` Email string `json:"email,omitempty" bson:"email"` Phone *string `json:"phone,omitempty" bson:"phone"` // Role: USER, SELLER, ADMIN Role string `json:"role,omitempty" bson:"role"` VerifyStatus UserVerifyStatus `json:"verify_status,omitempty" bson:"verify_status"` Image *string `json:"image,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
type UserCreate ¶
type UserCreate struct { Username string `validate:"required,min=3" bson:"username,omitempty" json:"username,omitempty"` FullName string `validate:"required,min=3" bson:"full_name,omitempty" json:"full_name,omitempty"` Email string `validate:"required,email" bson:"email,omitempty" json:"email,omitempty"` Phone *string `validate:"omitempty,e164" bson:"phone,omitempty" json:"phone,omitempty"` Image string `validate:"omitempty,url" bson:"image,omitempty" json:"image,omitempty"` VerifyStatus UserVerifyStatus `bson:"verify_status,omitempty" json:"verify_status,omitempty"` }
type UserFilter ¶
type UserFilter struct { Id string `validate:"omitempty,mongodb" bson:"_id,omitempty" json:"id,omitempty"` Username string `validate:"omitempty,min=3" bson:"username,omitempty" json:"username,omitempty"` Email string `validate:"omitempty,email" bson:"email,omitempty" json:"email,omitempty"` Phone string `validate:"omitempty,e164" bson:"phone,omitempty" json:"phone,omitempty"` }
type UserUpdate ¶
type UserUpdate struct { Username string `validate:"omitempty,min=3" bson:"username,omitempty" json:"username,omitempty"` FullName string `validate:"omitempty,min=3" bson:"full_name,omitempty" json:"full_name,omitempty"` Email string `validate:"omitempty,email" bson:"email,omitempty" json:"email,omitempty"` Phone string `validate:"omitempty,e164" bson:"phone,omitempty" json:"phone,omitempty"` Image *string `validate:"omitempty,url" bson:"image,omitempty" json:"image,omitempty"` VerifyStatus UserVerifyStatus `bson:"verify_status,omitempty" json:"verify_status,omitempty"` }
type UserVerifyStatus ¶
Click to show internal directories.
Click to hide internal directories.