package gmodel

import (
	"gorm.io/gorm"
)

// fs_admin_role_api 后台--角色接口表
type FsAdminRoleApi struct {
	Id        int64   `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 序号
	RoleId    *int64  `gorm:"index;default:0;" json:"role_id"`                 // 角色ID
	MenuId    *int64  `gorm:"index;default:0;" json:"menu_id"`                 // 菜单ID
	ApiId     *int64  `gorm:"index;default:0;" json:"api_id"`                  // 接口ID
	ApiPath   *string `gorm:"default:'';" json:"api_path"`                     //
	ApiMethod *int64  `gorm:"default:0;" json:"api_method"`                    // 接口方法
}
type FsAdminRoleApiModel struct {
	db   *gorm.DB
	name string
}

func NewFsAdminRoleApiModel(db *gorm.DB) *FsAdminRoleApiModel {
	return &FsAdminRoleApiModel{db: db, name: "fs_admin_role_api"}
}