<?php

namespace app\api\model;

use think\Db;
use think\Model;
class FastimUser extends Model
{
    // 表名
    protected $name = 'fastim_user';

    public static $base_table;

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'type_text',
        'gender_text',
        'status_text'
    ];

    public function getTypeList()
    {
        return ['csr' => __('Type csr'), 'user' => __('Type user'), 'tourist' => __('Type tourist')];
    }

    public function getGenderList()
    {
        return ['secrecy' => __('Gender secrecy'), 'male' => __('Gender male'), 'female' => __('Gender female')];
    }

    public function getStatusList()
    {
        return ['0' => __('Status 0'), '1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
    }

    protected function initialize()
    {
        parent::initialize();
        self::$base_table = $this->name;
    }







}