初始化本地仓库

This commit is contained in:
2026-08-31 11:33:59 +08:00
commit 663f74b633
2390 changed files with 402918 additions and 0 deletions
@@ -0,0 +1,99 @@
<?php
declare(strict_types=1);
/**
*+------------------
* madong
*+------------------
* Copyright (c) https://gitee.com/motion-code All rights reserved.
*+------------------
* Author: Mr. April (405784684@qq.com)
*+------------------
* Official Website: http://www.madong.tech
*/
namespace app\adminapi\schema\request\org;
use app\schema\request\BaseFormRequest;
use OpenApi\Attributes as OA;
use WebmanTech\DTO\Attributes\ValidationRules;
#[OA\Schema(
title: '部门表单',
description: '部门创建和编辑接口共用的表单请求参数'
)]
class DeptFormRequest extends BaseFormRequest
{
#[OA\Property(
description: '部门ID',
type: 'string',
example: '1',
nullable: false
)]
#[ValidationRules(rules: 'required|string')]
public string|int|null $id;
#[OA\Property(
description: '父部门ID',
type: 'string',
example: '0',
nullable: false
)]
#[ValidationRules(rules: 'required|string')]
public string $parent_id;
#[OA\Property(
description: '部门名称',
type: 'string',
example: '开发部',
nullable: false
)]
#[ValidationRules(rules: 'required|string|max:50|unique:sys_dept,name,' . 'id' . ',id')]
public string $name;
#[OA\Property(
description: '部门编码',
type: 'string',
example: 'dev',
nullable: false
)]
#[ValidationRules(rules: 'required|string|max:50|alpha_dash|unique:sys_dept,code,' . 'id' . ',id')]
public string $code;
#[OA\Property(
description: '部门领导ID列表',
type: 'array',
items: new OA\Items(type: 'integer'),
example: [1, 2],
nullable: true
)]
#[ValidationRules(rules: 'array|nullable')]
public ?array $leader_id_list = null;
#[OA\Property(
description: '联系电话',
type: 'string',
example: '13800138000',
nullable: true
)]
#[ValidationRules(rules: 'phone|nullable')]
public ?string $phone = null;
#[OA\Property(
description: '状态(0:禁用,1:启用)',
type: 'integer',
enum: [0, 1],
example: 1,
nullable: false
)]
#[ValidationRules(rules: 'required|in:0,1')]
public int $enabled;
#[OA\Property(
description: '排序号',
type: 'integer',
example: 100,
nullable: false
)]
#[ValidationRules(rules: 'required|integer|min:0|max:999')]
public int $sort;
}
@@ -0,0 +1,72 @@
<?php
declare(strict_types=1);
/**
*+------------------
* madong
*+------------------
* Copyright (c) https://gitee.com/motion-code All rights reserved.
*+------------------
* Author: Mr. April (405784684@qq.com)
*+------------------
* Official Website: https://madong.tech
*/
namespace app\adminapi\schema\request\org;
use app\schema\request\BaseQueryRequest;
use OpenApi\Attributes as OA;
use WebmanTech\DTO\Attributes\ValidationRules;
#[OA\Schema(
title: '部门列表查询请求',
description: '部门列表接口的查询过滤参数'
)]
class DeptQueryRequest extends BaseQueryRequest
{
#[OA\Property(
description: '部门编码',
type: 'string',
example: 'dev',
nullable: true
)]
#[ValidationRules(rules: 'string|max:50|nullable')]
public ?string $code = null;
#[OA\Property(
description: '部门名称',
type: 'string',
example: '开发部',
nullable: true
)]
#[ValidationRules(rules: 'string|max:50|nullable')]
public ?string $name = null;
#[OA\Property(
description: '状态(0:禁用,1:启用)',
type: 'integer',
enum: [0, 1],
example: 1,
nullable: true
)]
#[ValidationRules(rules: 'in:0,1|nullable')]
public ?int $enabled = null;
#[OA\Property(
description: '排序字段',
type: 'string',
default: 'sort asc',
example: 'sort asc'
)]
#[ValidationRules(rules: 'string|nullable')]
public ?string $order = null;
#[OA\Property(
description: '返回数据格式(normal|tree|select)',
type: 'string',
default: 'normal',
enum: ['normal', 'tree', 'select'],
example: 'normal'
)]
#[ValidationRules(rules: 'in:normal,tree,select|nullable')]
public ?string $format = null;
}
@@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
/**
*+------------------
* madong
*+------------------
* Copyright (c) https://gitee.com/motion-code All rights reserved.
*+------------------
* Author: Mr. April (405784684@qq.com)
*+------------------
* Official Website: http://www.madong.tech
*/
namespace app\adminapi\schema\request\org;
use app\schema\request\BaseFormRequest;
use OpenApi\Attributes as OA;
use WebmanTech\DTO\Attributes\ValidationRules;
#[OA\Schema(
title: '岗位表单',
description: '岗位创建和编辑接口共用的表单请求参数'
)]
class PostFormRequest extends BaseFormRequest
{
#[OA\Property(
property: 'dept_id',
description: '部门ID',
type: 'string',
example: '246996721795072000',
nullable: false
)]
#[ValidationRules(rules: 'required|string')]
public string $dept_id;
#[OA\Property(
property: 'code',
description: '岗位编码',
type: 'string',
example: 'SDF',
nullable: false
)]
#[ValidationRules(rules: 'required|string|max:30|unique:sys_post,code')]
public string $code;
#[OA\Property(
property: 'name',
description: '岗位名称',
type: 'string',
example: 'AD',
nullable: false
)]
#[ValidationRules(rules: 'required|string|max:50')]
public string $name;
#[OA\Property(
property: 'sort',
description: '排序号',
type: 'integer',
example: 0,
nullable: false
)]
#[ValidationRules(rules: 'required|integer|min:0|max:1000')]
public int $sort;
#[OA\Property(
property: 'enabled',
description: '状态(1启用 0禁用)',
type: 'integer',
enum: [0, 1],
example: 1,
nullable: false
)]
#[ValidationRules(rules: 'required|integer|in:0,1')]
public int $enabled;
#[OA\Property(
property: 'remark',
description: '备注',
type: 'string',
example: 'ASDF',
nullable: true
)]
#[ValidationRules(rules: 'string|max:255|nullable')]
public ?string $remark = null;
}
@@ -0,0 +1,91 @@
<?php
declare(strict_types=1);
/**
*+------------------
* madong
*+------------------
* Copyright (c) https://gitee.com/motion-code All rights reserved.
*+------------------
* Author: Mr. April (405784684@qq.com)
*+------------------
* Official Website: http://www.madong.tech
*/
namespace app\adminapi\schema\request\org;
use app\schema\request\BaseQueryRequest;
use OpenApi\Attributes as OA;
use WebmanTech\DTO\Attributes\ValidationRules;
#[OA\Schema(
title: '岗位列表查询请求',
description: '岗位列表接口的查询过滤参数'
)]
class PostQueryRequest extends BaseQueryRequest
{
#[OA\Property(
property: 'name',
description: '岗位名称',
type: 'string',
example: '技术主管',
nullable: true
)]
#[ValidationRules(rules: 'string|max:50|nullable')]
public ?string $name = null;
#[OA\Property(
property: 'code',
description: '岗位编码',
type: 'string',
example: 'TECH_LEAD',
nullable: true
)]
#[ValidationRules(rules: 'string|max:30|nullable')]
public ?string $code = null;
#[OA\Property(
property: 'dept_id',
description: '部门ID',
type: 'string',
example: '246996721795072000',
nullable: true
)]
#[ValidationRules(rules: 'string|nullable')]
public ?string $dept_id = null;
#[OA\Property(
property: 'enabled',
description: '状态(1启用 0禁用)',
type: 'integer',
enum: [0, 1],
example: 1,
nullable: true
)]
#[ValidationRules(rules: 'integer|in:0,1|nullable')]
public ?int $enabled = null;
#[OA\Property(
property: 'start_date',
description: '创建开始日期',
type: 'string',
format: 'date',
example: '2025-11-01',
nullable: true
)]
#[ValidationRules(rules: 'date|nullable')]
public ?string $start_date = null;
#[OA\Property(
property: 'end_date',
description: '创建结束日期',
type: 'string',
format: 'date',
example: '2025-11-30',
nullable: true
)]
#[ValidationRules(rules: 'date|after_or_equal:start_date|nullable')]
public ?string $end_date = null;
}