22 lines
		
	
	
		
			377 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			377 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package db
 | |
| 
 | |
| import (
 | |
| 	"context"
 | |
| 
 | |
| 	db "management/internal/db/sqlc"
 | |
| )
 | |
| 
 | |
| func initCategory() (*db.Category, error) {
 | |
| 	arg := db.CreateCategoryParams{
 | |
| 		Name:        "根结点",
 | |
| 		Icon:        "",
 | |
| 		Description: "",
 | |
| 		Letter:      "",
 | |
| 		ParentID:    0,
 | |
| 		ParentPath:  ",0,",
 | |
| 		Status:      0,
 | |
| 		Sort:        6666,
 | |
| 	}
 | |
| 	return db.Engine.CreateCategory(context.Background(), &arg)
 | |
| }
 |