mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
977 B
31 lines
977 B
6 months ago
|
# coding:utf-8
|
||
|
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
# MW-Linux面板
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
# Author: midoks <midoks@163.com>
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
|
||
|
import core.mw as mw
|
||
|
|
||
|
__FIELD = 'id,pid,name,port,add_time'
|
||
|
|
||
|
def addDomain(pid, name, port):
|
||
|
now_time = mw.getDateFromNow()
|
||
|
insert_data = {
|
||
|
'pid': pid,
|
||
|
'name': name,
|
||
|
'port':port,
|
||
|
'add_time': now_time,
|
||
|
}
|
||
|
return mw.M('domain').insert(insert_data)
|
||
|
|
||
|
|
||
|
def deleteDomainId(domain_id):
|
||
|
return mw.M('domain').where("id=?", (domain_id,)).delete()
|
||
|
|
||
|
def deleteDomainBySiteId(site_id):
|
||
|
return mw.M('domain').where("pid=?", (site_id,)).delete()
|