package gmodel

import (
	"gorm.io/gorm"
)

// fs_qrcode
type FsQrcode struct {
	Id        int64   `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
	Title     *string `gorm:"default:'';" json:"title"`                        // 名称
	TagId     *int64  `gorm:"index;default:0;" json:"tag_id"`                  // 用户id
	ScanTimes *int64  `gorm:"default:0;" json:"scan_times"`                    // 扫码次数
	CreateAt  *int64  `gorm:"default:0;" json:"create_at"`                     // 添加时间
	Link      *string `gorm:"index;default:'';" json:"link"`                   // 跳转链接
	SvgPath   *string `gorm:"default:'';" json:"svg_path"`                     // svg地址
	Status    *int64  `gorm:"default:1;" json:"status"`                        // 状态:1:正常 0:下架
	ProductId *int64  `gorm:"default:0;" json:"product_id"`                    // 0
}
type FsQrcodeModel struct {
	db   *gorm.DB
	name string
}

func NewFsQrcodeModel(db *gorm.DB) *FsQrcodeModel { return &FsQrcodeModel{db: db, name: "fs_qrcode"} }