from django.forms import ModelForm
from django.views.generic import CreateView 
from .models import *
 
#设置表单
class SettingsForm(ModelForm,CreateView):
    class Meta:
        model=Settings
        fields=('exchange_rate','is_open') 

#轮播图表单
class BannersForm(ModelForm,CreateView):
    class Meta:
        model=Banners
        fields=('image','is_active') 

#商品表单
class Points_Products_Form(ModelForm,CreateView):
    class Meta:
        model=Points_Products
        fields=('product_name','product_image','product_cost','product_desc','product_content','face_to','cat','is_active')

#商品轮播图表单
class Points_Products_Banner_Form(ModelForm, CreateView):
    class Meta:
        model = Points_Products_Banner
        fields = ('image','sort_id','is_active')

        
#咨询发布
class Boards_Form(ModelForm,CreateView):
    class Meta:
        model=Boards
        fields=('subtitle','content','endtm','is_active')

#订单管理
class Orders_Form(ModelForm,CreateView):
    class Meta:
        model=Orders
        fields=('status','deliver_company','deliver_company_name','deliver_company_code','deliver_tm')



#评论编辑
class Orders_Comments_Form(ModelForm,CreateView):
    class Meta:
        model=Order_Comment
        fields=('is_show','is_delete')