// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package models

import (
	"time"
)

const TableNameLibraryProductImage = "library_product_image"

// LibraryProductImage 商品库商品图片
type LibraryProductImage struct {
	ID        uint64    `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true;comment:图片ID" json:"id"`                                               // 图片ID
	ProductID uint64    `gorm:"column:product_id;type:bigint unsigned;not null;index:idx_library_product_image_pid_img,priority:1;comment:商品ID" json:"product_id"` // 商品ID
	ImageURL  string    `gorm:"column:image_url;type:varchar(512);not null;index:idx_library_product_image_pid_img,priority:2;comment:图片地址" json:"image_url"`      // 图片地址
	IsMain    int32     `gorm:"column:is_main;type:int;index:idx_library_product_image_is_main,priority:1;comment:是否主图 1-主图 0-副图" json:"is_main"`                  // 是否主图 1-主图 0-副图
	Seq       int32     `gorm:"column:seq;type:int;default:100;comment:排序值，越小越前面" json:"seq"`                                                                      // 排序值，越小越前面
	Status    int32     `gorm:"column:status;type:int;index:idx_library_product_image_status,priority:1;default:1;comment:状态 1-有效 2-无效" json:"status"`             // 状态 1-有效 2-无效
	CreatedAt time.Time `gorm:"column:created_at;type:datetime;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`                                          // 创建时间
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`                                          // 更新时间
}

// TableName LibraryProductImage's table name
func (*LibraryProductImage) TableName() string {
	return TableNameLibraryProductImage
}
