schema

package
v0.0.0-...-f8e2896 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

ent/schema/casbin_rule.go

ent/schema/role.go

ent/schema/user_role.go

Index

Constants

View Source
const (
	DefaultLanguage = "en"
	DefaultTimezone = "Asia/Shanghai"
)

Variables

View Source
var (
	EmailRegex    = regexp.MustCompile(`^[^\s@]+@[^\s@]+\.[^\s@]+$`) // 基本 email 格式校验
	PhoneRegex    = regexp.MustCompile(`^\+[1-9]\d{1,14}$`)          // E.164 国际手机号格式,例如 +8613812345678
	LanguageRegex = regexp.MustCompile(`^(en|zh|fr|es|de|ja|ko)$`)
)

Functions

func IsValidTimeZone

func IsValidTimeZone(timezone string) error

Types

type CasbinRule

type CasbinRule struct {
	ent.Schema
}

func (CasbinRule) Fields

func (CasbinRule) Fields() []ent.Field

func (CasbinRule) Indexes

func (CasbinRule) Indexes() []ent.Index

type Department

type Department struct{ ent.Schema }

func (Department) Annotations

func (Department) Annotations() []schema.Annotation

func (Department) Edges

func (Department) Edges() []ent.Edge

func (Department) Fields

func (Department) Fields() []ent.Field

func (Department) Indexes

func (Department) Indexes() []ent.Index

type Role

type Role struct {
	ent.Schema
}

func (Role) Annotations

func (Role) Annotations() []schema.Annotation

func (Role) Edges

func (Role) Edges() []ent.Edge

func (Role) Fields

func (Role) Fields() []ent.Field

func (Role) Indexes

func (Role) Indexes() []ent.Index

type Tenant

type Tenant struct{ ent.Schema }

func (Tenant) Annotations

func (Tenant) Annotations() []schema.Annotation

func (Tenant) Edges

func (Tenant) Edges() []ent.Edge

func (Tenant) Fields

func (Tenant) Fields() []ent.Field

func (Tenant) Hooks

func (Tenant) Hooks() []ent.Hook

Hooks 处理租户层级关系

func (Tenant) Indexes

func (Tenant) Indexes() []ent.Index

type User

type User struct {
	ent.Schema
}

User holds the schema definition for the User entity.

func (User) Annotations

func (User) Annotations() []schema.Annotation

func (User) Edges

func (User) Edges() []ent.Edge

Edges of the User.

func (User) Fields

func (User) Fields() []ent.Field

Fields of the SysUser.

func (User) Hooks

func (User) Hooks() []ent.Hook

Hooks of the User.

func (User) Indexes

func (User) Indexes() []ent.Index

type UserAccount

type UserAccount struct {
	ent.Schema
}

UserAccounts holds the schema definition for the UserAccounts entity.

func (UserAccount) Annotations

func (UserAccount) Annotations() []schema.Annotation

func (UserAccount) Edges

func (UserAccount) Edges() []ent.Edge

Edges of the UserAccounts.

func (UserAccount) Fields

func (UserAccount) Fields() []ent.Field

Fields of the UserAccount.

func (UserAccount) Indexes

func (UserAccount) Indexes() []ent.Index

type UserDepartment

type UserDepartment struct{ ent.Schema }

func (UserDepartment) Annotations

func (UserDepartment) Annotations() []schema.Annotation

func (UserDepartment) Edges

func (UserDepartment) Edges() []ent.Edge

func (UserDepartment) Fields

func (UserDepartment) Fields() []ent.Field

func (UserDepartment) Indexes

func (UserDepartment) Indexes() []ent.Index

type UserRole

type UserRole struct {
	ent.Schema
}

func (UserRole) Annotations

func (UserRole) Annotations() []schema.Annotation

func (UserRole) Edges

func (UserRole) Edges() []ent.Edge

func (UserRole) Fields

func (UserRole) Fields() []ent.Field

func (UserRole) Indexes

func (UserRole) Indexes() []ent.Index

type UserTenant

type UserTenant struct{ ent.Schema }

func (UserTenant) Annotations

func (UserTenant) Annotations() []schema.Annotation

func (UserTenant) Edges

func (UserTenant) Edges() []ent.Edge

func (UserTenant) Fields

func (UserTenant) Fields() []ent.Field

func (UserTenant) Indexes

func (UserTenant) Indexes() []ent.Index

Jump to

Keyboard shortcuts

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