seeds

package
v0.0.0-...-8be382e Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fake *faker.Faker
View Source
var (
	Root, _ = os.Getwd()
)
View Source
var Seeds = struct {
	Categories []struct {
		Name string
		Code string
	}
	Collections []struct {
		Name string
	}
	Colors []struct {
		Name string
		Code string
	}
	Sizes []struct {
		Name string
		Code string
	}
	Materials []struct {
		Name string
		Code string
	}
	Products []struct {
		CategoryName string
		Collections  []struct {
			Name string
		}
		Name          string
		ZhName        string
		NameWithSlug  string
		Code          string
		Price         float32
		Description   string
		ZhDescription string
		MadeCountry   string
		Gender        string
		ZhGender      string
		ZhMadeCountry string

		ColorVariations []struct {
			ColorName string
			ColorCode string
			Images    []struct {
				URL string
			}
		}
		SizeVariations []struct {
			SizeName string
		}
	}
	Stores []struct {
		Name      string
		Phone     string
		Email     string
		Country   string
		Zip       string
		City      string
		Region    string
		Address   string
		Latitude  float64
		Longitude float64
	}
	Setting struct {
		ShippingFee     uint
		GiftWrappingFee uint
		CODFee          uint `gorm:"column:cod_fee"`
		TaxRate         int
		Address         string
		City            string
		Region          string
		Country         string
		Zip             string
		Latitude        float64
		Longitude       float64
	}
	Seo struct {
		SiteName    string
		DefaultPage struct {
			Title       string
			Description string
			Keywords    string
		}
		HomePage struct {
			Title       string
			Description string
			Keywords    string
		}
		ProductPage struct {
			Title       string
			Description string
			Keywords    string
		}
	}
	Enterprises []struct {
		Name           string
		Begins         string
		Expires        string
		RequiresCoupon bool
		Unique         bool

		Coupons []struct {
			Code string
		}
		Rules []struct {
			Kind  string
			Value string
		}
		Benefits []struct {
			Kind  string
			Value string
		}
	}
	Slides []struct {
		Title    string
		SubTitle string
		Button   string
		Link     string
		Image    string
	}
	MediaLibraries []struct {
		Title string
		Image string
	}
	BannerEditorSettings []struct {
		ID    string
		Kind  string
		Value string
	}
	Users []struct {
		Name   string `form:"name"`
		Gender string
		Role   string
		// 身份证号码
		IdentityCardNum string
		// 手机号码
		MobilePhone string
		// 车牌号码
		CarLicencePlateNum string
		// 车型 东风小货
		CarType string
		// 驾照类型 C1
		CarLicenseType string
		// 是否临时工
		IsCasual bool
		// UserType DeliveryMan、SetupMan
		Type      string
		JDAppUser string
		HireDate  *time.Time
	}
}{}

Functions

func CreateAftersales

func CreateAftersales()

func CreateBrands

func CreateBrands()

func CreateRootUser

func CreateRootUser()

CreateRootUser the system should have at least one root user

func CreateServiceTypes

func CreateServiceTypes()

func CreateSources

func CreateSources()

func CreateWorkman

func CreateWorkman()

func Run

func Run()

func TruncateTables

func TruncateTables(tables ...interface{})

TruncateTables Truncate tables

Types

This section is empty.

Jump to

Keyboard shortcuts

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