Documentation ¶
Index ¶
- func AuthenticateUser(form forms.LoginForm) (interface{}, error)
- type Sales
- type SalesModel
- type Servisan
- type ServisanModel
- func (ServisanModel) All(form forms.GetAllServisanForm) ([]Servisan, error)
- func (ServisanModel) ByNomorNota(nomorNota int) (*Servisan, error)
- func (ServisanModel) Create(form forms.CreateServisanForm) (nomorNota int, err error)
- func (ServisanModel) Delete(nomorNota int) error
- func (ServisanModel) Update(nomorNota int, form forms.UpdateServisanForm) error
- type Sparepart
- type SparepartModel
- type Teknisi
- type TeknisiModel
- type User
- type UserModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateUser ¶
Types ¶
type SalesModel ¶
type SalesModel struct{}
func (SalesModel) Create ¶
func (SalesModel) Create(form forms.CreateSalesForm) (id int, err error)
func (SalesModel) Delete ¶
func (SalesModel) Delete(id int) error
type Servisan ¶
type Servisan struct { NomorNota int `` /* 147-byte string literal not displayed */ Tanggal time.Time `json:"tanggal" gorm:"->;autoCreateTime;not null;default:CURRENT_TIMESTAMP"` NamaPelanggan string `json:"nama_pelanggan" gorm:"size:256;not null"` NoHp string `json:"no_hp" gorm:"size:32"` TipeHp string `json:"tipe_hp" gorm:"size:128;not null"` Imei string `json:"imei" gorm:"size:16"` KondisiHp string `json:"kondisi_hp" gorm:"size:512"` Kerusakan string `json:"kerusakan" gorm:"size:256;not null"` YangBlmDicek string `json:"yang_blm_dicek" gorm:"size:128"` Kelengkapan string `json:"kelengkapan" gorm:"size:128"` Warna string `json:"warna" gorm:"size:128"` KataSandiPola string `json:"kata_sandi_pola" gorm:"size:128"` IDTeknisi int `json:"id_teknisi" gorm:"type:integer;not null"` IDSales int `json:"id_sales" gorm:"type:integer;not null"` Teknisi Teknisi `json:"-" gorm:"foreignKey:IDTeknisi;constraint:OnDelete:RESTRICT;"` Sales Sales `json:"-" gorm:"foreignKey:IDSales;constraint:OnDelete:RESTRICT;"` Status utils.StatusServisan `json:"status" gorm:"type:status_servisan;not null"` TanggalKonfirmasi utils.NullTime `json:"tanggal_konfirmasi" gorm:"type:timestamp with time zone"` IsiKonfirmasi string `json:"isi_konfirmasi" gorm:"size:512"` Biaya float64 `json:"biaya" gorm:"type:double precision;not null;default:0"` Diskon int `json:"diskon" gorm:"check:valid_diskon,diskon >= 0 AND diskon <= 100;not null;default:0"` DP float64 `json:"dp" gorm:"type:double precision;not null;default:0"` TambahanBiaya float64 `json:"tambahan_biaya" gorm:"type:double precision;not null;default:0"` TotalBiaya float64 `` /* 204-byte string literal not displayed */ HargaSparepart float64 `json:"harga_sparepart" gorm:"->;type:double precision;not null;default:0"` Sisa float64 `` /* 204-byte string literal not displayed */ LabaRugi float64 `json:"laba_rugi" gorm:"->;type:double precision;not null;default:0"` TanggalPengambilan utils.NullTime `json:"tanggal_pengambilan" gorm:"type:timestamp with timezone"` }
type ServisanModel ¶
type ServisanModel struct{}
func (ServisanModel) All ¶
func (ServisanModel) All(form forms.GetAllServisanForm) ([]Servisan, error)
func (ServisanModel) ByNomorNota ¶
func (ServisanModel) ByNomorNota(nomorNota int) (*Servisan, error)
func (ServisanModel) Create ¶
func (ServisanModel) Create(form forms.CreateServisanForm) (nomorNota int, err error)
func (ServisanModel) Delete ¶
func (ServisanModel) Delete(nomorNota int) error
func (ServisanModel) Update ¶
func (ServisanModel) Update(nomorNota int, form forms.UpdateServisanForm) error
type Sparepart ¶
type Sparepart struct { ID int `` /* 139-byte string literal not displayed */ NomorNota int `json:"nomor_nota" gorm:"type:integer;not null"` Servisan Servisan `json:"-" gorm:"foreignKey:NomorNota;constraint:OnDelete:RESTRICT;"` Nama string `json:"nama" gorm:"size:256;not null"` Harga float64 `json:"harga" gorm:"type:double precision;not null;default:0"` TanggalPembelian time.Time `json:"tanggal_pembelian" gorm:"->;autoCreateTime;not null;default:CURRENT_TIMESTAMP"` }
type SparepartModel ¶
type SparepartModel struct{}
func (SparepartModel) All ¶
func (SparepartModel) All(form forms.GetAllSparepartForm) ([]Sparepart, error)
func (SparepartModel) ByNomorNota ¶
func (SparepartModel) ByNomorNota(nomorNota int) ([]Sparepart, error)
func (SparepartModel) Create ¶
func (SparepartModel) Create(form forms.CreateSparepartForm) (id int, err error)
func (SparepartModel) Delete ¶
func (SparepartModel) Delete(id int) error
type TeknisiModel ¶
type TeknisiModel struct{}
func (TeknisiModel) Create ¶
func (TeknisiModel) Create(form forms.CreateTeknisiForm) (id int, err error)
func (TeknisiModel) Delete ¶
func (TeknisiModel) Delete(id int) error
Click to show internal directories.
Click to hide internal directories.