You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
507 B
27 lines
507 B
package datas
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type SysDataAuthorityId struct {
|
|
SysAuthorityAuthorityId string
|
|
DataAuthorityIdAuthorityId string
|
|
}
|
|
|
|
var DataAuthorityId = []SysDataAuthorityId{
|
|
{"888", "888"},
|
|
{"888", "8881"},
|
|
{"888", "9528"},
|
|
{"9528", "8881"},
|
|
{"9528", "9528"},
|
|
}
|
|
|
|
func InitSysDataAuthorityId(db *gorm.DB) (err error) {
|
|
return db.Transaction(func(tx *gorm.DB) error {
|
|
if tx.Create(&DataAuthorityId).Error != nil { // 遇到错误时回滚事务
|
|
return err
|
|
}
|
|
return nil
|
|
})
|
|
}
|