package model import operationPb "kpt-tmr-group/proto/go/backend/operation" type SystemMobilePermissions struct { Id int64 `json:"id,omitempty"` RoleId int64 `json:"role_id"` MobileId int64 `json:"mobile_id"` IsShow operationPb.IsShow_Kind `json:"is_show"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` } func (s *SystemMobilePermissions) TableName() string { return "system_mobile_permissions" } func NewSystemMobilePermissions(roleID int64, mobileIds []uint32) []*SystemMobilePermissions { systemMobilePermissions := make([]*SystemMobilePermissions, len(mobileIds)) for i, v := range mobileIds { systemMobilePermissions[i] = &SystemMobilePermissions{ RoleId: roleID, MobileId: int64(v), IsShow: operationPb.IsShow_OK, } } return systemMobilePermissions }