更新后端基础

This commit is contained in:
技术老胡
2026-02-23 11:33:27 +08:00
parent 4a34feec54
commit d29751cce8
75 changed files with 2978 additions and 1489 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace app\common\enums;
/**
* 定时任务日志状态
* 对应表cron_logs.status
* 1 成功 0 失败
*/
class CronLogStatus
{
public const FAIL = 0;
public const SUCCESS = 1;
}

View File

@@ -0,0 +1,23 @@
<?php
namespace app\common\enums;
/**
* 定时任务执行策略misfire_policy
* 对应表cron_jobs.misfire_policy
* 1 循环执行 2 执行一次
*/
class CronMisfirePolicy
{
/**
* 循环执行
*/
public const LOOP = 1;
/**
* 只执行一次
*/
public const RUN_ONCE = 2;
}

View File

@@ -0,0 +1,16 @@
<?php
namespace app\common\enums;
/**
* 定时任务类型
* 对应表cron_jobs.task_type
* 0 cron 表达式 1 时间间隔(秒)
*/
class CronTaskType
{
public const CRON_EXPRESSION = 0;
public const INTERVAL_SECOND = 1;
}

View File

@@ -0,0 +1,28 @@
<?php
namespace app\common\enums;
/**
* 菜单类型枚举
* 对应表menus.type
* 1 目录 2 菜单 3 按钮
*/
class MenuType
{
/**
* 目录
*/
public const DIRECTORY = 1;
/**
* 菜单
*/
public const MENU = 2;
/**
* 按钮(权限点)
*/
public const BUTTON = 3;
}

View File

@@ -0,0 +1,27 @@
<?php
namespace app\common\enums;
/**
* 用户性别枚举
* 对应表users.sex 以及 gender 字典
*/
class UserSex
{
/**
* 女
*/
public const FEMALE = 0;
/**
* 男
*/
public const MALE = 1;
/**
* 未知/其它
*/
public const UNKNOWN = 2;
}