Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Member ¶
type Member struct { ID uint `gorm:"primaryKey;autoIncrement" json:"id"` // 기본 키 MemberNumber string `gorm:"unique;not null" json:"member_number"` // 회원번호 AccountId string `gorm:"unique;not null" json:"account_id"` // 아이디 Password string `gorm:"not null" json:"password"` // 패스워드 (해싱 처리) NickName string `gorm:"not null" json:"nick_name"` // 회원명 Email string `gorm:"unique;not null" json:"email"` // 이메일 CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"` // 가입일 IsAdmin bool `gorm:"default:false" json:"is_admin"` // 관리자 여부 IsWithdrawn bool `gorm:"default:false" json:"is_withdrawn"` // 탈퇴 여부 WithdrawnAt *time.Time `gorm:"index" json:"withdrawn_at,omitempty"` // 탈퇴일 }
func (*Member) AssignPassword ¶
func (*Member) CheckPassword ¶
type Order ¶
type Order struct { ID int `gorm:"primaryKey;autoIncrement" json:"id"` // 기본 키 OrderNumber string `gorm:"unique;not null" json:"order_number"` // 주문번호 OrderDate time.Time `gorm:"not null" json:"order_date"` // 주문일 MemberNumber string `gorm:"not null" json:"member_number"` // 회원번호 ProductNumber string `gorm:"not null" json:"product_number"` // 상품번호 Price int64 `gorm:"not null" json:"price"` // 가격 Quantity int `gorm:"not null" json:"quantity"` // 수량 TotalAmount int64 `gorm:"not null" json:"total_amount"` // 금액 IsCanceled bool `gorm:"default:false" json:"is_canceled"` // 취소여부 CanceledAt *time.Time `json:"canceled_at,omitempty"` // 취소일 }
type Product ¶
type Product struct { ID int `gorm:"primaryKey;autoIncrement" json:"id"` // 기본 키 ProductNumber string `gorm:"unique;not null" json:"product_number"` // 상품번호 ProductName string `gorm:"not null;index:idx_category_product_name" json:"product_name"` // 상품명 Category string `gorm:"index:idx_category_product_name" json:"category"` // 카테고리 Price int64 `gorm:"not null" json:"price"` // 가격 StockQuantity int `gorm:"not null" json:"stock_quantity"` // 재고수량 }
func (*Product) UpdateStock ¶
Click to show internal directories.
Click to hide internal directories.