<?php

namespace app\common\model;

use think\Model;

class Address extends Model
{
    protected $autoWriteTimestamp = false;
    const STATUS_NO = 0;
    const STATUS_YES = 1;

    const STATUS = [
        self::STATUS_NO => '关闭',
        self::STATUS_YES => '开启',
    ];

    //sex_text
    public function getStatusTextAttr($value, $data)
    {
        return self::STATUS[$data['status']] ?? '';
    }
}
