Your Name 8 mēneši atpakaļ
vecāks
revīzija
cd3edd8689

+ 6 - 0
app/Module/Fund/Models/FundAdminModel.php

@@ -5,6 +5,12 @@ namespace App\Module\Fund\Models;
 use App\Module\Fund\Enums\FUND_TYPE;
 use UCore\ModelCore;
 
+/**
+ * 资金管理员
+ *
+ * field start
+ * field end
+ */
 class FundAdminModel extends ModelCore
 {
 

+ 6 - 1
app/Module/Fund/Models/FundCirculationModel.php

@@ -4,7 +4,12 @@ namespace App\Module\Fund\Models;
 
 use UCore\ModelCore;
 
-
+/**
+ * 资金流通记录
+ *
+ * field start
+ * field end
+ */
 class FundCirculationModel extends ModelCore
 {
     protected $table = 'fund_circulation';

+ 3 - 5
app/Module/Fund/Models/FundModel.php

@@ -10,11 +10,9 @@ use UCore\ModelCore;
 /**
  * 资金表
  *
- * @property int $user_id
- * @property int $fund_id
- * @property int $balance
- * @property int $update_time
- * @property int $create_time
+ * field start
+ * field end
+ *
  */
 class FundModel extends ModelCore
 {

+ 3 - 9
app/Module/Fund/Models/FundOrderModel.php

@@ -7,15 +7,9 @@ use UCore\ModelCore;
 /**
  * 资金订单表
  *
- * @property int $id ID
- * @property int $relation_id 关联ID 例如wlorder.Id
- * @property string $relation_type 关联类型 wlorder物流订单
- * @property int $type1 关联操作类型
- * @property int $total_fee 支付金额
- * @property int $create_time 创建时间
- * @property int $to_user_id 收款账户id
- * @property int $to_fund_id 收款账户的资金id
- * @property string $remark 订单描述
+ * field start
+ * field end
+ *
  */
 class FundOrderModel extends ModelCore
 {

+ 11 - 12
app/Module/GameItems/Models/ItemCategory.php

@@ -24,6 +24,15 @@ class ItemCategory extends ModelCore
      */
     protected $table = 'item_categories';
 
+    protected $titleColumn = 'name';
+
+    protected $orderColumn = 'sort';
+
+    protected $parentColumn = 'parent_id';
+
+
+
+
     /**
      * 可批量赋值的属性
      *
@@ -37,18 +46,8 @@ class ItemCategory extends ModelCore
         'parent_id',
     ];
 
-    /**
-     * 树形结构字段设置
-     */
-    public function __construct(array $attributes = [])
-    {
-        parent::__construct($attributes);
 
-        // 设置树形结构相关字段
-        $this->setTitleColumn('name');
-        $this->setOrderColumn('sort');
-        $this->setParentColumn('parent_id');
-    }
+
 
     /**
      * 获取该分类下的所有物品
@@ -57,7 +56,7 @@ class ItemCategory extends ModelCore
      */
     public function items(): HasMany
     {
-        return $this->hasMany(ItemItem::class, 'category_id', 'id');
+        return $this->hasMany(Item::class, 'category_id', 'id');
     }
 
     /**

+ 3 - 8
app/Module/Sms/Models/SmsCode.php

@@ -9,14 +9,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
 /**
  * 短信验证码模型
  *
- * @property int $id 主键ID
- * @property string $mobile 手机号
- * @property string $token 令牌
- * @property string $type 验证码类型
- * @property string $code_value 验证码值
- * @property \Carbon\Carbon $created_at 创建时间
- * @property \Carbon\Carbon $updated_at 更新时间
- * @property \Carbon\Carbon $deleted_at 删除时间
+ * field start
+ * field end
+ *
  */
 class SmsCode extends ModelCore
 {

+ 2 - 10
app/Module/Sms/Models/SmsConfig.php

@@ -8,16 +8,8 @@ use UCore\Model;
 /**
  * 短信配置模型
  *
- * @property int $id 主键ID
- * @property string $driver 驱动
- * @property string $is_open 是否开启
- * @property string $title 标题
- * @property string $desc 描述
- * @property int $type 类型
- * @property string $value 值
- * @property string $group 分组
- * @property \Carbon\Carbon $created_at 创建时间
- * @property \Carbon\Carbon $updated_at 更新时间
+ * field start
+ * field end
  */
 class SmsConfig extends ModelCore
 {

+ 2 - 12
app/Module/Sms/Models/SmsDbGateway.php

@@ -8,18 +8,8 @@ use UCore\ModelCore;
 /**
  * 数据库-短信网关 模型
  *
- * @property int $id 主键ID
- * @property string $tpl_id 模板ID
- * @property string $tpl_value 模板变量值
- * @property string $key 唯一标识
- * @property string $universal_number 通用格式号码
- * @property string $mobile 手机号
- * @property string $content 短信内容
- * @property string $idd_code 国际区号
- * @property string $zero_prefixed_number 带零前缀的号码
- * @property \Carbon\Carbon $created_at 创建时间
- * @property \Carbon\Carbon $updated_at 更新时间
- * @property \Carbon\Carbon $deleted_at 删除时间
+ * field start
+ * field end
  */
 class SmsDbGateway extends ModelCore
 {

+ 0 - 65
app/Module/Transaction/Models/Test.php

@@ -1,65 +0,0 @@
-<?php
-
-namespace App\Module\Transaction\Models;
-
-use App\Module\Test\Database\Factories\TestFactory;
-use Illuminate\Database\Eloquent\Factories\HasFactory;
-use UCore\ModelCore;
-use Illuminate\Database\Eloquent\SoftDeletes;
-use App\Module\Test\Events\TestEvent;
-
-class Test extends ModelCore
-{
-    use HasFactory, SoftDeletes;
-
-    /**
-     * 与模型关联的表名
-     *
-     * @var string
-     */
-    protected $table = 'test';
-
-    /**
-     * 可批量赋值的属性
-     *
-     * @var array
-     */
-    protected $fillable = [
-        'name',
-        'code',
-        'description',
-        'data',
-        'status'
-    ];
-
-    /**
-     * 应该被调整为日期的属性
-     *
-     * @var array
-     */
-    protected $dates = [
-        'created_at',
-        'updated_at',
-        'deleted_at'
-    ];
-
-    /**
-     * 属性类型转换
-     *
-     * @var array
-     */
-    protected $casts = [
-        'data' => 'array',
-        'status' => 'integer'
-    ];
-
-    /**
-     * 创建一个新的工厂实例
-     *
-     * @return \Illuminate\Database\Eloquent\Factories\Factory
-     */
-    protected static function newFactory()
-    {
-        return TestFactory::new();
-    }
-}

+ 6 - 6
app/Module/Transaction/Models/Transaction.php

@@ -3,17 +3,17 @@
 namespace App\Module\Transaction\Models;
 
 use Dcat\Admin\Traits\HasDateTimeFormatter;
-
-use Illuminate\Database\Eloquent\Model;
-
+use UCore\ModelCore;
 
 /**
- * field start 
+ * 交易记录
+ *
+ * field start
  * field end
  */
-class Transaction extends Model
+class Transaction extends ModelCore
 {
-    // attrlist start 
+    // attrlist start
     protected $fillable = [
     ];
     // attrlist end

+ 5 - 4
app/Module/Transaction/Models/TransactionRecharge.php

@@ -4,14 +4,15 @@ namespace App\Module\Transaction\Models;
 
 use App\Module\Transaction\Enums\RECHARGE_STATUS;
 use Dcat\Admin\Traits\HasDateTimeFormatter;
-
-use Illuminate\Database\Eloquent\Model;
+use UCore\ModelCore;
 
 /**
- * field start 
+ * 充值记录
+ *
+ * field start
  * field end
  */
-class TransactionRecharge extends Model
+class TransactionRecharge extends ModelCore
 {
 
     // attrlist start

+ 6 - 4
app/Module/Transaction/Models/TransactionTransfer.php

@@ -5,15 +5,17 @@ namespace App\Module\Transaction\Models;
 use App\Module\Transaction\Enums\TRANSFER_STATUS;
 use Dcat\Admin\Traits\HasDateTimeFormatter;
 use Illuminate\Database\Eloquent\SoftDeletes;
-use Illuminate\Database\Eloquent\Model;
+use UCore\ModelCore;
 
 /**
- * field start 
+ * 转账记录
+ *
+ * field start
  * field end
  */
-class TransactionTransfer extends Model
+class TransactionTransfer extends ModelCore
 {
-    // attrlist start 
+    // attrlist start
     protected $fillable = [
     ];
     // attrlist end

+ 6 - 4
app/Module/Transaction/Models/TransactionWithdrawal.php

@@ -5,15 +5,17 @@ namespace App\Module\Transaction\Models;
 use App\Module\Transaction\Enums\WITHDRAWAL_STATUS;
 use Dcat\Admin\Traits\HasDateTimeFormatter;
 use Illuminate\Database\Eloquent\SoftDeletes;
-use Illuminate\Database\Eloquent\Model;
+use UCore\ModelCore;
 
 /**
- * field start 
+ * 提现记录
+ *
+ * field start
  * field end
  */
-class TransactionWithdrawal extends Model
+class TransactionWithdrawal extends ModelCore
 {
-    // attrlist start 
+    // attrlist start
     protected $fillable = [
     ];
     // attrlist end