www_fpvone_cn/application/common/model/Players.php

110 lines
1.9 KiB
PHP

<?php
/**
* Created by PhpStorm.
* Author:Soar
* Time:2023/7/12 10:33
*/
namespace app\common\model;
use think\Db;
use think\Model;
/**
* 会员模型
*/
class Players extends Model
{
// 开启自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'created_at';
protected $updateTime = 'updated_at';
// 追加属性
protected $append = [
];
/**
* @var int
* @DESC 普通用户身份
*/
const ORDINARY_USERS = 0;
/**
* @var int
* @DESC 申请飞手身份
*/
const PLAYERS_APPLYING = 1;
/**
* @var int
* @DESC 退回修改
*/
const PLAYERS_MODIFY = 2;
/**
* @var int
* @DESC 重新申请
*/
const PLAYERS_REAPPLY = 3;
/**
* @var int
* @DESC 正式飞手
*/
const PLAYERS_FORMAL = 9;
/**
* @var int
* @DESC 申请不通过
*/
const PLAYERS_NO_PASS = -1;
/**
* @var int
* @DESC 身份被取消
*/
const PLAYERS_CANCELLATION = -2;
/**
* @var int
* @DESC 成年身份设定
*/
const ADULT = 18;
const CARD_TYPE = [
0 => "身份证",
1 => "护照",
2 => "台胞证",
3 => "港澳通行证"
];
/**
* @var int
* ASFC 会员
*/
const ASFC_VIP = 1;
/**
* @var int
* 非 ASFC 会员
*/
const NOT_ASFC_VIP = 0;
/**
* @var int
* 俱乐部会员
*/
const CLUP_USER = 1;
/**
* @var int
* 非俱乐部会员
*/
const NOT_CLUP_USER = 0;
public function getPlayers(int $member_id)
{
return $this->where('member_id', 'eq', $member_id)->find();
}
public function getPlayerId(int $id)
{
return $this->field('id,real_name,age,province,player_pic,member_id')->where('id', 'eq', $id)->find();
}
}