feat : coupon template
This commit is contained in:
46
app/Model/CouponDispenseLog.php
Normal file
46
app/Model/CouponDispenseLog.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
use Hyperf\DbConnection\Model\Model;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string $coupon_name
|
||||
* @property int $coupon_template_id
|
||||
* @property int $send_count
|
||||
* @property int $receive_count
|
||||
* @property int $left_count
|
||||
* @property int $item_count
|
||||
* @property int $appoint_group
|
||||
* @property int $claim_rule
|
||||
* @property string $claim_value
|
||||
* @property int $appoint_city_id
|
||||
* @property string $appoint_value
|
||||
* @property string $use_scen_ids
|
||||
* @property int $validity_time_type
|
||||
* @property string $validity_time_value
|
||||
* @property string $remark
|
||||
* @property string $create_time
|
||||
* @property string $update_time
|
||||
*/
|
||||
class CouponDispenseLog extends Model
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'coupon_dispense_log';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = [];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['id' => 'integer', 'coupon_template_id' => 'integer', 'send_count' => 'integer', 'receive_count' => 'integer', 'left_count' => 'integer', 'item_count' => 'integer', 'appoint_group' => 'integer', 'claim_rule' => 'integer', 'appoint_city_id' => 'integer', 'validity_time_type' => 'integer'];
|
||||
}
|
||||
49
app/Model/CouponTemplate.php
Normal file
49
app/Model/CouponTemplate.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
use Hyperf\DbConnection\Model\Model;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $coupon_type
|
||||
* @property string $amount
|
||||
* @property string $ratio
|
||||
* @property int $is_admin_edit
|
||||
* @property int $status
|
||||
* @property string $create_time
|
||||
* @property string $update_time
|
||||
*/
|
||||
class CouponTemplate extends Model
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'coupon_template';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = [];
|
||||
protected array $guarded = [];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['id' => 'integer', 'coupon_type' => 'integer', 'is_admin_edit' => 'integer', 'status' => 'integer'];
|
||||
|
||||
const string CREATED_AT = 'created_time';
|
||||
const string UPDATED_AT = 'updated_time';
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return CouponTemplate|\Hyperf\Database\Model\Model|array|null
|
||||
*/
|
||||
public function getInfoById(int $id): CouponTemplate|\Hyperf\Database\Model\Model|array|null
|
||||
{
|
||||
return $this->find($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user